作者Tadano (六十少一)
看板LaTeX
标题Re: [问题] 打俄文
时间Wed Jan 18 13:56:21 2012
※ 引述《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)
1F:推 Volodos:纯中/英文是否可成功?可的话应是字型的问题 01/18 15:02
2F:→ Tadano:纯中英文的话PDF档一样也是会出现%20这一些码 01/18 16:58
3F:→ Tadano:texmaker有提到fonspec-patches.sty与fonspec.sty有error 01/18 17:02
4F:→ Volodos:纯中英也会有问题是字型的问题 01/19 03:51