求助:xelatex+xeCJK的公式内中文显示问题。

OOo,TeX,KO,ABI,GIMP,Picasa,ProE,QCAD,Inkscape,Kicad,Eagle
回复
yang_11
帖子: 16
注册时间: 2014-03-14 23:31
系统: windows7

求助:xelatex+xeCJK的公式内中文显示问题。

#1

帖子 yang_11 » 2014-11-10 22:33

ubuntu14.04系统,装了xelatex+xeCJK,通过xeCJK设置了中英文缺省字体,编译后发现出现在\begin{equation}和\end{equation}之间的中文全部显示成方框,而公式外面的中文正常;还有就是最后第2节倒数第二行的双引号显示不正常(没有xeCJK的时候正常显示),求大神解答一下原因,谢谢!!!!
\documentclass[a4paper,11pt]{article}
\usepackage{indentfirst}
\usepackage{fontspec}
\usepackage{xeCJK}
\setCJKmainfont{文泉驿微米黑}
\setCJKmonofont{文泉驿微米黑}
\setmainfont{Times New Roman}
%author
\author{Yang Jianfeng}
%title
\title{Example1}
\begin{document}
%generates the title
\maketitle
%insert the table of contents
\tableofcontents
\section{Start}
Well, and here begins my lovely example.
是他,是他,就是他。
\subsection{start1}
\paragraph{Tian'anmen Square} is in the center of Beijing.
\section{Example}
%1
\ldots when Einstein introduced his formula
\begin{equation}
明月几时有e = m \cdot c^2 ,
\end{equation}which is at the same time the most widely known and the least
well understood pyhsical formula.

\ldots from which follows Kirchoff's current law:
\begin{equation}
\sum_{k=1}^{n} I_k = 0 \;
\end{equation}

Kirchhoff's voltage law can be derived \ldots
%3

\ldots which has several advantages.

\begin{equation}
I_D = I_F - I_R
\end{equation}
is the core of a very different transistor model. \ldots

\mbox{abc} \fbox{abc}

A reference to this subsection \label{sec:this} looks like:
``see section~\ref{sec:this} on papg~\pageref{sec:this}.''

Footnotes\footnote{This is a footnote.} are often used by people using \LaTeXe
\section{End}
\ldots{} and here it ends.
\end{document}
上面直接用xelatex *.tex可以通过
不知道怎么截图,请大家见谅……
头像
xw712
帖子: 518
注册时间: 2009-04-25 9:26

Re: 求助:xelatex+xeCJK的公式内中文显示问题。

#2

帖子 xw712 » 2014-11-11 0:07

我改动以下:

\usepackage{xeCJK} /*被我删掉此行*/
\setCJKmainfont{文泉驿微米黑}
\setCJKmonofont{文泉驿微米黑}
\setmainfont{Times New Roman} /*被我改为文泉驿微米黑*/

然后进入我的texlive2014,节取第二页如下:
Screenshot.png
yang_11
帖子: 16
注册时间: 2014-03-14 23:31
系统: windows7

Re: 求助:xelatex+xeCJK的公式内中文显示问题。

#3

帖子 yang_11 » 2014-11-11 10:36

xw712 写了:我改动以下:

\usepackage{xeCJK} /*被我删掉此行*/
\setCJKmainfont{文泉驿微米黑}
\setCJKmonofont{文泉驿微米黑}
\setmainfont{Times New Roman} /*被我改为文泉驿微米黑*/

然后进入我的texlive2014,节取第二页如下:
Screenshot.png
我的本意是想让中英文默认字体不一样,中文使用文泉米黑,英文使用Times New Roman,怎么设置?
是不是使用xeCJK包会使latex本来的一些命令改变意义??
回复