diff options
Diffstat (limited to 'macros/latex/contrib/koma-script/source/japanlco.dtx')
-rw-r--r-- | macros/latex/contrib/koma-script/source/japanlco.dtx | 363 |
1 files changed, 219 insertions, 144 deletions
diff --git a/macros/latex/contrib/koma-script/source/japanlco.dtx b/macros/latex/contrib/koma-script/source/japanlco.dtx index 1703f901da..c794644aef 100644 --- a/macros/latex/contrib/koma-script/source/japanlco.dtx +++ b/macros/latex/contrib/koma-script/source/japanlco.dtx @@ -1,8 +1,7 @@ -% \CheckSum{77} % \iffalse meta-comment % ====================================================================== % japanlco.dtx -% Copyright (c) Markus Kohm, 2008-2019 +% Copyright (c) Markus Kohm, 2008-2022 % % This file is part of the LaTeX2e KOMA-Script bundle. % @@ -18,44 +17,8 @@ % The Current Maintainer and author of this work is Markus Kohm. % % This work consists of all files listed in manifest.txt. -% ---------------------------------------------------------------------- -% japanlco.dtx -% Copyright (c) Markus Kohm, 2008-2019 -% -% Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz, -% Version 1.3c, verteilt und/oder veraendert werden. -% Die neuste Version dieser Lizenz ist -% http://www.latex-project.org/lppl.txt -% und Version 1.3c ist Teil aller Verteilungen von LaTeX -% Version 2005/12/01 oder spaeter und dieses Werks. -% -% Dieses Werk hat den LPPL-Verwaltungs-Status "author-maintained" -% (allein durch den Autor verwaltet). -% -% Der Aktuelle Verwalter und Autor dieses Werkes ist Markus Kohm. -% -% Dieses Werk besteht aus den in manifest.txt aufgefuehrten Dateien. % ====================================================================== -% \fi -% -% \CharacterTable -% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -% Digits \0\1\2\3\4\5\6\7\8\9 -% Exclamation \! Double quote \" Hash (number) \# -% Dollar \$ Percent \% Ampersand \& -% Acute accent \' Left paren \( Right paren \) -% Asterisk \* Plus \+ Comma \, -% Minus \- Point \. Solidus \/ -% Colon \: Semicolon \; Less than \< -% Equals \= Greater than \> Question mark \? -% Commercial at \@ Left bracket \[ Backslash \\ -% Right bracket \] Circumflex \^ Underscore \_ -% Grave accent \` Left brace \{ Vertical bar \| -% Right brace \} Tilde \~} -% -% \iffalse -%%% From File: $Id: japanlco.dtx 3256 2019-10-10 07:06:49Z kohm $ +%%% From File: $Id: japanlco.dtx 3690 2022-02-10 09:59:31Z kohm $ %<Ni&EARLY&LOW&head>%%% (run: Ni,EARLY,LOW,head) %<Ni&EARLY&LOW&body>%%% (run: Ni,EARLY,LOW,body) %<Ni&EARLY&HIGH&head>%%% (run: Ni,EARLY,HIGH,head) @@ -69,57 +32,96 @@ %<Kaku&LATE&LOW&head>%%% (run: Kaku,LATE,LOW,head) %<Kaku&LATE&LOW&body>%%% (run: Kaku,LATE,LOW,body) %<*dtx> -% \fi \ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi \begingroup \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}} - \filedate$Date: 2019-10-10 09:06:49 +0200 (Thu, 10 Oct 2019) $ + \filedate$Date: 2022-02-10 10:59:31 +0100 (Do, 10. Feb 2022) $ \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}} - \filerevision$Revision: 1962 $ + \filerevision$Revision: 3690 $ \endgroup \ProvidesFile{japanlco.dtx}[\filedate\space\filerevision\space KOMA-Script (letter class options)] -% \iffalse -\documentclass{scrdoc} -\usepackage[english]{babel} +\ifx\documentclass\undefined + \ifx\ifTopLevel\undefined + \input scrdocstrip.tex + \@@input scrkernel-version.dtx + \@@input scrstrip.inc + \KOMAdefVariable{COPYRIGHTFROM}{2007} + \generate{\usepreamble\defaultpreamble + \file{NipponEL.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{japanlco.dtx}{lco,Ni,EARLY,LOW,head}% + \from{japanlco.dtx}{lco,Ni,EARLY,LOW,body}% + }% + \file{NipponEH.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{japanlco.dtx}{lco,Ni,EARLY,HIGH,head}% + \from{japanlco.dtx}{lco,Ni,EARLY,HIGH,body}% + }% + \file{NipponLL.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{japanlco.dtx}{lco,Ni,LATE,LOW,head}% + \from{japanlco.dtx}{lco,Ni,LATE,LOW,body}% + }% + \file{NipponLH.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{japanlco.dtx}{lco,Ni,LATE,HIGH,head}% + \from{japanlco.dtx}{lco,Ni,LATE,HIGH,body}% + }% + \file{NipponRL.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{japanlco.dtx}{lco,Ni,RIGHT,LOW,head}% + \from{japanlco.dtx}{lco,Ni,RIGHT,LOW,body}% + }% + \file{KakuLL.lco}{% + \from{scrkernel-version.dtx}{trace}% + \from{japanlco.dtx}{lco,Kaku,LATE,LOW,head}% + \from{japanlco.dtx}{lco,Kaku,LATE,LOW,body}% + }% + }% + \@@input scrstrop.inc + \fi +\else + \let\endbatchfile\relax +\fi +\endbatchfile +\documentclass[USenglish]{koma-script-source-doc} +\usepackage{babel} \usepackage{graphicx} -\CodelineIndex -\RecordChanges -\GetFileInfo{japanlco.dtx} -\title{\KOMAScript{} \partname\ \texttt{\filename}% - \footnote{This is \fileversion\ of file \texttt{\filename}.}} -\date{\filedate} -\author{Markus Kohm} - \begin{document} - \maketitle - \tableofcontents - \DocInput{\filename} + \DocInput{japanlco.dtx} \end{document} %</dtx> % \fi % % \changes{v2.98}{2007/11/13}{first version based on lco files from Gernot -% Hassenplfug} +% Hassenpflug} +% \changes{v3.36}{2022/01/21}{switch over to \cls*{koma-script-source-doc}} +% \changes{v3.36}{2022/01/21}{using \cs{setplength} and \cs{addtoplength} +% instead of \cs{@setplength} and \cs{@addtoplength}} +% \changes{v3.36}{2022/02/02}{self-extracting} +% \changes{v3.36}{2022/02/02}{extended documentation} +% +% \GetFileInfo{japanlco.dtx} +% \title{\href{https://komascript.de}{\KOMAScript} \partname\ +% \texttt{\filename}} +% \date{Version \fileversion{} of \filedate} +% \author{Markus Kohm} +% \maketitle +% \tableofcontents % % \section{Option Files for Japanese Letters} % -% Gernot Hassenpflug wrote a lot of lco files for use of Japanese envelope -% formats. Markus Kohm, the author of \KOMAScript, addapted them to an -% extended version of \textsf{scrlttr2} and wrote a dtx file with the moste -% recent lco files. Table~\ref{tab:japan.envelopes} shows all lco files of the -% supported envelopes with their datas. +% Gernot Hassenpflug wrote a lot of \file{lco}-files for use of Japanese +% envelope formats. Markus Kohm, the author of \KOMAScript, adapted them to +% an extended version of \cls*{scrlttr2} and wrote a \file{dtx}-file with the +% moste recent \file{lco}-files. Table~\ref{tab:japan.envelopes} shows all +% \file{lco}-files of the supported envelopes with their datas. % % \begin{table} -%^^A x=22, w=90, y=12, h=45 NipponEL -%^^A x=22, w=90, y=12, h=55 NipponEH -%^^A x=25, w=90, y=12, h=45 NipponLL -%^^A x=25, w=90, y=12, h=55 NipponLH -%^^A x=98, w=90, y=28, h=45 NipponRL -%^^A x=25, w=90, y=24, h=45 KakuLL % \begin{tabular}{@{}llllllll@{}} % \hline -% lco file & \multicolumn3{l}{Envelope} & \multicolumn4{l@{}}{Window} \\ +% \file{lco}-file & \multicolumn3{l}{Envelope} & \multicolumn4{l@{}}{Window} \\ % & Name & Length & Width & H-pos & V-pos & Width & Height\\ % \cline{1-3}\cline{4-8} % \texttt{NipponEL} & @@ -148,7 +150,10 @@ % \label{tab:japan.envelopes} % \end{table} % -%\iftrue +% \iftrue +% The following pages show images of example envelopes. For more information +% see the English \file{scrguien.pdf} or the German \file{scrguide.pdf}. +% % \newcommand\japanenvelope[7]{% % \begingroup % \setlength{\unitlength}{1mm}%^^A @@ -202,20 +207,18 @@ % \fi %\fi % -% \StopEventually{\PrintIndex\PrintChanges} +% \StopEventually{\PrintIndex} % -% \iffalse +% \section{Implementation} +% \begin{macrocode} %<*lco> -% \fi -% -% \subsubsection{The File Header} +% \end{macrocode} % -% \iffalse -%<*head> -% \fi +% \subsection{The File Header} % % Declaration of the file. % \begin{macrocode} +%<*head> \ProvidesFile{% %<Ni> Nippon% %<Kaku> Kaku% @@ -224,13 +227,16 @@ %<RIGHT> R% %<LOW> L% %<HIGH> H% -}[\KOMAScriptVersion\space Japanese letter-class-option] +}[% +%!KOMAScriptVersion +Japanese letter-class-option] % \end{macrocode} % -% \begin{macro}{\LCOWarningNoLine} -% \begin{macro}{\LCOWarning} +% \begin{command}{\LCOWarningNoLine} +% \begin{command}{\LCOWarning} % We need macros that are similar to |\ClassWarningNoLine| or % |\PackageWarningNoLine| and |\ClassWarning| or |\PackageWarning| +% \begin{macrocode} \providecommand*\LCOWarningNoLine[2]{% \LCOWarning{#1}{#2\@gobble}% } @@ -241,20 +247,19 @@ Letter class option #1 Warning: #2% }% } -% \end{macro} -% \end{macro} -% -% \iffalse %</head> -%<*body> -% \fi +% \end{macrocode} +% \end{command} +% \end{command} +% % -% \subsubsection{Main-Part} +% \subsection{Main-Part} % % Check the class. -% \changes{v3.25a}{2018/04/17}{check not only for \textsf{scrlttr2} but also -% for \textsf{scrletter}}%^^A +% \changes{v3.25a}{2018/04/17}{check not only for \cls*{scrlttr2} but also +% for \pkg*{scrletter}}%^^A % \begin{macrocode} +%<*body> \@ifundefined{scr@fromname@var}{% \LCOWarningNoLine{% %<Ni> Nippon% @@ -288,62 +293,128 @@ % \end{macrocode} % % All the values -% \changes{v3.03}{2009/03/04}{set term of variablen \texttt{fromzipcode}} +% \begin{variable}{fromzipcode} +% \changes{v3.03}{2009/03/04}{set term of variable \texttt{fromzipcode}} % \begin{macrocode} \setkomavar*{fromzipcode}{J} % \end{macrocode} -%^^A x=22, w=90, y=12, h=45 NipponEL -%^^A x=22, w=90, y=12, h=55 NipponEH -%^^A x=25, w=90, y=12, h=45 NipponLL -%^^A x=25, w=90, y=12, h=55 NipponLH -%^^A x=98, w=90, y=28, h=45 NipponRL -%^^A x=25, w=90, y=24, h=45 KakuLL +% \end{variable} +% \begin{pseudolength}{foldmarkhpos, +% tfoldmarkvpos,tfoldmarklength, +% mfoldmarkvpos,mfoldmarklength, +% bfoldmarkvpos,bfoldmarklength, +% foldmarkvpos,lfoldmarkhpos} +% The fold marks. All of them are universal for Japanese \file{lco}-files. +% \begin{macrocode} +\setplength{foldmarkhpos}{3.5mm} +\setplength{tfoldmarkvpos}{83mm} +\setplength{tfoldmarklength}{4mm} +\setplength{mfoldmarkvpos}{116mm} +\setplength{mfoldmarklength}{2mm} +\setplength{bfoldmarkvpos}{232mm} +\setplength{bfoldmarklength}{2mm} +\setplength{foldmarkvpos}{3.5mm} +\setplength{lfoldmarkhpos}{202mm} +% \end{macrocode} +% \end{pseudolength} +% \begin{pseudolength}{toaddrhpos,toaddrvpos,toaddrwidth,toaddrheight} +% The size and position of the address window. These values are the main +% difference of the envelopes. The original values (all in cm) by Gernot: +% \begin{center} +% \begin{tabular}{lcccc} +% \hline +% Type & x & w & y & h \\ +% \hline +% NipponEL & 22 & 90 & 12 & 45 \\ +% NipponEH & 22 & 90 & 12 & 55 \\ +% NipponLL & 25 & 90 & 12 & 45 \\ +% NipponLH & 25 & 90 & 12 & 55 \\ +% NipponRL & 98 & 90 & 28 & 45 \\ +% KakuLL & 25 & 90 & 24 & 45 \\ +% \hline +% \end{tabular} +% \end{center} +% \begin{macrocode} +%<EARLY>\setplength{toaddrhpos}{22mm} +%<LATE>\setplength{toaddrhpos}{25mm} +%<RIGHT>\setplength{toaddrhpos}{-22mm} +\setplength{toaddrwidth}{90mm} +%<Ni&!RIGHT>\setplength{toaddrvpos}{12mm} +%<Ni&RIGHT>\setplength{toaddrvpos}{28mm} +%<Kaku>\setplength{toaddrvpos}{24mm} +%<LOW>\setplength{toaddrheight}{40mm} +%<HIGH>\setplength{toaddrheight}{50mm} +% \end{macrocode} +% \end{pseudolength} +% \begin{pseudolength}{toaddrindent,backaddrheight, +% specialmailindent,specialmailrightindent} +% These are also inside the address window and same for all Japanese +% envelopes. +% \begin{macrocode} +\setplength{toaddrindent}{\z@} +\setplength{backaddrheight}{5mm} +\setplength{specialmailindent}{\fill} +\setplength{specialmailrightindent}{1em} +% \end{macrocode} +% \end{pseudolength} +% \begin{pseudolength}{locwidth,locheight} +% The location field also depends on the address field. % \begin{macrocode} -\@setplength{foldmarkhpos}{3.5mm} -\@setplength{tfoldmarkvpos}{83mm} -\@setplength{tfoldmarklength}{4mm} -\@setplength{mfoldmarkvpos}{116mm} -\@setplength{mfoldmarklength}{2mm} -\@setplength{bfoldmarkvpos}{232mm} -\@setplength{bfoldmarklength}{2mm} -\@setplength{foldmarkvpos}{3.5mm} -\@setplength{lfoldmarkhpos}{202mm} -%<!Ni|!RIGHT>\@setplength{refvpos}{69mm} -%<Ni&RIGHT>\@setplength{refvpos}{84mm} -\@setplength{refaftervskip}{\baselineskip} -%<EARLY>\@setplength{toaddrhpos}{22mm} -%<LATE>\@setplength{toaddrhpos}{25mm} -%<RIGHT>\@setplength{toaddrhpos}{-22mm} -\@setplength{toaddrwidth}{90mm} -%<Ni&!RIGHT>\@setplength{toaddrvpos}{12mm} -%<Ni&RIGHT>\@setplength{toaddrvpos}{28mm} -%<Kaku>\@setplength{toaddrvpos}{24mm} -%<LOW>\@setplength{toaddrheight}{40mm} -%<HIGH>\@setplength{toaddrheight}{50mm} -\@setplength{toaddrindent}{\z@} -\@setplength{backaddrheight}{5mm} -\@setplength{specialmailindent}{\fill} -\@setplength{specialmailrightindent}{1em} -\@setplength{locwidth}{\z@} -%<Ni>\@setplength{locheight}{55mm}% -%<Kaku>\@setplength{locheight}{45mm}% -\@setplength{firstheadvpos}{8mm} -\@setplength{firstheadwidth}{\paperwidth} +\setplength{locwidth}{\z@} +%<Ni>\setplength{locheight}{55mm}% +%<Kaku>\setplength{locheight}{45mm}% +% \end{macrocode} +% \end{pseudolength} +% \begin{pseudolength}{refvpos,refwidth,refaftervskip} +% While the position of the reference line also depends on the address field, +% the space below it is fix. The zero of \plen{revwidth} is a magic. See +% \file{scrkernel-notepaper.dtx} for more information. +% \begin{macrocode} +%<!Ni|!RIGHT>\setplength{refvpos}{69mm} +%<Ni&RIGHT>\setplength{refvpos}{84mm} +\setplength{refaftervskip}{\baselineskip} +\setplength{refwidth}{\z@} +% \end{macrocode} +% \end{pseudolength} +% \begin{pseudolength}{firstheadvpos,firstheadwidth} +% The header also depends on the address field. This is the reason we have +% not defined it first, despite it is the first field. +% \begin{macrocode} +\setplength{firstheadvpos}{8mm} +\setplength{firstheadwidth}{\paperwidth} \ifdim \useplength{toaddrhpos}>\z@ - \@addtoplength[-2]{firstheadwidth}{\useplength{toaddrhpos}} + \addtoplength[-2]{firstheadwidth}{\useplength{toaddrhpos}} \else - \@addtoplength[2]{firstheadwidth}{\useplength{toaddrhpos}} + \addtoplength[2]{firstheadwidth}{\useplength{toaddrhpos}} \fi -\@setplength{firstfootwidth}{\useplength{firstheadwidth}} -\@setplength{firstfootvpos}{\paperheight} -\@addtoplength{firstfootvpos}{-16mm} -\@setplength{refwidth}{\z@} -\@setplength{sigindent}{\z@} -\@setplength{sigbeforevskip}{2\baselineskip} +% \end{macrocode} +% \end{pseudolength} +% \begin{pseudolength}{firstfootwidth,firstfootvpos} +% The width of the footer depends on the width of the header. The position +% depends on the paper height. +% \begin{macrocode} +\setplength{firstfootwidth}{\useplength{firstheadwidth}} +\setplength{firstfootvpos}{\paperheight} +\addtoplength{firstfootvpos}{-16mm} +% \end{macrocode} +% \end{pseudolength} +% \begin{pseudolength}{sigindent,sigbeforevskip} +% Values of the signature +% \begin{macrocode} +\setplength{sigindent}{\z@} +\setplength{sigbeforevskip}{2\baselineskip} +% \end{macrocode} +% \end{pseudolength} +% \begin{command}{\raggedsignature} +% The signature is centered, but maybe this should be changed to +% \cs{raggedright}? +% \begin{macrocode} \let\raggedsignature=\centering % \end{macrocode} +% \end{command} % -% Additional settings: +% \begin{option}{fromalign} +% The default alignment of the sender is in the location field. % \begin{macrocode} \ifcase\@alignfrom \KOMAoptions{fromalign=locationright}% @@ -353,18 +424,22 @@ \KOMAoptions{fromalign=locationright}% \fi % \end{macrocode} +% \end{option} % -% \iffalse +% \begin{macrocode} %</body> %</lco> -% \fi +% \end{macrocode} % % \Finale +% \PrintChanges % \endinput -% -% end of file `japanlco.dtx' -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: +% Local Variables: +% mode: doctex +% ispell-local-dictionary: "en_US" +% eval: (flyspell-mode 1) +% TeX-master: t +% TeX-engine: luatex-dev +% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx")) +% End: |