abenori / jlreq

Other
125 stars 18 forks source link

allowing fixed inter-character spacing (アキ組) on main text #84

Closed otyu closed 2 years ago

otyu commented 3 years ago

I would like to inquire about implementing fixed inter-character spacing (アキ組) on the main text. This could be done by setting the inter-character spacing equivalent of baselineskip (行送り) or linegap (行間).

Considerations from "Requirements for Japanese Text Layout" (日本語組版処理の要件)

Definition of "fixed inter-character spacing" (アキ組): Such definition can be seen in in "2.1.3 Principles of Arrangement of Kanji and Kana Characters" (漢字及び仮名の配置の原則), on NOTE (2.a). Its common usages are given as headings (見出し), running heads (柱) etc.

Definition of "solid setting" (ベタ組): As above, the definition of ベタ組 can be seen in 2.1.3. Moreover, in "2.4.2 Considerations in Designing the Kihon-hanmen" (基本版面の設計の注意点), item c, Note 1.2, the solid setting (ベタ組) is argued to be the standard.

Personal motivation

My current university specifies the geometry of submitted dissertations by a fixed line length, and a fixed number of characters per line set independently. This can only be achieved by setting a non-zero inter-character spacing (字間).

For other geometric specifications concerning number of lines, the document class already allows line gap to be setup by altering baselineskip (行送り) or linegap (行間).

MS Word 2019 is suggested by my institution as a standard text editor, and page settings values are given as to result in a document compliant with the specifications. Those settings consist in: First, setting margins (top, down, left and right), which thus fixes the line length. Then, setting the number of characters per line and number of lines per page independently, which thus fixes the quantities 字送り and 行送り (line feed).

OBS: in W3C, the "term inter-character spacing" (字間) shows up in 2.1.3, but is not listed in "G. Terminology" (用語集). The term 字送り appears in the Terminology entry of "tsumegumi" (詰め組), and is defined as 「なお,字送りとは,同一行の隣接する文字同士の基準点から基準点までの距離(JIS Z 8125)」

A possible workout could be about messing with the parameter \let\jlreq@mol in jlreq.cls, but I have no idea on how to do so... The mentioned code is found on lines 408-410 of the current jlreq.cls, which are quoted in the following:

% \jlreq@gol(Gyo Okuri Length), \jlreq@mol (Moji Okuri Length)を定義
\let\jlreq@gol=\zh
\let\jlreq@mol=\zw

I personally agree with the statements posited by the W3C about solid setting (ベタ組) being the standard, but nevertheless, I must abide to the rules of my institution, and would like to do so still using this wonderful document class...

Thank you very much for your consideration.

abenori commented 3 years ago

pTeX / upTeX / LuaTeX-ja provide a special skip called kanjiskip which is inserted between most of japanese characters. With jlreq document class, one can set this skip by re-defining \jlreqkanjiskip. For example,

\documentclass{jlreq}
\renewcommand{\jlreqkanjiskip}{1\zw}
\begin{document}
あいう「えお

\end{document}

gives

eq

A space is inserted between あ and い.

But it is not perfect. As you can see in the above example, the space is not inserted between う and 「. This is because the space between these characters are defined in JFM (Japanese font metric) file and therefore kanjiskip is omitted. With the current version of jlreq, I think it is not possible to go further.

Technically, I think it is impossible to implement fixed inter-character with pLaTeX and upLaTeX. Perhaps with LuaTeX-ja, it is possible.

abenori commented 3 years ago

By the way, \jlreq@mol and \jlreq@gol is just another names of \zw and \zh, respectively. These do not give any effect for typesetting. Sorry for confusing.

abenori commented 3 years ago

In 3a7010f , I improved a JFM for LuaLaTeX. You can use fixed inter-character spacing typesetting by re-defining \jlreqkanjiskip as above with LuaLaTeX. The problem in the above are resolved with this improved JFM. Note that with pLaTeX / upLaTeX, there is still a problem and I think it is impossible to fixed this problem. I also added \akigumi command. It can be used as \akigumi{1\zw}{あいうえお}. Again it works well only with LuaLaTeX.

otyu commented 2 years ago

Dear @abenori, first of all, sorry for taking so much to reply to this issue. It took me some time to figure out LuaLaTex, but not enough to justify leaving this issue hanging.

Thank you very much for providing this functionality! I tested changing \jlreqkanjiskip in the preamble of a project, and it produced quite the result I was expecting. Also, \jidori and \akigumi seem to implement the functionality for one-line-texts.

I am taking the liberty to close this issue. Thank you again!