Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Memoir with vertical Japanese text

47 views
Skip to first unread message

Pander

unread,
May 4, 2010, 4:33:06 PM5/4/10
to
Hi all,

Well, here is a complex CJK question with memoir. How can I get
Japanese text in vertical mode in a document that:
- is processed by XeLaTeX
- uses documentclass memoir with fontspec and unicode support
- uses ruby/furigana with hiragana, katakana and romaji on the kanji
- shows vertical glyphs for the Japanese punctuation, chōonpu, etc.

Please see the XeLaTeX UTF-8 file below for details which covers most
of the challanges.

Thanks,

Pander

\documentclass{memoir}
\usepackage[no-math]{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{ruby}
\renewcommand{\rubysep}{-0.2ex}

\setstocksize{297mm}{210mm}
\settrimmedsize{297mm}{210mm}{*}
\setlrmarginsandblock{25.4mm}{25.4mm}{*}
\setulmarginsandblock{25.4mm}{25.4mm}{*}
\setheadfoot{0mm}{0mm}
\setheaderspaces{*}{0mm}{*}
\setmarginnotes{0mm}{0mm}{0mm}
\checkandfixthelayout
\setlength{\parindent}{0pt}
\setlength{\parskip}{\baselineskip}

\setmainfont[Mapping=tex-text]{Kochi Gothic}
\pagestyle{empty}

\begin{document}


「\ruby{典}{ん}」…\ruby{剣}{でんて}\ruby{雅}{ンー}‥『\ruby{傳}{ky$\bar{\mbox{o}}$}』、
 ky$\bar{\mbox{o}}$・ンー・っッ。

How to get this dummy text in vertical mode (top-to-bottom)? Note that
many things will have to rotate in a complex way or even get other a
special vertical text mode glyph, see also:\\
http://en.wikipedia.org/wiki/Japanese\_punctuation\#Japanese\_punctuation\_marks

「\ruby{典}{ん}」…\ruby{剣}{でんて}\ruby{雅}{ンー}‥『\ruby{傳}{ky$\bar{\mbox{o}}$}』、
 ky$\bar{\mbox{o}}$・ンー・っッ。

Also \textbackslash=o (\=o) or unicode character o-with-macron (ō) is
not producing a macron o but a space. How to solve this?

\end{document}

Pander

unread,
May 5, 2010, 4:45:33 AM5/5/10
to
On May 4, 10:33 pm, Pander <pan...@users.sourceforge.net> wrote:
...

See updated and rephrased question in UTF-8 below.

\documentclass{memoir}
\usepackage[no-math]{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}

\usepackage{graphicx}


\usepackage{ruby}
\renewcommand{\rubysep}{-0.2ex}

\setstocksize{297mm}{210mm}
\settrimmedsize{297mm}{210mm}{*}
\setlrmarginsandblock{25.4mm}{25.4mm}{*}
\setulmarginsandblock{25.4mm}{25.4mm}{*}
\setheadfoot{0mm}{0mm}
\setheaderspaces{*}{0mm}{*}
\setmarginnotes{0mm}{0mm}{0mm}
\checkandfixthelayout
\setlength{\parindent}{0pt}
\setlength{\parskip}{\baselineskip}

\pagestyle{empty}

\begin{document}

{\bfseries Vertical text in memoir with XeLaTeX, fontspec and unicode,
part 2}

First of all, is is important to use a font that supports this, e.g.:\
\
http://anzawa.ps.land.to/bin/KouzanMouhituFont.zip\\
Most of the Japanese fonts shipped with Ubuntu Linux don't work
properly in vertical texts. Does anyone know why this is?

Note that many things will have to rotate in a complex way or even a
special glyph, see also:\\
http://en.wikipedia.org/wiki/Japanese\_punctuation\#Japanese\_punctuation\_marks\\
The fontspec manual paragraph 6.17 refers to the AAT Renderer. Why is
this? I don't see a difference.

Apparently, why sometimes the macron is not working in romji, is
simply because those glyphs were not supported by that particular
font.

{\fontspec{KouzanBrushFont}


「\ruby{典}{ん}」…\ruby{剣}{でんて}\ruby{雅}{ンー}‥『\ruby{傳}{ky$\bar{\mbox{o}}$}』、

 ky$\bar{\mbox{o}}$ンー・っッ。}

{\fontspec[Vertical=RotatedGlyphs]{KouzanBrushFont}
\rotatebox{-90}{「\ruby{典}{ん}」…\ruby{剣}{でんて}\ruby{雅}{ンー}‥『\ruby{傳}{ky$
\bar{\mbox{o}}$}』、 ky$\bar{\mbox{o}}$ンー・っッ。}}

%{\fontspec[Renderer=AAT,Vertical=RotatedGlyphs]{KouzanBrushFont}
%\rotatebox{-90}{「\ruby{典}{ん}」…\ruby{剣}{でんて}\ruby{雅}{ンー}‥『\ruby{傳}{ky$
\bar{\mbox{o}}$}』、 ky$\bar{\mbox{o}}$ンー・っッ。}}

Current errors in vertical mode are:
\begin{itemize}
\item vertical glyph not used for punctuation
{\fontspec{KouzanBrushFont}「」『』…‥・、。}
\item vertical glyph not used for katakana
{\fontspec{KouzanBrushFont}ッー}
\item vertical glyph not used for hiragana
{\fontspec{KouzanBrushFont}っ}
\item incorrect use of macron in romaji in ruby (I assume, otherwise
it should be closer at least)
\end{itemize}
How can these be fixed?

\end{document}

Pander

unread,
May 24, 2010, 11:03:06 AM5/24/10
to
0 new messages