4

I want to typeset some ancient writings in Chinese, but there is no derictly class of document to use. Then I try uplatex. I create a sim.map file whose content is:

urml        UniGB-UTF16-H   simsun.ttc
urmlv       UniGB-UTF16-V   simsun.ttc
ugbm        UniGB-UTF16-H   simhei.ttf
ugbmv       UniGB-UTF16-V   simhei.ttf

uprml-h     UniGB-UTF16-H   simsun.ttc
uprml-v     UniGB-UTF16-V   simsun.ttc
upgbm-h     UniGB-UTF16-H   simhei.ttf
upgbm-v     UniGB-UTF16-V   simhei.ttf
uprml-hq    UniGB-UCS2-H    simsun.ttc
upgbm-hq    UniGB-UCS2-V    simhei.ttf

and a try.tex file whose content is:

\documentclass[a4paper]{utbook}
\begin{document}
\textbf{天地人和},天地人和,\textit{天地人和}。
\end{document}

Then use the following code to get pdf:

uplatex try && dvipdfmx -f sim.map try

As you can see, \textbf works but textit does not. What should I do to get \textit works?

enter image description here

Update

If I use the pxchfon package, then the try.tex file is:

\documentclass[a4paper]{utbook}
\usepackage[noalphabet]{pxchfon}
\setminchofont[0]{simsun.ttc} 
\setgothicfont[0]{simkai.ttf} 
\begin{document}
\textbf{天地人和},天地人和,\textit{天地人和}。
\end{document}

And the output is: enter image description here

It seems that \textit does not work as well.

13
  • 3
    Do CJK ideographs even have the concept of italic? Dec 1, 2013 at 11:09
  • You have tagged the question xetex are you interested in xetex solutions or do you definitely need an uplatex solution (there are likely to be many more xetex users here) Dec 1, 2013 at 11:09
  • @KhaledHosny Thanks! italic=楷体 in CJK, for example, simkai.ttf. Dec 1, 2013 at 11:49
  • @DavidCarlisle Thanks! here is a similar quesstion "Vertical Chinese text with XeTeX". So I guess xetex maybe help here. Dec 1, 2013 at 11:52
  • 1
    @Ch'enMeng Can you kindly give an example to show how to use simkai , simsun and simhei at the same time? I will very appreciate your answer. Dec 2, 2013 at 15:08

1 Answer 1

3

Hmmm, have a look at the output:

enter image description here

Code:

%!TEX program = xelatex
%!TEX encoding = UTF-8
\documentclass[UTF8, nofonts]{ctexart}
\setCJKmainfont[RawFeature={vertical:+vert:+vhal},BoldFont=Adobe Heiti Std,ItalicFont=Adobe Kaiti Std]
  {Adobe Song Std}
\setCJKsansfont[RawFeature={vertical:+vert:+vhal}]{Adobe Heiti Std}
\setCJKmonofont[RawFeature={vertical:+vert:+vhal}]{Adobe Fangsong Std}

\usepackage{atbegshi}
\AtBeginShipout{%
  \global\setbox\AtBeginShipoutBox\vbox{%
    \special{pdf: put @thispage <</Rotate 90>>}%
    \box\AtBeginShipoutBox
  }%
}%
\begin{document}
\textbf{天地玄黃},\textit{宇宙洪荒}。日月盈昃,辰宿列張。
\end{document}

UPDATE

The :vhal option will let punctuation at the end of line out of alignment. Thus, do not use it.

%!TEX program = xelatex
%!TEX encoding = UTF-8
\documentclass[UTF8, nofonts]{ctexart}
\setCJKmainfont[RawFeature={vertical:+vert},BoldFont=Adobe Heiti Std,ItalicFont=Adobe Kaiti Std]
  {Adobe Song Std}
\setCJKsansfont[RawFeature={vertical:+vert}]{Adobe Heiti Std}
\setCJKmonofont[RawFeature={vertical:+vert}]{Adobe Fangsong Std}
\renewcommand{\thepage}{\Chinese{page}}
\begin{document}
天地玄黃,宇宙洪荒。
日月盈昃,辰宿列張。
寒來暑往,秋收冬藏。
閏餘成歲,律召調陽。
雲騰致雨,露結為霜。
金生麗水,玉出崑岡。
\end{document}
5
  • Thanks again! I know this method, and here is a better one but I can not find its .tex file. For your method, it really can deal with the problem but we will lose some advantage of uplatex at the same time. Thanks again. Dec 3, 2013 at 3:27
  • @EdenHarder What are the advantages? Could you explain it? In terms of my code, there is one bug left---punctuation at the end of line will be out of alignment. Do you mean this disadvantage?
    – Ch'en Meng
    Dec 3, 2013 at 3:42
  • For example, the number of the page will not be right and how to use footnote? Thanks very much! Here is the file I mentioned above. Dec 3, 2013 at 3:55
  • You can redefine \thepage with \rotatebox, such as \renewcommand{\thepage}{\rotatebox{90}{\arabic{page}}}. There is no footnote in ancient Chinese. However, we use cutnote (割注) instead.
    – Ch'en Meng
    Dec 3, 2013 at 4:00
  • Thanks for your kindly help! But I will wait for the solution for the original uplatex all the time also. Dec 3, 2013 at 10:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .