Re: [問題] 打俄文
※ 引述《Volodos (Volodos)》之銘言:
: 俄文可能有專屬的 package 以讀入字型, 我不是很清楚
: 但如果使用的字型有支援的話, 是可以直接輸出的
: 這方面我是用 xelatex, 因為可以直接使用系統字型, 省事很多
: 我試了一下
: (使用字型: warnock pro, 不確定支援多少俄文字型)
\documentclass[12pt,english]{article}
\usepackage{fontspec}
\usepackage{xeCJK}
\setmainfont{Tahoma}
\setCJKmainfont{標楷體}
\begin{document}
test
中文測試
чем\\
(о) дом-е (о) комнат-е (о) ком? (о) чём?
\end{document}
: (我隨手在 wiki 上 copy-paste 一些俄文)
: 在 test 下面的那行俄文是可以輸出的
: 我個人覺得比較省事的方式說來是這樣的
: 1. 用 xelatex
: 2. 用 fontspec 這個 package, 把俄文字型 include 進來
: 3. 文檔存成 utf8
: 4. 俄文輸入後可直接輸出
: (這個方式也用在所有的特殊符號. 我現在許多特殊符號可能是直接輸入而不用指令)
你好。
我現改用xelatex,也改成utf8格式,
並照你的範例修改如上試打
也有另從網路找一個範例試打:
\documentclass[12pt,a4paper]{article}
\usepackage{fontspec}
\usepackage{xeCJK}
\setmainfont{Tahoma}
\setCJKmainfont{標楷體}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt
\setlength{\parskip}{0.3cm}
\linespread{1.5}\selectfont
\begin{document}
測試
чем\\
(о) дом-е (о) комнат-е (о) ком? (о) чём?
\end{document}
有成功出現中文及俄文
但PDF檔開頭都會出現
"20
000000FF
而且都有出現附在最後的錯誤訊息
請問這是我那邊有設定錯誤或沒設定到嗎?
! Undefined control sequence.
l.52 \char_make_active:n
{"20}%
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.52 \char_make_active:n{"
20}%
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
) ("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package
("C:\Program Files\MiKTeX 2.9\tex\latex\euenc\eu1enc.def"
File: eu1enc.def 2010/05/27 v0.1h Experimental Unicode font encodings
)
LaTeX Font Info: Try loading font information for EU1+lmr on input line 100.
("C:\Program Files\MiKTeX 2.9\tex\latex\euenc\eu1lmr.fd"
File: eu1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
))
("C:\Program Files\MiKTeX 2.9\tex\xelatex\xunicode\xunicode.sty"
File: xunicode.sty 2010/11/06 v0.96 provides access to latin accents and many o
ther characters in Unicode lower plane
)
.................................................
. xparse info: "define-command"
.
. Defining document command \fontspec with arg. spec. 'O{}m' on line 335.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \setmainfont with arg. spec. 'O{}m' on line 339.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \setsansfont with arg. spec. 'O{}m' on line 343.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \setmonofont with arg. spec. 'O{}m' on line 347.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \setmathrm with arg. spec. 'O{}m' on line 351.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \setboldmathrm with arg. spec. 'O{}m' on line 354.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \setmathsf with arg. spec. 'O{}m' on line 357.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \setmathtt with arg. spec. 'O{}m' on line 360.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \newfontfamily with arg. spec. 'mO{}m' on line
. 377.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \newfontface with arg. spec. 'mO{}m' on line 380.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \defaultfontfeatures with arg. spec. 'm' on line
. 383.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \addfontfeatures with arg. spec. 'm' on line 400.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \newfontfeature with arg. spec. 'mm' on line 407.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \newAATfeature with arg. spec. 'mmmm' on line 416.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \newICUfeature with arg. spec. 'mmm' on line 425.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \aliasfontfeature with arg. spec. 'mm' on line
. 427.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \aliasfontfeatureoption with arg. spec. 'mmm' on
. line 430.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \newfontscript with arg. spec. 'mm' on line 435.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \newfontlanguage with arg. spec. 'mm' on line 457.
.................................................
.................................................
. xparse info: "define-command"
.
. Defining document command \DeclareFontsExtensions with arg. spec. 'm' on
. line 474.
.................................................
Variant \prop_gput:cnV already defined; not changing it on line 746
Variant \prop_gput:cnx already defined; not changing it on line 747
! Undefined control sequence.
l.1008 \tl_new:Nn
\g_fontspec_hexcol_tl {000000}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.1008 \tl_new:Nn \g_fontspec_hexcol_tl
{000000}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1008 \tl_new:Nn \g_fontspec_hexcol_tl {0
00000}
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! Undefined control sequence.
l.1009 \tl_new:Nn
\g_fontspec_opacity_tl {FF~}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
l.1009 \tl_new:Nn \g_fontspec_opacity_tl
{FF~}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! LaTeX error: "kernel/command-not-defined"
!
! Control sequence \tl_replace_all_in:Nnn undefined.
!
! See the LaTeX3 documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.1359 ...nerate_variant:Nn \tl_replace_all_in:Nnn
{Nnx}
|'''''''''''''''''''''''''''''''''''''''''''''''
| This is a coding error.
|
| LaTeX has been asked to use a command \tl_replace_all_in:Nnn, but this has
| not been defined yet.
|...............................................
\c@fontspec_tmp_int=\count169
LaTeX Info: Redefining \itshape on input line 2105.
LaTeX Info: Redefining \slshape on input line 2109.
LaTeX Info: Redefining \scshape on input line 2113.
LaTeX Info: Redefining \upshape on input line 2117.
("C:\Program Files\MiKTeX 2.9\tex\latex\fontspec\fontspec.cfg"))
! Undefined control sequence.
<argument> \l_fontspec_hexcol_tl
\l_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> ...ec_hexcol_tl \l_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> \g_fontspec_hexcol_tl
\g_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> ...ec_hexcol_tl \g_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
\g_fontspec_family_Tahoma_int=\count170
.................................................
. fontspec info: "defining-font"
.
. Defining font family 'Tahoma(0)' for font 'Tahoma' with options [].
.................................................
! Undefined control sequence.
<argument> \l_fontspec_hexcol_tl
\l_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> ...ec_hexcol_tl \l_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> \g_fontspec_hexcol_tl
\g_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> ...ec_hexcol_tl \g_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
.................................................
. fontspec info: "defining-raw"
.
. Defining shape 'normal' with NFSS spec.:
. <->"Tahoma/ICU:script=latn;language=DFLT;"
.................................................
! Undefined control sequence.
<argument> \l_fontspec_hexcol_tl
\l_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> ...ec_hexcol_tl \l_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> \g_fontspec_hexcol_tl
\g_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> ...ec_hexcol_tl \g_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
.................................................
. fontspec info: "defining-raw"
.
. Defining shape 'bold' with NFSS spec.:
. <->"Tahoma/B/ICU:script=latn;language=DFLT;"
.................................................
.................................................
. fontspec info: "no-font-shape"
.
. Could not resolve font Tahoma/I (it probably doesn't exist).
.................................................
! Undefined control sequence.
<argument> \l_fontspec_hexcol_tl
\l_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> ...ec_hexcol_tl \l_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> \g_fontspec_hexcol_tl
\g_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> ...ec_hexcol_tl \g_fontspec_opacity_tl
l.3 \setmainfont{Tahoma}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
.................................................
. fontspec info: "defining-raw"
.
. Defining shape 'bold italic' with NFSS spec.:
. <->"Tahoma/BI/ICU:script=latn;language=DFLT;"
.................................................
LaTeX Warning: Unused global option(s):
[english].
(C:\Users\Job\Desktop\test123.aux)
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
LaTeX Font Info: Checking defaults for EU1/lmr/m/n on input line 4.
LaTeX Font Info: ... okay on input line 4.
.................................................
. fontspec info: "setup-math"
.
. Adjusting the maths setup (use [no-math] to avoid this).
.................................................
\symlegacymaths=\mathgroup4
LaTeX Font Info: Overwriting symbol font `legacymaths' in version `bold'
(Font) OT1/cmr/m/n --> OT1/cmr/bx/n on input line 4.
LaTeX Font Info: Redeclaring math accent \acute on input line 4.
LaTeX Font Info: Redeclaring math accent \grave on input line 4.
LaTeX Font Info: Redeclaring math accent \ddot on input line 4.
LaTeX Font Info: Redeclaring math accent \tilde on input line 4.
LaTeX Font Info: Redeclaring math accent \bar on input line 4.
LaTeX Font Info: Redeclaring math accent \breve on input line 4.
LaTeX Font Info: Redeclaring math accent \check on input line 4.
LaTeX Font Info: Redeclaring math accent \hat on input line 4.
LaTeX Font Info: Redeclaring math accent \dot on input line 4.
LaTeX Font Info: Redeclaring math accent \mathring on input line 4.
LaTeX Font Info: Redeclaring math symbol \colon on input line 4.
LaTeX Font Info: Redeclaring math symbol \Gamma on input line 4.
LaTeX Font Info: Redeclaring math symbol \Delta on input line 4.
LaTeX Font Info: Redeclaring math symbol \Theta on input line 4.
LaTeX Font Info: Redeclaring math symbol \Lambda on input line 4.
LaTeX Font Info: Redeclaring math symbol \Xi on input line 4.
LaTeX Font Info: Redeclaring math symbol \Pi on input line 4.
LaTeX Font Info: Redeclaring math symbol \Sigma on input line 4.
LaTeX Font Info: Redeclaring math symbol \Upsilon on input line 4.
LaTeX Font Info: Redeclaring math symbol \Phi on input line 4.
LaTeX Font Info: Redeclaring math symbol \Psi on input line 4.
LaTeX Font Info: Redeclaring math symbol \Omega on input line 4.
LaTeX Font Info: Redeclaring math symbol \mathdollar on input line 4.
LaTeX Font Info: Redeclaring symbol font `operators' on input line 4.
LaTeX Font Info: Encoding `OT1' has changed to `EU1' for symbol font
(Font) `operators' in the math version `normal' on input line 4.
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) OT1/cmr/m/n --> EU1/Tahoma(0)/m/n on input line 4.
LaTeX Font Info: Encoding `OT1' has changed to `EU1' for symbol font
(Font) `operators' in the math version `bold' on input line 4.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) OT1/cmr/bx/n --> EU1/Tahoma(0)/m/n on input line 4.
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) EU1/Tahoma(0)/m/n --> EU1/Tahoma(0)/m/n on input line 4
.
LaTeX Font Info: Overwriting math alphabet `\mathrm' in version `normal'
(Font) EU1/Tahoma(0)/m/n --> EU1/Tahoma(0)/m/n on input line 4
.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `normal'
(Font) OT1/cmr/m/it --> EU1/Tahoma(0)/m/it on input line 4.
LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `normal'
(Font) OT1/cmr/bx/n --> EU1/Tahoma(0)/bx/n on input line 4.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `normal'
(Font) OT1/cmss/m/n --> EU1/lmss/m/n on input line 4.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `normal'
(Font) OT1/cmtt/m/n --> EU1/lmtt/m/n on input line 4.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) EU1/Tahoma(0)/m/n --> EU1/Tahoma(0)/bx/n on input line
4.
LaTeX Font Info: Overwriting math alphabet `\mathrm' in version `bold'
(Font) EU1/Tahoma(0)/m/n --> EU1/Tahoma(0)/bx/n on input line
4.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold'
(Font) OT1/cmr/bx/it --> EU1/Tahoma(0)/bx/it on input line 4.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `bold'
(Font) OT1/cmss/bx/n --> EU1/lmss/bx/n on input line 4.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold'
(Font) OT1/cmtt/m/n --> EU1/lmtt/bx/n on input line 4.
[1
] (C:\Users\Job\Desktop\test123.aux) )
Here is how much of TeX's memory you used:
10951 strings out of 429156
190867 string characters out of 3168943
266047 words of memory out of 3000000
14143 multiletter control sequences out of 15000+200000
3986 words of font info for 21 fonts, out of 3000000 for 9000
786 hyphenation exceptions out of 8191
32i,5n,41p,496b,220s stack positions out of 5000i,500n,10000p,200000b,50000s
Output written on test123.pdf (1 page).
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 210.68.117.143
※ 編輯: Tadano 來自: 210.68.117.143 (01/18 13:57)
※ 編輯: Tadano 來自: 210.68.117.143 (01/18 14:02)
推
01/18 15:02, , 1F
01/18 15:02, 1F
→
01/18 16:58, , 2F
01/18 16:58, 2F
→
01/18 17:02, , 3F
01/18 17:02, 3F
→
01/19 03:51, , 4F
01/19 03:51, 4F
討論串 (同標題文章)
LaTeX 近期熱門文章
PTT數位生活區 即時熱門文章