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.

Ch'en Meng
  • 3,843
  • 1
  • 19
  • 45
  • 3
    Do CJK ideographs even have the concept of italic? – خالد حسني Dec 01 '13 at 11:09
  • You have tagged the question [tag: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) – David Carlisle Dec 01 '13 at 11:09
  • @KhaledHosny Thanks! italic=楷体 in CJK, for example, simkai.ttf. – Eden Harder Dec 01 '13 at 11:49
  • @DavidCarlisle Thanks! here is a similar quesstion "Vertical Chinese text with XeTeX". So I guess xetex maybe help here. – Eden Harder Dec 01 '13 at 11:52
  • Are you 1609946263? – Ch'en Meng Dec 02 '13 at 04:17
  • You can use the package pxchfon under pTeX series to select fonts. – Ch'en Meng Dec 02 '13 at 04:24
  • @Ch'enMeng Thanks very much! I am 1609946263 in CTEX forum. After add the code:'\usepackage[noalphabet]{pxchfon} \setminchofont[0]{simsun.ttc} \setgothicfont[0]{simkai.ttf}', \textbf will not work. – Eden Harder Dec 02 '13 at 14:54
  • 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. – Eden Harder Dec 02 '13 at 15:08
  • @EdenHarder AFAIK, they Japanese, generally, has two font families, say mingchao (明朝) and gothic (哥特体), just as the three font families in Chinese (Song, Kai and Hei) and in English (Serif, Sans-Serif and TypewriTer). Since the package pxchfon is designed for Japanese, it only support two font families as default. That's to say, if you want more families, you have to use the command like \CJKfamily{song} (in CJK) to switch font family temporarily. However, pxchfon supports many kinds of font series and shape, I wonder if we could use this feature of the package to support Kai and Hei. – Ch'en Meng Dec 03 '13 at 00:20
  • @EdenHarder Since I know little Japanese, I asked one of my friends who is studying in Japan and also a (La)TeX amateur for help. However, there is no reply for now. I guess the only thing we could do now is being patient. :) – Ch'en Meng Dec 03 '13 at 00:22
  • @EdenHarder BTW, Clark Ma, m6n in CTeX forum, could be labeled as specialist in this field. – Ch'en Meng Dec 03 '13 at 00:24
  • @EdenHarder Oh, BTW again. If you leave four spaces at the beginning of a line or surround some text by \`` (not'`), they will be highlight as code. – Ch'en Meng Dec 03 '13 at 00:31
  • @Ch'enMeng Thanks! There is no response from m6n in CTeX forum either. So let's be patient. – Eden Harder Dec 03 '13 at 01:06

1 Answers1

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}
Ch'en Meng
  • 3,843
  • 1
  • 19
  • 45
  • 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. – Eden Harder Dec 03 '13 at 03: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 03 '13 at 03: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. – Eden Harder Dec 03 '13 at 03: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 03 '13 at 04:00
  • Thanks for your kindly help! But I will wait for the solution for the original uplatex all the time also. – Eden Harder Dec 03 '13 at 10:41