diff options
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r-- | macros/latex/contrib/babel-contrib/japanese/README.md | 2 | ||||
-rw-r--r-- | macros/latex/contrib/babel-contrib/japanese/japanese.pdf | bin | 326377 -> 338833 bytes | |||
-rw-r--r-- | macros/latex/contrib/babel-contrib/japanese/japanese.tex | 139 | ||||
-rw-r--r-- | macros/latex/contrib/enotez/README | 10 | ||||
-rw-r--r-- | macros/latex/contrib/enotez/enotez.sty | 21 | ||||
-rw-r--r-- | macros/latex/contrib/enotez/enotez_en.pdf | bin | 450196 -> 451515 bytes | |||
-rw-r--r-- | macros/latex/contrib/enotez/enotez_en.tex | 9 | ||||
-rw-r--r-- | macros/latex/contrib/enotez/enotez_split_example.tex | 2 |
8 files changed, 113 insertions, 70 deletions
diff --git a/macros/latex/contrib/babel-contrib/japanese/README.md b/macros/latex/contrib/babel-contrib/japanese/README.md index e0f60b3577..976383cc40 100644 --- a/macros/latex/contrib/babel-contrib/japanese/README.md +++ b/macros/latex/contrib/babel-contrib/japanese/README.md @@ -81,6 +81,6 @@ modified under the terms of the LaTeX Project Public License 1.3. ## Release Date -2020-12-06 +2020-12-13 Japanese TeX Development Community diff --git a/macros/latex/contrib/babel-contrib/japanese/japanese.pdf b/macros/latex/contrib/babel-contrib/japanese/japanese.pdf Binary files differindex 7d64e49e0b..980964c4db 100644 --- a/macros/latex/contrib/babel-contrib/japanese/japanese.pdf +++ b/macros/latex/contrib/babel-contrib/japanese/japanese.pdf diff --git a/macros/latex/contrib/babel-contrib/japanese/japanese.tex b/macros/latex/contrib/babel-contrib/japanese/japanese.tex index 1ef7514b2f..d6024d07e9 100644 --- a/macros/latex/contrib/babel-contrib/japanese/japanese.tex +++ b/macros/latex/contrib/babel-contrib/japanese/japanese.tex @@ -52,8 +52,10 @@ \def\ClsYT#1{\Pkg{\textcolor{Blue}{#1}}} \def\file#1{\textsf{#1}} \def\code#1{\texttt{#1}} +\def\cs#1{\texttt{\textbackslash#1}} \usepackage[japanese,english]{babel}% References in English +\AtBeginDocument{\def\figurename{Figure~}}% add a space \usepackage{listings} \lstset{% @@ -110,15 +112,20 @@ Typesetting requirements of Japanese are completely different from those of Western languages, so setting parameter values and additional hyphenation patterns are not enough. -% babel-japanese (japanese.ldf) は訳語を登録するだけ -% 日本語組版に必要な設定は行わない -The package \Pkg{babel-japanese} provides ``\Opt{japanese}'' -option for Babel package. -However, it only defines translated replacement texts for -keywords and dates (e.g. ``\contentsname'' $\rightarrow$ -``{\selectlanguage{japanese}\contentsname}'', -\verb+\today+ $\rightarrow$ ``{\selectlanguage{japanese}\和暦\today}'') -and it does not care about any Japanese typesetting requirements. +\begin{itemize} + % babel-japanese (japanese.ldf) は訳語を登録するだけ + % 日本語組版に必要な設定は行わない + \item The \Opt{japanese} option of Babel package only defines + translated replacement texts for + keywords and dates (e.g. ``\contentsname'' $\rightarrow$ + ``{\selectlanguage{japanese}\contentsname}'', + \verb+\today+ $\rightarrow$ ``{\selectlanguage{japanese}\和暦\today}''); + it does not care about any Japanese typesetting requirements. + % CJK パッケージも不十分 + \item It may seem sufficient to use a package such as \Pkg{CJK} or + \Pkg{xeCJK}, or switch to Japanese fonts with a Unicode-enabled engine; + however, that's not the case. +\end{itemize} % この文書の目的:ちゃんと日本語する簡単な方法の紹介 %-- 日本語を「ちゃんと」組むことが西欧言語とは全く異なることを伝える。 @@ -131,15 +138,18 @@ and Japanese typesetting requirements. % とりあえず LuaLaTeX + \usepackage{luatexja} オススメ +%-- 対象読者が「日本語組版を全く知らない海外の人」なので +%-- 資産(=解説書,周囲の経験,歴史等)の面が日本と真逆である! +%-- つまり LuaTeX 最強+資産も最強 \section{Short introduction: using \LuaLaTeX} To obtain a properly formatted Japanese document, the easiest way is to use \LuaLaTeX\ with Lua\TeX-ja package. \begin{itemize} - \item Using the \Pkg{jlreq} class: + \item Using the \Pkg{jlreq} class (it loads \Pkg{luatexja} internally): \begin{lstlisting} - \documentclass[book]{jlreq} + \documentclass[book]{jlreq}% loads luatexja.sty internally \begin{document} \chapter{日本語の文書}% Japanese document こんにちは,日本。% Hello, Japan. @@ -186,7 +196,7 @@ Save the above as \file{jp2.tex} and run the following command. \begin{verbatim} $ uplatex jp2 \end{verbatim} -You will get \file{jp2.dvi}.\bigskip +You will get \file{jp2.dvi}. \upLaTeX\ and \pLaTeX\ (explained later) are often referred to as (u)\pLaTeX. They always output DVI files. @@ -196,7 +206,14 @@ If you have \file{jp2.dvi}, running the following command \begin{verbatim} $ dvipdfmx jp2 \end{verbatim} -will generate \file{jp2.pdf}.\bigskip +will generate \file{jp2.pdf}. + +If you want to simplify the procedure, you can use the command +\begin{verbatim} + $ ptex2pdf -l -u jp2 +\end{verbatim} +which runs \code{uplatex} and \code{dvipdfmx} in sequence. +\bigskip Since the default DVI driver in \TL is set to \Opt{dvips},\footnote{Though dvips supports DVI with Japanese fonts, @@ -218,8 +235,8 @@ to be passed to all driver-dependent packages Some old Japanese journal classes may require \pLaTeX. It is a legacy implementation which was born in 1980s, -before the release of Unicode 1.0. -\pLaTeX\ only supports a limited character set, JIS~X~0208 +before the release of Unicode 1.0, +and it only supports a limited character set, JIS~X~0208 (6879 characters). \begin{lstlisting} \documentclass{jsbook}% or, \documentclass{jbook} @@ -233,6 +250,12 @@ Save the above as \file{jp3.tex} and run the following command. You will get \file{jp3.dvi}. Again, the DVI file can be converted into PDF using dvipdfmx. +If you want to simplify the procedure, you can use the command +\begin{verbatim} + $ ptex2pdf -l jp3 +\end{verbatim} +which runs \code{platex} and \code{dvipdfmx} in sequence. + % CJK package はサポート外 \newenvironment{NOTE}{\StartNOTE\small}{\EndNOTE} @@ -247,27 +270,25 @@ Note for users who know the \Pkg{CJK} package: (u)\pLaTeX\ does \emph{not} support the \Pkg{CJK} package! The reasons are the followings: \begin{itemize} + \item The input handling of (u)\pTeX\ engine is different + from that of Western \TeX\ engines. Since Japanese tokens + are no longer treated as active characters, + the subsequent processing becomes inconsistent. \item Both the (u)\pLaTeX\ kernel and \file{CJK.sty} redefine the command \verb+\selectfont+, and those definitions are incompatible. - \item The input handling of (u)\pTeX\ engine is different - from that of Western \TeX\ engines, and Japanese tokens - are no longer treated as active characters. \end{itemize} -Anyway, you will not need the \Pkg{CJK} package at all -when using (u)\pLaTeX. +Anyway, if you use (u)\pLaTeX, which provides better Japanese support, +you will not need the \Pkg{CJK} package at all. \end{NOTE} -%% ちゃんと日本語を組むには? -%-- 禁則文字を除く任意箇所での行分割が可能 -%-- 和文文字直後の改行文字は空白にならない -%-- 約物どうしの字間調整 -%-- 和欧文間空白の挿入 +% 本書のメイン:西欧組版と日本語組版の違い;ちゃんと日本語を組むには? \section{Differences between Western and Japanese typesetting} The sections above described some practical ways to achieve ``acceptable'' Japanese typesetting results. +In the Appendix, you will find more examples. So, what are the minimum requirements for ``acceptable'' results for native Japanese readers? @@ -281,6 +302,13 @@ small-sized supplementary text (\Foreign{ruby}; ルビ), inline cutting note (\Foreign{warichu}; 割注) etc.} so we focus on the main issues regarding simple and short horizontal writing within a few lines. +%% 行分割と空白挿入 +%-- 禁則文字を除く任意箇所での行分割が可能 +%-- 和文文字直後の改行文字は空白にならない +%-- 約物どうしの字間調整 +%-- 和欧文間空白の挿入 +\subsection{Line breaks and spacing} + \newbox\JEXBOX % stores example output \newbox\JJgridbox \def\JJsq{% @@ -298,9 +326,12 @@ simple and short horizontal writing within a few lines. \vbox{\hsize=12\zw\noindent\leftskip0pt\rightskip0pt\parfillskip0pt#1\hss}\vrule}% }} -Consider the following input, Listing \ref{list:src1}. Using \LuaLaTeX, +This is the most notable aspect of Japanese typesetting, and a concept +that would not be found in Western typesetting. +Consider the input list, Listing \ref{list:src1}. Using \LuaLaTeX, it is allowed to include any Unicode character out-of-the-box, -though a suitable Japanese font should be declared. +and they are actually displayed correctly in the output when a suitable +Japanese font is declared. \begingroup \begin{figure}[tbp] @@ -364,6 +395,28 @@ are developed to support (most of) the requirements mentioned above, and their output is most likely to be acceptable. Therefore, we recommend to use one of those platforms. +%% レイアウト +%-- 前節の「ベタ組で任意箇所での行分割」「xkanjiskip」などは +%-- 西欧組版には相当概念が存在しないと思われる。 +%-- 一方,レイアウトパラメータ(行送り・字下げ・行長)は +%-- 西欧の TeX でも変更可能なパラメータ化されているので,次元が低い。 +\subsection{Page layout (brief description)} + +% 正方形が和文書体の基本的デザイン指向であり,欧文書体と顕著に異なる +% 書体のデザインの違いが,後述の字下げや行長の慣習に寄与している +Also, if the main language of the document is Japanese, it is common +to choose a properly designed Japanese class. +Unlike Latin typefaces, most of Japanese typefaces are designed in squares +with a width of \Foreign{zenkaku}. +This difference greatly contributes to the overall page layout in +Japanese typesetting. + +For example, the typesetting procedure can be simplified by setting +\cs{textwidth} to a multiple of \Foreign{zenkaku}, +and \cs{parindent} to 1~\Foreign{zenkaku}. +Many recent Japanese classes determine margins accordingly, and +adjust other layout parameters to improve readability. + \begingroup \ltjsetparameter{jacharrange={-1,-2,-3,-4,-5,-6,-7,-8,-9}} \setmainfont{HaranoAjiMincho-Regular} @@ -399,11 +452,10 @@ Therefore, we recommend to use one of those platforms. \label{fig:src1-mod} \end{figure} - %% 日本語組版における多書体化の必要性 %-- 欧文組版で「セリフ体からのイタリック化」に相当するのは %-- 和文組版では「明朝体(セリフ)からのゴシック(サンセリフ)化」 -\section{Using multi-weight typefaces for Japanese typesetting} +\subsection{Using multi-weight typefaces for Japanese typesetting} Latin font families used in Western typesetting consist of many typefaces: @@ -659,13 +711,13 @@ Other major classes designed for Japanese: \clearpage \appendix -\section{Examples of acceptable Japanese typesetting results} +\section{Code Gallery --- acceptable Japanese typesetting results} \subsection{A simple Japanese document} Using \LuaLaTeX: \begin{lstlisting} - \documentclass[book]{jlreq} + \documentclass[book]{jlreq}% loads luatexja.sty internally \begin{document} \chapter{日本語がメインのシンプルな文書} こんにちは,日本語に少しEnglishを含めてみます。 @@ -726,7 +778,7 @@ Using \upLaTeX\ (or \pLaTeX) + dvipdfmx: Using \LuaLaTeX: \begin{lstlisting} \documentclass[article]{jlreq} - \usepackage{jlreq-deluxe}% multi weight + \usepackage[deluxe]{luatexja-preset}% multi weight \begin{document} \section{簡単な文章} 通常のテキストにはSerifと明朝体を使います。 @@ -736,30 +788,22 @@ Using \LuaLaTeX: \end{document} \end{lstlisting} -If you are using \LuaLaTeX\ with classes other than \Pkg{jlreq}, -you can also use \Pkg{luatexja-preset}: -\begin{lstlisting} - \documentclass{ltjsarticle} - \usepackage[deluxe]{luatexja-preset}% multi weight - \begin{document} - ... -\end{lstlisting} - -Using \upLaTeX\ (or \pLaTeX) + dvipdfmx: +Using \upLaTeX\ (or \pLaTeX) + dvipdfmx with the \Pkg{jlreq} class: +the package \Pkg{jlreq-deluxe} is recommended. \begin{lstlisting} + \RequirePackage{plautopatch}% recommended \documentclass[article,dvipdfmx]{jlreq}% driver option \usepackage{jlreq-deluxe}% multi weight \begin{document} ... \end{lstlisting} -The package \Pkg{jlreq-deluxe} is relatively new, and it is -designed to be used with the \Pkg{jlreq} class. -Traditionally the \Pkg{otf} package has been widely used -for over a decade. +Traditionally, the \Pkg{otf} package (distributed as \Pkg{japanese-otf} +on CTAN/\TL) has been widely used for over a decade on (u)\pLaTeX. Using \upLaTeX\ + dvipdfmx: \begin{lstlisting} + \RequirePackage{plautopatch}% recommended \documentclass[uplatex,dvipdfmx]{jsarticle} \usepackage[deluxe]{otf}% multi weight \begin{document} @@ -768,13 +812,13 @@ Using \upLaTeX\ + dvipdfmx: Using \pLaTeX\ + dvipdfmx: \begin{lstlisting} + \RequirePackage{plautopatch}% recommended \documentclass[dvipdfmx]{jsarticle} \usepackage[deluxe]{otf}% multi weight \begin{document} ... \end{lstlisting} - \subsection{Vertical writing} As a Japanese version of \Pkg{lipsum}, here we use @@ -794,6 +838,7 @@ Using \LuaLaTeX: Using \upLaTeX\ (or \pLaTeX) + dvipdfmx: \begin{lstlisting} + \RequirePackage{plautopatch}% recommended \documentclass[article,tate,dvipdfmx]{jlreq}% driver option \usepackage{bxjalipsum} \begin{document} diff --git a/macros/latex/contrib/enotez/README b/macros/latex/contrib/enotez/README index 93aad12bac..f74ab1da5d 100644 --- a/macros/latex/contrib/enotez/README +++ b/macros/latex/contrib/enotez/README @@ -1,22 +1,22 @@ -------------------------------------------------------------------------- -the ENOTEZ package v0.10b 2020/01/16 +the ENOTEZ package v0.10c 2020/12/13 Endnotes for LaTeX2e -------------------------------------------------------------------------- Clemens Niederberger -Web: https://bitbucket.org/cgnieder/enotez/ +Web: https://github.com/cgnieder/enotez/ E-Mail: contact@mychemistry.eu -------------------------------------------------------------------------- Copyright 2012--2020 Clemens Niederberger This work may be distributed and/or modified under the -conditions of the LaTeX Project Public License, either version 1.3 +conditions of the LaTeX Project Public License, either version 1.3c of this license or (at your option) any later version. The latest version of this license is in http://www.latex-project.org/lppl.txt -and version 1.3 or later is part of all distributions of LaTeX -version 2005/12/01 or later. +and version 1.3c or later is part of all distributions of LaTeX +version 2008/05/04 or later. This work has the LPPL maintenance status `maintained'. diff --git a/macros/latex/contrib/enotez/enotez.sty b/macros/latex/contrib/enotez/enotez.sty index 4019b65791..a5d7c94e47 100644 --- a/macros/latex/contrib/enotez/enotez.sty +++ b/macros/latex/contrib/enotez/enotez.sty @@ -5,18 +5,18 @@ % % -------------------------------------------------------------------------- % Clemens Niederberger -% Web: https://bitbucket.org/cgnieder/enotez/ +% Web: https://github.com/cgnieder/enotez/ % E-Mail: contact@mychemistry.eu % -------------------------------------------------------------------------- % Copyright 2012--2020 Clemens Niederberger % % This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 +% conditions of the LaTeX Project Public License, either version 1.3c % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% and version 1.3c or later is part of all distributions of LaTeX +% version 2008/05/04 or later. % % This work has the LPPL maintenance status `maintained'. % @@ -31,8 +31,8 @@ \RequirePackage {expl3,xparse,l3keys2e,xtemplate} \ProvidesExplPackage {enotez} - {2020/01/16} - {0.10b} + {2020/12/13} + {0.10c} {Endnotes for LaTeX2e} % -------------------------------------------------------------------------- @@ -114,12 +114,9 @@ \skip_set_eq:NN \l__enotez_list_postamble_skip \medskipamount \int_new:N \g__enotez_endnote_id_int -\int_zero:N \g__enotez_endnote_id_int \int_new:N \g__enotez_endnote_mark_int -\int_zero:N \g__enotez_endnote_mark_int \newcounter {endnote} \int_new:N \g__enotez_list_printed_int -\int_zero:N \g__enotez_list_printed_int \int_new:N \l__enotez_tmpa_int \prop_new:N \g__enotez_endnote_text_prop @@ -330,7 +327,8 @@ \cs_new_protected:Npn \enotez@note #1#2#3#4#5#6#7 { - \tl_gset:cn {enotez@#1@note} {#2} + \tl_gclear_new:c {g__enotez_#1_note_tl} + \tl_gset:cn {g__enotez_#1_note_tl} {#2} \prop_gput:Nnn \g__enotez_endnote_mark_prop {#1} {#2} \prop_gput:Nnn \g__enotez_endnote_split_prop {#1} {#3} \prop_gput:Nnn \g__enotez_endnote_sect_prop {#1} {#4} @@ -345,7 +343,7 @@ \cs_set_protected:Npn \enotez@note #1#2#3#4#5#6#7 { \tl_set:Nn \l__enotez_change_tl {#2} - \tl_if_eq:cNF {enotez@#1@note} \l__enotez_change_tl + \tl_if_eq:cNF {g__enotez_#1_note_tl} \l__enotez_change_tl { \@latex@warning@no@line { Endnotes~may~have~changed.~Rerun~to~get~them~right. } @@ -1024,3 +1022,4 @@ - implement issue #9 2019/10/12 v0.10a - remove unnecessary package dependencies 2020/01/16 v0.10b - adapt to renaming of string case changing functions +2020/12/13 v0.10c - fix issue #23 diff --git a/macros/latex/contrib/enotez/enotez_en.pdf b/macros/latex/contrib/enotez/enotez_en.pdf Binary files differindex 42bbcede66..987c7545bd 100644 --- a/macros/latex/contrib/enotez/enotez_en.pdf +++ b/macros/latex/contrib/enotez/enotez_en.pdf diff --git a/macros/latex/contrib/enotez/enotez_en.tex b/macros/latex/contrib/enotez/enotez_en.tex index 637122aa0e..8fb1dcee81 100644 --- a/macros/latex/contrib/enotez/enotez_en.tex +++ b/macros/latex/contrib/enotez/enotez_en.tex @@ -15,12 +15,12 @@ % Copyright 2012--2020 Clemens Niederberger % % This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 +% conditions of the LaTeX Project Public License, either version 1.3c % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. +% and version 1.3c or later is part of all distributions of LaTeX +% version 2008/05/04 or later. % % This work has the LPPL maintenance status `maintained'. % @@ -33,7 +33,6 @@ % feel free to contact me. % -------------------------------------------------------------------------- \documentclass[load-preamble+]{cnltx-doc} -\usepackage[utf8]{inputenc} \usepackage{enotez} \setcnltx{ @@ -41,7 +40,7 @@ info = {Endnotes for \LaTeXe} , authors = Clemens Niederberger , email = contact@mychemistry.eu , - url = https://bitbucket.org/cgnieder/enotez/ , + url = https://github.com/cgnieder/enotez/ , pre-output = \setfnpct{dont-mess-around} , add-cmds = { @endnotemark, diff --git a/macros/latex/contrib/enotez/enotez_split_example.tex b/macros/latex/contrib/enotez/enotez_split_example.tex index 5959a0d3a3..904c1ddc8a 100644 --- a/macros/latex/contrib/enotez/enotez_split_example.tex +++ b/macros/latex/contrib/enotez/enotez_split_example.tex @@ -5,7 +5,7 @@ % % -------------------------------------------------------------------------- % Clemens Niederberger -% Web: https://bitbucket.org/cgnieder/enotez/ +% Web: https://github.com/cgnieder/enotez/ % E-Mail: contact@mychemistry.eu % -------------------------------------------------------------------------- % Copyright 2012--2020 Clemens Niederberger |