On Jan 17, 2008 4:49 PM, Werner LEMBERG <[EMAIL PROTECTED]> wrote:
/../
> > 2. Grid-type layout where each character is positioned in its own
> > box of equal size to all others, and characters are aligned in the
> > horizontal dimension as well as the vertical one. This style is very
> > useful for a number of things; for example, for addresses on
> > envelopes, titles on book covers, and the like.
>
> If you set the CJK glue to zero, you get this quite easily. For the
> other dimension, it's a quite complicated task if you mix text with,
> say, images. The `octavo' document style package tries to print lines
> at a fixed grid (I've never used it by myself).
For now I intend to use only text. The idea is to be able to typeset
one paragraph of vertical text among a mostly horizontally laid out
document. It all works very nicely when I do not want grid layout.
That is, justification top and bottom works well.
However, if I change \CJKglue I do not get the effects I am looking
for. Assume I have a box rotated and with a minipage inside with
length 11\baselineskip. First, if I renew the command to be {}, then
there is no more glue and the lines are nor broken. At least, they are
not broken until they hit some other latex/tex line break limit, so I
end up with one or two long columns that disappear off the bottom of
the page. Next, when I redefine the command to something like {\hskip
0\baselineskip} then it appears to me that the glue is zero, but
unfortunately I get a ragged bottom, with sometimes one character too
few, and sometimes one or two extra at the bottom.
I am looking at CJK.sty and CJKvert.sty for help, and I wonder if I
might have to redefine the \CJKsymbol command defined in CJKvert.sty
in case the shifting and rotating of various boxes means that the
rotated characters do not end up being of the same (square) size
anymore when placed next to one another? I notice this when I put
fboxes around characters that the boxes are not always touching one
another.
Any tips would be much appreciated. I supply below a short example
file with non-grid and grid layout attempts. I have repeated for each
example the text that fits into the respective first columns a couple
of times to show that latex (which does the layout per paragraph) does
not typeset the same thing per line in either case.
After setting CJKglue to zero, I use \\ to do linefeeding, and show
the result. Now, there are still problems when ASCII text enters the
picture. For some reason, using \baselineskip as a parameter to
\makebox does not give the size that I expect, it is much too big. So
instead of 4 baselineskips for a text such as "Compare:" (8 half-width
characters) I need something like 3.18 (trial and error) to make the
following CJK text fit nicely. If OTOH I use \mbox with \hphantom CJK
text in it, I get the correct behaviour. So I guess that somehow the
inter-character glue for ASCII text has some nasty effect on the
makebox length?
Other than that, there is the obvious problem that using fboxes makes
the CJK characters "larger". I was hoping to use a \makebox to typeset
these also, so any tips would be welcome.
Regards, Gernot
\documentclass[12pt]{article}
\usepackage{CJKutf8}
\usepackage{CJKvert}
\usepackage[overlap, CJK]{ruby}
\usepackage{CJKulem}
\renewcommand{\rubysep}{0.3ex}
\newenvironment{Japanese}{%
\CJKfamily{min}%
\CJKtilde
\CJKnospace}{}
\begin{document}
\begin{CJK}{UTF8}{}
\begin{Japanese}
\CJKhorz Demonstration of progress in vertical typesetting.
Now I try to make an environment which uses a grid layout. This is the
only time that setting the number of characters for horizontal or
vertical space makes sense.
First, non-grid layout:
\vspace{\baselineskip}\hfill \rotatebox[origin=c]{-90}{%
\begin{minipage}[c]{11\baselineskip}
\CJKvertここの日本語は縦の字体でここの日本語は縦の字体でここの日本語は縦の字体です。彼は「どういうことか」って聞
きましたそうです。「あぁ」と叫んだ。この``I need to go''というの
は上記と同様です。この`What?'も英語です。で、最後
に\CJKchar{"000}{"0A3}と\CJKchar{"000}{"0A7}を
\fbox{チ}\fbox{ェ}\fbox{ッ}\fbox{ク}します。
Compare:チエツク。本当のチェックで
す。
\end{minipage}
}\vspace{\baselineskip}%
Grid layout:
\vspace{\baselineskip}\hfill \rotatebox[origin=c]{-90}{%
\begin{minipage}[c]{11\baselineskip}\renewcommand{\CJKglue}{\hskip
0\baselineskip}
\CJKvertここの日本語は縦の字体ここの日本語は縦の字体ここの日本語は縦の字体ここの日本語は縦の字体です。彼は「どういうことか」って聞
きましたそうです。「あぁ」と叫んだ。この``I need to go''というの
は上記と同様です。この`What?'も英語です。で、最後
に\CJKchar{"000}{"0A3}と\CJKchar{"000}{"0A7}を
\fbox{チ}\fbox{ェ}\fbox{ッ}\fbox{ク}します。Compare:チエツク。本
当のチェックです。
\end{minipage}
}\vspace{\baselineskip}%
\newpage
Grid with linefeeds (double backslash) added after each 11 chars:
\vspace{\baselineskip}\hfill \rotatebox[origin=c]{-90}{%
\begin{minipage}[c]{11\baselineskip}\renewcommand{\CJKglue}{\hskip
0\baselineskip}
\CJKvertここの日本語は縦の字体\\ここの日本語は縦の字体\\ここの日本語は縦の字体\\ここの日本語は縦の字体\\です。彼は「どういうこ\\とか」って聞
きましたそ\\うです。「あぁ」と叫ん\\だ。この``I need to go''\\というの
は上記と同様で\\す。この`What?' も英語\\です。で、最後
に\CJKchar{"000}{"0A3}と\CJKchar{"000}{"0A7}\\を
\fbox{チ}\fbox{ェ}\fbox{ッ}\fbox{ク}します。\\ここの日本語は縦の字体\\\mbox{一二三四五}チエツク。本\\ここの日本語は縦の字体\\\mbox{\hphantom{一二三四五}}チエツク。本\\\makebox[3.18\baselineskip][l]{Compare:}チエツク。本\\
当のチェックです。
\end{minipage}
}\vspace{\baselineskip}%
\end{Japanese}
\end{CJK}
\end{document}
_______________________________________________
Cjk maillist - [email protected]
https://lists.ffii.org/mailman/listinfo/cjk