texlive[47703] Master: endnotesj (13may18)

commits+karl at tug.org commits+karl at tug.org
Sun May 13 23:53:15 CEST 2018


Revision: 47703
          http://tug.org/svn/texlive?view=revision&revision=47703
Author:   karl
Date:     2018-05-13 23:53:15 +0200 (Sun, 13 May 2018)
Log Message:
-----------
endnotesj (13may18)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/endnotesj/
    trunk/Master/texmf-dist/doc/latex/endnotesj/LICENSE
    trunk/Master/texmf-dist/doc/latex/endnotesj/Makefile
    trunk/Master/texmf-dist/doc/latex/endnotesj/README.md
    trunk/Master/texmf-dist/doc/latex/endnotesj/endnotesj-ja.pdf
    trunk/Master/texmf-dist/doc/latex/endnotesj/endnotesj-ja.tex
    trunk/Master/texmf-dist/tex/latex/endnotesj/
    trunk/Master/texmf-dist/tex/latex/endnotesj/endnotesj.sty
    trunk/Master/tlpkg/tlpsrc/endnotesj.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/endnotesj/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/endnotesj/LICENSE	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/endnotesj/LICENSE	2018-05-13 21:53:15 UTC (rev 47703)
@@ -0,0 +1,27 @@
+Copyright (c) 2016-2018 Hironobu Yamashita
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its contributors
+  may be used to endorse or promote products derived from this software
+  without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Added: trunk/Master/texmf-dist/doc/latex/endnotesj/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/latex/endnotesj/Makefile	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/endnotesj/Makefile	2018-05-13 21:53:15 UTC (rev 47703)
@@ -0,0 +1,26 @@
+KANJI = -kanji=utf8
+FONTMAP = -f ipaex.map -f ptex-ipaex.map
+TEXMF = $(shell kpsewhich -var-value=TEXMFHOME)
+
+all: endnotesj-ja.pdf
+
+.SUFFIXES: .tex .dvi .pdf
+.tex.dvi:
+	platex $(KANJI) $<
+	platex $(KANJI) $<
+	rm *.aux *.log
+.dvi.pdf:
+	dvipdfmx $(FONTMAP) $<
+
+.PHONY: install clean
+install:
+	mkdir -p ${TEXMF}/doc/latex/endnotesj
+	cp ./Makefile ${TEXMF}/doc/latex/endnotesj/
+	cp ./LICENSE ${TEXMF}/doc/latex/endnotesj/
+	cp ./README.md ${TEXMF}/doc/latex/endnotesj/
+	cp ./*.pdf ${TEXMF}/doc/latex/endnotesj/
+	cp ./*.tex ${TEXMF}/doc/latex/endnotesj/
+	mkdir -p ${TEXMF}/tex/latex/endnotesj
+	cp ./*.sty ${TEXMF}/tex/latex/endnotesj/
+clean:
+	rm -f *.dvi *.pdf


Property changes on: trunk/Master/texmf-dist/doc/latex/endnotesj/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/endnotesj/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/endnotesj/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/endnotesj/README.md	2018-05-13 21:53:15 UTC (rev 47703)
@@ -0,0 +1,25 @@
+# endnotesj
+
+This bundle provides customized styles for endnote
+to be used with Japanese documents (pLaTeX, upLaTeX and LuaLaTeX).
+
+## Installation
+
+- *.sty -> $TEXMF/tex/latex/endnotesj
+- *.tex, *.pdf -> $TEXMF/doc/latex/endnotesj
+
+## Repository
+
+The bundle is maintained on GitHub:
+https://github.com/aminophen/endnotesj
+
+## License
+
+The bundle may be distributed and/or modified under the terms of
+the 3-clause BSD license (see [LICENSE](./LICENSE)).
+
+## Release Date
+
+2018-05-13
+
+Hironobu Yamashita


Property changes on: trunk/Master/texmf-dist/doc/latex/endnotesj/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/endnotesj/endnotesj-ja.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/endnotesj/endnotesj-ja.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/endnotesj/endnotesj-ja.pdf	2018-05-13 21:52:41 UTC (rev 47702)
+++ trunk/Master/texmf-dist/doc/latex/endnotesj/endnotesj-ja.pdf	2018-05-13 21:53:15 UTC (rev 47703)

Property changes on: trunk/Master/texmf-dist/doc/latex/endnotesj/endnotesj-ja.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/endnotesj/endnotesj-ja.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/endnotesj/endnotesj-ja.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/endnotesj/endnotesj-ja.tex	2018-05-13 21:53:15 UTC (rev 47703)
@@ -0,0 +1,232 @@
+%# -*- coding: utf-8 -*-
+\ifdefined\epTeXinputencoding % defined in e-pTeX (> TL2016)
+  \epTeXinputencoding utf8    % ensure utf-8 encoding for platex
+\fi
+
+%
+%  日本語論文用 後註生成マクロ for pLaTeX2e 付属ドキュメント
+%
+%  endnotesj.sty v3.0 系列は、熊本学園大学経済学部の
+%  小川弘和さんによる endnotesj.sty 2003/02/12 v2.1 に対し、
+%  許可を得て山下弘展がいくつかの修正・拡張を施したものです。
+%
+%  この文書は、原著者である小川さんの文書
+%    aboutendnotesj.sjis
+%  を山下が LaTeX ソース化し、適宜記述を追加したものです。
+%
+%  元のファイル (v2.1) は、2016 年 9 月 8 日に
+%    JIS X 0212 for pTeX
+%      http://www2.kumagaku.ac.jp/teacher/herogw/
+%  から取得しました。著作表記は、以下のとおりでした。
+%
+%  =============================================================
+%  改造者:小川弘和(熊本学園大学経済学部)
+%    mail:dokuroishi at mac.com,herogw at kumagaku.ac.jp
+%     web:http://homepage.mac.com/dokuroryokan/index.html
+%         http://www2.kumagaku.ac.jp/teacher/herogw/index.html
+%
+%  based on "endnotes.sty" written by John Lavagnino
+%                                  lav at brandeis.bitnet, 9/23/88
+%   Department of English and American Literature,
+%                                          Brandeis University
+%  =============================================================
+%
+
+\documentclass[a4paper]{jsarticle}
+\usepackage{doc}
+\usepackage{endnotesj}
+\GetFileInfo{endnotesj.sty}
+\def\Lpack#1{\textsf{#1}}
+\def\Lopt#1{\texttt{#1}}
+\title{\Lpack{\filename} \fileversion\\
+       日本語論文用 後註生成マクロ}
+\author{小川 弘和(熊本学園大学経済学部)\\
+        modified by 山下 弘展}
+\date{\filedate}
+\begin{document}
+
+\maketitle
+
+日本史・国文学関係論文作成に必要な、縦型の“(連数字)”形式
+註番号および、複数行にわたる註部分テキストの2行目以降を、先頭行
+テキスト開始位置に揃える表記を可能とした、後註生成マクロです。
+縦組論文での使用を意図して作成していますが、横組論文でもその
+まま使用可能です。
+
+このバージョン(\fileversion)は、旧版との互換性を極力維持しつつ、
+内部マクロを本家(\Lpack{endnotes.sty})最新版に合わせて更新し、さらに
+機能拡張を施したものです。旧版同様にp\LaTeX/up\LaTeX{}で動作する
+ことに加え、Lua\LaTeX\ (Lua\TeX-ja)にも対応しています。
+最新版はGitHubリポジトリ
+\begin{verbatim}
+  https://github.com/aminophen/endnotesj
+\end{verbatim}
+で管理しています。
+
+\section{コマンド・マニュアル}
+
+コマンド自体はオリジナルである\Lpack{endnotes.sty}と同じです。
+
+\begin{itemize}
+\item \verb+\endnote{註}+\\
+  本文中に挿入することで自動的に、\verb+{}+に挟まれたテキストを、
+  連番を付した後註として扱います。つまり、このコマンドの埋め込
+  まれた位置の本文肩に註番号を生成するとともに、後に解説する
+  \verb+\theendnotes+コマンドによって、\verb+{}+に挟まれたテキ
+  ストの冒頭に同様の番号を付したうえで、後註として列挙するわけ
+  です。
+\item \verb+\endnote[数字]{註}+\\
+  \verb+[数字]+部分に任意の数字を埋め込むことで、数字で指定した
+  数を註番号とする後註を生成します。
+  このコマンドによって生成された註は、上記\verb+\endnote{註}+に
+  よって生成される註とは別グループとして扱われるため、そちら
+  の番号に影響を与えることはありません。
+  よって表記を改良すれば補注用として利用可能ですが、現状では
+  通常の註と同スタイルのため紛らわしいので、使用は勧められません。
+\item \verb+\endnotemark[数字]+\\
+  実際には後註を生成せぬままで、本文肩に任意の註番号を生成します。
+  また、\verb+[数字]+オプションを用いた場合、以降の註番号は任意
+  の番号にスキップしたうえで生成されていくことになります。
+\item \verb+\endnotetext[数字]{註}+\\
+  番号を表立って表記せぬ後註を生成します。このコマンドの場合
+  でも、内部的には註番号はカウントされています。
+  なお[数字]オプションの機能は\verb+\endnotemark+と同様です。
+\item \verb+\theendnotes+\\
+  本文中に挿入することでその位置に、それまで\verb+\endnote+等の
+  コマンドによって生成された後註を列挙表示します。
+  なお、\verb+\setcounter{endnote}{0}+コマンドを用いると、その
+  後の註番号が再び(1)より開始されますので、本コマンドとの組合せ
+  によって、容易に章・節ごとの後註が作成できます。
+\end{itemize}
+
+\section{パッケージ・オプション}
+
+次に、パッケージのオプションを説明します。
+これらは\Lpack{endnotesj.sty}独自のものです。
+
+\subsection{注釈印の書式}
+
+プリアンブルで
+\begin{verbatim}
+  \usepackage{endnotesj}
+\end{verbatim}
+とすることで、縦組用の“(連数字)”型注(『日本史研究』等の形式。
+本文中では、注挿入指定位置直前の文字の直上に注No.を配置する。)が
+使用可能に、
+\begin{verbatim}
+  \usepackage[yoko]{endnotesj}
+\end{verbatim}
+とすることで、横組用の“(数字)”型注(本文中では、注挿入指定
+位置直前の文字の直後上方に、ほぼ1/4倍角で注No.を配置する。)が
+使用可能に、
+\begin{verbatim}
+  \usepackage[single]{endnotesj}
+\end{verbatim}
+とすることで、横組用の“数字)”型注(『歴史学研究』等の形式。
+本文中では、注挿入指定位置直前の文字の直後上方に、ほぼ1/4倍角で
+注No.を配置する。)が使用可能になります。
+
+\subsection{\Lpack{otf}パッケージを用いた注釈印の書式}
+
+\Lpack{otf}パッケージをインストールしてある環境であれば、
+注番号の数字に詰数字を用い、より奇麗に表示可能です。
+この機能を使うには
+\begin{verbatim}
+  \usepackage[otf]{endnotesj}
+\end{verbatim}
+と指定します。\Lopt{otf}はv3.0で新設されたオプションで、
+旧バージョンv2.1にあった\Lopt{utf}も同じ意味になります。
+
+このオプションを指定すると、
+\Lpack{otf.sty}および\Lpack{ajmacros.sty}で定義されている
+\verb+\UTF+・\verb+\ajTumesuji+コマンドに動作が依存します。
+そのため、これらのパッケージを自動で読み込みます
+\footnote{古い環境で\Lpack{utf.sty}および\Lpack{utfmacro.sty}しか
+利用できない場合は、これらにフォールバックします。}。このため、
+別途これらのパッケージを\verb+\usepackage+する必要はありませんが、
+\Lpack{otf.sty}の各種オプション(\Lopt{expert}など)を用いたい場合は
+\Lpack{endnotesj.sty}より\emph{前}に指定してください。
+
+\subsection{後注列挙部分のタイトル}
+
+ここまでの節で紹介したオプション以外が\verb+\usepackage+の
+オプションに指定された場合は、それを後注列挙部分のタイトルと
+して用います。たとえば、
+\begin{verbatim}
+  \usepackage[注]{endnotesj}
+\end{verbatim}
+オプションで、文末の後注列挙部分の先頭に「注」、
+\begin{verbatim}
+  \usepackage[註]{endnotesj}
+\end{verbatim}
+オプションで「註」と表記されます(v2.1以前は「注」と「註」のみ
+サポートしていましたが、v3.0以降は「注釈」や「後註」なども
+自由に指定できます)。オプション無指定の場合には、何も表記せぬ
+まま、注が列挙されていきます。
+
+\section{行数・桁数指定マクロ}
+
+\Lpack{endnotesj.sty}には、
+『\LaTeX{}スタイル・マクロ ポケットリファレンス』(技術評論社)、
+いわゆるポケリで紹介されている行数・桁数指定マクロも組み込んで
+あり、使用することが可能です。用紙サイズにあわせて自動的に字間
+配置を調整する\TeX{}には本来は、行数・桁数指定は馴染まないので
+すが、投稿規定上、行数・文字数を固定する必要がある場合に用いて
+ください。
+
+基本的な記述法は以下の通りです。
+\begin{verbatim}
+  \kcharparline{30}
+  \begin{document}
+  \linesparpage{20}
+\end{verbatim}
+
+\verb+\kcharparline{30}+が、用紙縦方向の文字数指定。
+この場合、30文字に指定しています。
+なお、このコマンドはプリアンプルで指定します。
+
+\verb+\linesparpage{20}+が、用紙横方向の文字数指定。
+ここでは、20文字に指定しています。こちらは本文で指定するか、
+\verb+\AtBeginDocument{}+に入れて使用します。
+
+\section{旧版(v2.1以前)との違い}
+
+% ---- 細かい挙動なので削除 ----
+% v2.1以前とv3.0以降の唯一の違いとして、v2.1では「注」と「註」を
+% 同時に指定した場合には「注」が優先されましたが、v3.0以降は
+% 「複数指定されたうちの最後の一つ」が優先されます。同時に指定
+% するという使い方は全く無意味でしたから、影響はないと思います。
+
+% ----- 2018 年となっては 15 年以上前の話なので削除 -----
+% なお、v2よりもっと古く配布していた、横組用“数字)”型表記用
+% マクロendnotesjs.styは、endnotesj.styに機能が改良統合された
+% ため、廃止しました。また、以前は本文肩註番号表記の実現に際し、
+% 金水敏氏が作成された訓点資料表記用マクロkunten2e.styに定義され
+% ている\verb+\MigiNakaTn+コマンドに依存しておりましたが、記述を
+% 見直すことにより、非依存となりました。
+
+旧版(v2.1)からv3.0での変更点は、以下のとおりです。
+\begin{itemize}
+\item パッケージのコード本体からASCII文字以外を排除。
+\item 後註内部マクロを最新の\Lpack{endnotes.sty}%
+  \footnote{Date of this version: 15 January 2003.}ベースに更新。
+  これにより、例えば本文中で合印直前で行分割することがあった問題が
+  解決しました。
+\item  パッケージのオプションを拡張。
+  組方向(縦・横)に応じて適切な注の印が出る\Lopt{auto-tateyoko}を
+  新設し、これをデフォルトに設定しました。
+  また、「注」「註」以外のタイトル形式を可能になりました。
+\item もし本家パッケージ(\Lpack{endnotes.sty})が存在する場合で、
+  \Lpack{endnotesj.sty}が読み込まれた時点で未読み込みならば、
+  読み込み済み扱いするようにした(そうしないと、後で意図せず
+  読み込まれて、日本語対応コードが上書きされるかもしれないため。)
+\item \verb+\linesparpage+の修正(行間の数ではなく行数で割って
+  いたため、行数が合わないことがありました。また、\verb+\topskip+の
+  分を差し引いておらず、正しい行間隔になっていませんでした。)
+\end{itemize}
+
+\section{実際のスタイル見本(日本語版)}
+
+スタイル見本はGitHubのsamplesディレクトリを参照してください。
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/endnotesj/endnotesj-ja.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/endnotesj/endnotesj.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/endnotesj/endnotesj.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/endnotesj/endnotesj.sty	2018-05-13 21:53:15 UTC (rev 47703)
@@ -0,0 +1,664 @@
+%
+% Package ``endnotesj.sty'' for endnotes in Japanese articles,
+% written by Hirokazu OGAWA and Hironobu YAMASHITA
+%
+% This package is part of the endnotesj bundle.
+% https://github.com/aminophen/endnotesj
+%
+% Authors:
+%  * Hirokazu OGAWA (Kumamoto Gakuen University)
+%      Mail: herogw at kumagaku.ac.jp
+%       Web: http://www2.kumagaku.ac.jp/teacher/herogw/index.html
+%  * Hironobu YAMASHITA
+%      Mail: h.y.acetaminophen at gmail.com
+%      Github: @aminophen
+%
+% This work is based on ``endnotes.sty'' (15 January 2003)
+% written by John Lavagnino.
+%
+% ****************************************
+% *           ENDNOTE MACROS             *
+% ****************************************
+%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{endnotesj}
+  [2018/05/13 v3.0 endnotesj (H. Ogawa and H. Yamashita)]
+%
+%% Requirements: engine & format
+%
+%  This package supports pTeX/upTeX and LuaTeX-ja only;
+%  otherwise, throw an error
+%  When the error is ignored, fall back to endnotes.sty and exit
+%  (--> unsupported feature, of course)
+\ifx\pfmtname\@undefined
+  \expandafter\ifx\csname ver at luatexja.sty\endcsname\relax
+    \PackageError{endnotesj}{%
+      Unsupported engine detected!\MessageBreak
+      Please use pLaTeX, upLaTeX or LuaTeX-ja instead}{%
+      I will load `endnotes.sty' instead, but
+      the result will be undesired.}
+    \RequirePackage{endnotes}
+  \expandafter\expandafter\expandafter\endinput\expandafter\fi
+\fi
+%
+%  Ensure compatibility in units between pTeX/upTeX and LuaTeX-ja
+%   * \endnj at zw = width of the current full-width Japanese font
+%                 (zen-kaku width)
+%   * \endnj at zh = height of the current full-width Japanese font
+%                 (zen-kaku height)
+\ifx\directlua\@undefined
+  % pTeX/upTeX should have `zw' and `zh'
+  \def\endnj at zw{zw}
+  \def\endnj at zh{zh}
+\else
+  % LuaTeX-ja should have `\zw` and `\zh'
+  \def\endnj at zw{\zw}
+  \def\endnj at zh{\zh}
+\fi
+%
+%% Ensure that endnotes.sty is NOT loaded after this package
+%
+\@ifpackageloaded{endnotes}{}{%
+  \IfFileExists{endnotes.sty}{%
+    \expandafter\def\csname ver at endnotes.sty\endcsname{}}{}}
+%
+%% Initialize \notesname
+%
+\def\notesname{} % should be empty by default (endnotesj.sty original)
+%
+%% Package options (endnotesj original)
+%%  * Note that the order of declarations is also important, especially
+%%    for options which compete with each other (e.g. tate/yoko)
+%%    cf. ltclass.dtx
+%%      "In the case of \ProcessOptions, they are processed in the
+%%       order that they were declared in the class or package."
+%
+%  Directions - force yoko (horizontal) or tate (vertical)?
+\newif\if at endnj@tate \@endnj at tatefalse
+\newif\if at endnj@yoko \@endnj at yokofalse
+\newif\if at endnj@autotateyoko \@endnj at autotateyokofalse
+\DeclareOption{tate}{\@endnj at autotateyokofalse\@endnj at tatetrue\@endnj at yokofalse}
+\DeclareOption{yoko}{\@endnj at autotateyokofalse\@endnj at yokotrue\@endnj at tatefalse}
+%
+%  Use conditional definitions for switching marks depending on
+%  vertical/horizontal Japanese writing direction
+\DeclareOption{auto-tateyoko}{\@endnj at autotateyokotrue\@endnj at tatefalse\@endnj at yokofalse}
+%
+%  Brackets - single or twin?
+\newif\if at endnj@single \@endnj at singlefalse
+\DeclareOption{twin}{\@endnj at singlefalse} % => default
+\DeclareOption{single}{\@endnj at singletrue}
+%
+%  Use utf/otf package?
+\newif\if at endnj@utf \@endnj at utffalse
+\DeclareOption{utf}{\@endnj at utftrue}
+\DeclareOption{otf}{\@endnj at utftrue}
+%
+%  `ver3' mode - Use improved styles of \@makeenmark (endnote marks) and
+%                \enoteformat (the endnote format)
+\def\endnj at vermode{3}
+\DeclareOption{ver3}{\def\endnj at vermode{3}} % => future default
+%
+%  `ver2' mode - For backward compatibility: use styles of \@makeenmark
+%                and \enoteformat which are inherited from previous
+%                versions of endnotesj.sty
+\DeclareOption{ver2}{\typeout{*** endnotesj version 2 compatibility mode ***}%
+                     \def\endnj at vermode{2}}
+%
+%  Other options are unknown, however endnotesj.sty accepts only one
+%  unknown option, which is then regarded as \notesname (= endnote section title)
+%  If more than one unknown options are requested, the last one is chosen;
+%  the others are simply ignored, so throw an error (for fear of misspelling)
+\def\endnj at temp@ptions{}
+\DeclareOption*{\ifx\endnj at temp@ptions\@empty
+                  \edef\endnj at temp@ptions{\CurrentOption}%
+                \else
+                  \edef\endnj at temp@ptions{\endnj at temp@ptions,\CurrentOption}%
+                \fi
+                \edef\notesname{\CurrentOption}}
+\ExecuteOptions{auto-tateyoko,twin,ver3}
+\ProcessOptions
+%
+%% Option handlings
+%
+%  Throw an error for more than one unknown options
+%  Also, show info about what will be used as `\notesname'
+\@for\reserved at a:=\endnj at temp@ptions\do{%
+  \ifx\reserved at a\notesname
+    \typeout{*** Package endnotesj will use `\notesname' as \string\notesname. ***}%
+  \else
+    \ifx\reserved at a\@empty\else
+      \PackageError{endnotesj}{%
+        Unknown option `\reserved at a' ignored!\MessageBreak
+        It seems that more than one unknown options\MessageBreak
+        were requested, and `\notesname' was taken as\MessageBreak
+        \string\notesname. Perhaps you misspelled some options}{%
+        The options `\endnj at temp@ptions' were not declared in package endnotesj.\MessageBreak
+        Package endnotesj accepts ONLY ONE unknown option (the last one;\MessageBreak
+        in this case `\notesname'), which is regarded as \string\notesname.\MessageBreak
+        The others will be simply ignored.}
+    \fi
+  \fi}
+%
+%  If `single' is specified, `tate' should be false
+\if at endnj@single
+  \if at endnj@tate
+    \PackageWarning{endnotesj}{%
+      Option `single' cannot be used with `tate'.\MessageBreak
+      Please use `auto-tateyoko' or `yoko'.\MessageBreak
+      Entering `auto-tateyoko' mode}
+    \@endnj at autotateyokotrue\@endnj at tatefalse\@endnj at yokofalse
+  \fi
+\fi
+%
+%  If `otf'/`utf' options are specified, load either of otf.sty/utf.sty
+\if at endnj@utf
+\ifx\directlua\@undefined
+  \@ifpackageloaded{utf}{}{\@ifpackageloaded{otf}{}{%
+    \IfFileExists{otf.sty}{\RequirePackage{otf}}{%
+    \IfFileExists{utf.sty}{\RequirePackage{utf}}{%
+    \PackageError{endnotesj}{Neither otf.sty nor utf.sty found}\@ehc
+    \@endnj at utffalse}% fall back
+  }}}
+\else
+  \@ifpackageloaded{luatexja-otf}{}{%
+    \IfFileExists{luatexja-otf.sty}{\RequirePackage{luatexja-otf}}{%
+    \PackageError{endnotesj}{luatexja-otf.sty not found}\@ehc
+    \@endnj at utffalse}% fall back
+  }
+\fi
+\fi
+%
+%% Misc helpers
+%
+%  fallback from #1 to #2 (tate-single -> tate-twin)
+%  once #1 is executed, throw a warning and replace its definition with
+%  the definition of #2, and execute it
+\def\endnj at tate@single at unavailable#1#2{%
+  \def#1{%
+    \PackageWarning{endnotesj}{%
+      `single' style is unavailable in `tate' direction.\MessageBreak
+      I'll use `twin' style instead.}%
+    \global\let#1#2%
+    #1}%
+}
+%
+%
+%%%%% Import from endnotes.sty
+%
+\@definecounter{endnote}
+\def\theendnote{\arabic{endnote}}
+%
+%%%%% End
+%
+%
+%% Customized endnote marks inside the main text for Japanese documents
+%
+% [1] `tate' & `twin'
+%   Common style for vertical writing with twin full-width round brackets
+%   like "Journal of Japanese history" (Nihonshi kenkyu)
+%
+% *** ver 2 ***
+\def\endnj at ii@tate at makeenmark{%
+    \kern -1.2\endnj at zw%
+    \raisebox{.8\endnj at zh}{\tiny \char\jis"214A\relax\hspace{0.2\endnj at zw}%
+      \hbox{\yoko\@theenmark}%
+      \hspace{0.2\endnj at zw}\char\jis"214B\relax
+    }%
+}
+% *** ver 3 ***
+\def\endnj at iii@tate at makeenmark{%
+  \hb at xt@\z@{%
+    \kern -1.2\endnj at zw\hss
+    \raisebox{.8\endnj at zh}{\tiny \char\jis"214A\relax\hspace{0.1\endnj at zw}%
+      \hbox{\yoko\@theenmark}%
+      \hspace{0.1\endnj at zw}\char\jis"214B\relax
+    }%
+  }%
+}
+%
+% [1'] `tate' & `twin' & `utf'
+%   More beautiful output using "tsume-suji" requires otf/utf package
+%
+% *** ver 2 ***
+\def\endnj at ii@tate at utf@makeenmark{%
+    \kern -1.2\endnj at zw%
+    \raisebox{.8\endnj at zh}{\tiny \char\jis"214A\relax
+      \hbox{\yoko\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
+      \char\jis"214B\relax
+    }%
+}
+% *** ver 3 ***
+\def\endnj at iii@tate at utf@makeenmark{%
+  \hb at xt@\z@{%
+    \kern -1.2\endnj at zw\hss
+    \raisebox{.8\endnj at zh}{\tiny \char\jis"214A\relax
+      \hbox{\yoko\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
+      \char\jis"214B\relax
+    }%
+  }%
+}
+%
+% [2] `yoko' & `twin'
+%   Common style for horizontal writing with twin round brackets
+%
+% *** ver 2 ***
+\def\endnj at ii@yoko at makeenmark{%
+  \raisebox{.5\endnj at zh}{\tiny (\hspace{0.2\endnj at zw}%
+    \hbox{\@theenmark}%
+    )%
+  }%
+}
+% *** ver 3 *** (using twin full-width round brackets)
+\def\endnj at iii@yoko at makeenmark{%
+  \raisebox{.5\endnj at zh}{\tiny \char\jis"214A\relax\hspace{0.1\endnj at zw}%
+    \hbox{\@theenmark}%
+    \hspace{0.1\endnj at zw}\char\jis"214B\relax
+  }%
+}
+%
+% [2'] `yoko' & `twin' & `utf'
+%   More beautiful output using "tsume-suji" requires otf/utf package
+%
+% *** ver 2 ***
+\def\endnj at ii@yoko at utf@makeenmark{%
+  \raisebox{.5\endnj at zh}{\tiny \char\jis"214A\relax
+    \hbox{\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
+    \char\jis"214B\relax
+  }%
+}
+% *** ver 3 ***
+\let\endnj at iii@yoko at utf@makeenmark\endnj at ii@yoko at utf@makeenmark
+%
+% [3] `yoko' & `single'
+%   Style for horizontal writing with single round bracket
+%   like "Journal of historical studies" (Rekishigaku kenkyu)
+%
+% *** ver 2 ***
+\def\endnj at ii@yoko at single@makeenmark{%
+  \raisebox{.5\endnj at zh}{\tiny
+    \hbox{\@theenmark}%
+    )%
+  }%
+}
+% *** ver 3 ***
+\let\endnj at iii@yoko at single@makeenmark\endnj at ii@yoko at single@makeenmark
+%
+% [3'] `yoko' & `single' & `utf'
+%   More beautiful output using "tsume-suji" requires otf/utf package
+%
+% *** ver 2 ***
+\def\endnj at ii@yoko at single@utf at makeenmark{%
+  \raisebox{.5\endnj at zh}{\tiny
+    \hbox{\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
+    \char\jis"214B\relax
+  }%
+}
+% *** ver 3 ***
+\let\endnj at iii@yoko at single@utf at makeenmark\endnj at ii@yoko at single@utf at makeenmark
+%
+% [4] `tate' & `single' (& `utf')
+%   Not available! - fallback definitions
+%
+\endnj at tate@single at unavailable\endnj at ii@tate at single@makeenmark\endnj at ii@tate at makeenmark
+\endnj at tate@single at unavailable\endnj at iii@tate at single@makeenmark\endnj at iii@tate at makeenmark
+\endnj at tate@single at unavailable\endnj at ii@tate at single@utf at makeenmark\endnj at ii@tate at utf@makeenmark
+\endnj at tate@single at unavailable\endnj at iii@tate at single@utf at makeenmark\endnj at iii@tate at utf@makeenmark
+%
+%  Current names of the commands for `tate' and `yoko'
+%
+\expandafter\def\expandafter\endnj at tate@makeenmark\expandafter{%
+  \csname endnj@%
+    \romannumeral\endnj at vermode @%
+    tate@%
+    \if at endnj@single single@\fi%
+    \if at endnj@utf utf@\fi%
+    makeenmark\endcsname}
+\expandafter\def\expandafter\endnj at yoko@makeenmark\expandafter{%
+  \csname endnj@%
+    \romannumeral\endnj at vermode @%
+    yoko@%
+    \if at endnj@single single@\fi%
+    \if at endnj@utf utf@\fi%
+    makeenmark\endcsname}
+%
+%  Now, redefine \@makeenmark using above definitions
+%
+\if at endnj@tate
+  \let\@makeenmark\endnj at tate@makeenmark
+\fi
+\if at endnj@yoko
+  \let\@makeenmark\endnj at tate@makeenmark
+\fi
+%
+%% End
+%
+%
+%%%%% Import from endnotes.sty
+%
+\def\makeenmark{\@makeenmark} % Added in endnotes.sty (JL 12 January 2003)
+\def\theenmark{\@theenmark} % Added in endnotes.sty (JL 12 January 2003)
+%
+\newdimen\endnotesep
+%
+\def\endnote{\@ifnextchar[\@xendnote{\stepcounter{endnote}%
+     \protected at xdef\@theenmark{\theendnote}%
+     \@endnotemark\@endnotetext}}
+%
+\def\@xendnote[#1]{%
+   \begingroup
+     \c at endnote=#1\relax
+     \unrestored at protected@xdef\@theenmark{\theendnote}%
+   \endgroup
+   \@endnotemark\@endnotetext}
+%
+\let\@doanenote=0
+\let\@endanenote=0
+%
+\newwrite\@enotes
+\newif\if at enotesopen \global\@enotesopenfalse
+%
+\def\@openenotes{\immediate\openout\@enotes=\jobname.ent\relax
+      \global\@enotesopentrue}
+%
+\long\def\@endnotetext#1{%
+     \if at enotesopen \else \@openenotes \fi
+     \immediate\write\@enotes{\@doanenote{\@theenmark}}%
+     \begingroup
+        \def\next{#1}%
+        \newlinechar='40
+        \immediate\write\@enotes{\meaning\next}%
+     \endgroup
+     \immediate\write\@enotes{\@endanenote}}
+%
+\long\def\addtoendnotes#1{%
+     \if at enotesopen \else \@openenotes \fi
+     \begingroup
+        \newlinechar='40
+        \let\protect\string
+        \immediate\write\@enotes{#1}%
+     \endgroup}
+%
+\def\endnotemark{%
+   \@ifnextchar[\@xendnotemark
+     {\stepcounter{endnote}%
+      \protected at xdef\@theenmark{\theendnote}%
+      \@endnotemark}}
+%
+\def\@xendnotemark[#1]{%
+   \begingroup
+      \c at endnote #1\relax
+      \unrestored at protected@xdef\@theenmark{\theendnote}%
+   \endgroup
+   \@endnotemark}
+%
+\def\@endnotemark{%
+  \leavevmode
+  \ifhmode\edef\@x at sf{\the\spacefactor}\nobreak\fi
+  \makeenmark
+  \ifhmode\spacefactor\@x at sf\fi
+  \relax}
+%
+\def\endnotetext{%
+     \@ifnextchar [\@xendnotenext
+       {\protected at xdef\@theenmark{\theendnote}%
+    \@endnotetext}}
+%
+\def\@xendnotenext[#1]{%
+  \begingroup
+     \c at endnote=#1\relax
+     \unrestored at protected@xdef\@theenmark{\theendnote}%
+  \endgroup
+  \@endnotetext}
+%
+\def\enoteheading{\section*{\notesname
+  \@mkboth{\MakeUppercase{\notesname}}{\MakeUppercase{\notesname}}}%
+  \mbox{}\par\vskip-\baselineskip}
+%
+%%%%% End
+%
+%
+%% Settings of endnote formatting at the end of Japanese documents
+%% (The numbering styles and indentation are considered.)
+%
+% [1] `tate' & `twin'
+%   Common style for vertical writing with twin full-width round brackets
+%   like "Journal of Japanese history" (Nihonshi kenkyu)
+%
+% *** ver 2 ***
+\def\endnj at ii@tate at enoteformat#1{%
+  \parindent 1em\noindent
+  \@hangfrom{\raisebox{.07\endnj at zh}{(}\hspace{0.2\endnj at zw}%
+    \hbox{\yoko\@theenmark}%
+    \hspace{0.2\endnj at zw}\raisebox{.07\endnj at zh}{)}%
+  }#1%
+}
+% *** ver 3 ***
+\def\endnj at iii@tate at enoteformat#1{%
+  \parindent 1em\noindent
+  \@hangfrom{\mbox{}\char\jis"214A\relax\hspace{0.1\endnj at zw}%
+    \hbox{\yoko\@theenmark}%
+    \hspace{0.1\endnj at zw}\char\jis"214B\relax\mbox{}%
+  }#1%
+}
+%
+% [1'] `tate' & `twin' & `utf'
+%   More beautiful output using "tsume-suji" requires otf/utf package
+%
+% *** ver 2 ***
+\def\endnj at ii@tate at utf@enoteformat#1{%
+  \parindent 1em\noindent
+  \@hangfrom{\UTF{FE35}%
+    \hbox{\yoko\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
+    \UTF{FE36}%
+  }#1%
+}
+% *** ver 3 ***
+\def\endnj at iii@tate at utf@enoteformat#1{%
+  \parindent 1em\noindent
+  \@hangfrom{\mbox{}\char\jis"214A\relax
+    \hbox{\yoko\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
+    \char\jis"214B\relax\mbox{}%
+  }#1%
+}
+%
+% [2] `yoko' & `twin'
+%   Common style for horizontal writing with twin round brackets
+%
+% *** ver 2 ***
+\def\endnj at ii@yoko at enoteformat#1{%
+  \parindent 1em\noindent
+  \@hangfrom{(\hspace{0.2\endnj at zw}%
+    \hbox{\@theenmark}%
+    \hspace{0.2\endnj at zw})%
+  }#1%
+}
+% *** ver 3 *** (using twin full-width round brackets)
+\def\endnj at iii@yoko at enoteformat#1{%
+  \parindent 1em\noindent
+  \@hangfrom{\mbox{}\char\jis"214A\relax\hspace{0.1\endnj at zw}%
+    \hbox{\@theenmark}%
+    \hspace{0.1\endnj at zw}\char\jis"214B\relax\mbox{}%
+  }#1%
+}
+%
+% [2'] `yoko' & `twin' & `utf'
+%   More beautiful output using "tsume-suji" requires otf/utf package
+%
+% *** ver 2 ***
+\def\endnj at ii@yoko at utf@enoteformat#1{%
+  \parindent 1em\noindent
+  \@hangfrom{\char\jis"214A\relax%
+    \hbox{\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
+    \char\jis"214B\relax
+  }#1%
+}
+% *** ver 3 ***
+\def\endnj at iii@yoko at utf@enoteformat#1{%
+  \parindent 1em\noindent
+  \@hangfrom{\mbox{}\char\jis"214A\relax%
+    \hbox{\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
+    \char\jis"214B\relax\mbox{}%
+  }#1%
+}
+%
+% [3] `yoko' & `single'
+%   Style for horizontal writing with single round bracket
+%   like "Journal of historical studies" (Rekishigaku kenkyu)
+%
+% *** ver 2 ***
+\def\endnj at ii@yoko at single@enoteformat#1{%
+  \parindent 1em\noindent
+  \@hangfrom{%
+    \hbox{\@theenmark}%
+    )%
+  }#1%
+}
+% *** ver 3 ***
+\let\endnj at iii@yoko at single@enoteformat\endnj at ii@yoko at single@enoteformat
+%
+% [3'] `yoko' & `single' & `utf'
+%   More beautiful output using "tsume-suji" requires otf/utf package
+%
+% *** ver 2 ***
+\def\endnj at ii@yoko at single@utf at enoteformat#1{%
+  \parindent 1em\noindent
+  \@hangfrom{%
+    \hbox{\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
+    \char\jis"214B\relax
+  }#1%
+}
+% *** ver 3 ***
+\let\endnj at iii@yoko at single@utf at enoteformat\endnj at ii@yoko at single@utf at enoteformat
+%
+% [4] `tate' & `single' (& `utf')
+%   Not available! - fallback definitions
+%
+\endnj at tate@single at unavailable\endnj at ii@tate at single@enoteformat\endnj at ii@tate at enoteformat
+\endnj at tate@single at unavailable\endnj at iii@tate at single@enoteformat\endnj at iii@tate at enoteformat
+\endnj at tate@single at unavailable\endnj at ii@tate at single@utf at enoteformat\endnj at ii@tate at utf@enoteformat
+\endnj at tate@single at unavailable\endnj at iii@tate at single@utf at enoteformat\endnj at iii@tate at utf@enoteformat
+%
+%  Current names of the commands for `tate' and `yoko'
+%
+\expandafter\def\expandafter\endnj at tate@enoteformat\expandafter{%
+  \csname endnj@%
+    \romannumeral\endnj at vermode @%
+    tate@%
+    \if at endnj@single single@\fi%
+    \if at endnj@utf utf@\fi%
+    enoteformat\endcsname}
+\expandafter\def\expandafter\endnj at yoko@enoteformat\expandafter{%
+  \csname endnj@%
+    \romannumeral\endnj at vermode @%
+    yoko@%
+    \if at endnj@single single@\fi%
+    \if at endnj@utf utf@\fi%
+    enoteformat\endcsname}
+%
+%  Now, redefine \enoteformat using above definitions
+%
+\if at endnj@tate
+  \let\enoteformat\endnj at tate@enoteformat
+\fi
+\if at endnj@yoko
+  \let\enoteformat\endnj at yoko@enoteformat
+\fi
+%
+%% End
+%
+%
+\def\enotesize{\small} % endnotesj.sty original
+%
+%%%%% Import from endnotes.sty
+%
+\def\theendnotes{\immediate\closeout\@enotes \global\@enotesopenfalse
+  \begingroup
+    \makeatletter
+    %
+    % The machinery with \@ResetGT and > here ensures that
+    % \@doanenote works properly even if > is an active character
+    % at the point where \theendnotes is invoked. > needs to have
+    % catcode 12 when the arguments of \@doanenote are scanned, so
+    % that the > in the string "macro:->" is matched.  The actual
+    % footnote text is not an argument to \@doanenote, but just
+    % follows it in the .ent file; so \@ResetGT can reset the
+    % category code for > that should be used when processing
+    % that text.  That resetting takes place within a
+    % \begingroup-\endgroup block set up by \@doanenote and
+    % \@endanenote, so the catcode for > is back to 12 for the
+    % next note.
+    %
+    \edef\@tempa{`\string >}%
+    \ifnum\catcode\@tempa=12%
+      \let\@ResetGT\relax
+    \else
+      \edef\@ResetGT{\noexpand\catcode\@tempa=\the\catcode\@tempa}%
+      \@makeother\>%
+    \fi
+    \def\@doanenote##1##2>{\def\@theenmark{##1}\par\begingroup
+        \@ResetGT
+        \edef\@currentlabel{\csname p at endnote\endcsname\@theenmark}%
+        \enoteformat}
+    \def\@endanenote{\par\endgroup}%
+    \enoteheading
+    \enotesize
+    \input{\jobname.ent}%
+  \endgroup}
+%
+%%%%% End
+%
+%
+%% Definitions for auto-tateyoko option
+%
+\ifx\directlua\@undefined
+  \catcode`\L=14\relax
+  \catcode`\P=9\relax
+\else
+  \catcode`\L=9\relax
+  \catcode`\P=14\relax
+\fi
+\if at endnj@autotateyoko
+  \def\@makeenmark{%
+P   \iftdir
+L   \ifnum\numexpr
+L     \ltjgetparameter{direction}-(\ltjgetparameter{direction}/8)*8=3\relax
+      \endnj at tate@makeenmark
+    \else
+      \endnj at yoko@makeenmark
+    \fi}
+  \def\enoteformat{%
+P   \iftdir
+L   \ifnum\numexpr
+L     \ltjgetparameter{direction}-(\ltjgetparameter{direction}/8)*8=3\relax
+      \endnj at tate@enoteformat
+    \else
+      \endnj at yoko@enoteformat
+    \fi}
+\fi
+\catcode`\L=11\relax
+\catcode`\P=11\relax
+%
+%
+% ****************************************
+% * Lines per page & Characters per line *
+% ****************************************
+%
+%  Changes in v3.0:
+%    * \linesparpage: the number of interline skip is fewer
+%      than the number of lines
+%    * \linesparpage: subtract \topskip from \textheight
+%    * \kcharparline: add \relax at the end of definition
+%
+\def\linesparpage#1{%
+  \@tempcnta=#1\relax
+  \advance\@tempcnta by \m at ne
+  \baselineskip=\textheight
+  \advance\baselineskip by -\topskip
+  \divide\baselineskip by \@tempcnta\relax}
+\def\kcharparline#1{%
+  \xkanjiskip 0mm plus 0.2mm minus 0.2mm
+  \settowidth{\textwidth}{\char\jis"2422}%
+  \multiply\textwidth by #1\relax}
+%
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/endnotesj/endnotesj.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2018-05-13 21:52:41 UTC (rev 47702)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2018-05-13 21:53:15 UTC (rev 47703)
@@ -238,7 +238,7 @@
     elmath elocalloc elpres elsarticle
     elteikthesis eltex elvish elzcards
     emarks embedall embrac emf emisa emptypage emulateapj emp
-    enctex encxvlna endfloat endheads endiagram endnotes endofproofwd
+    enctex encxvlna endfloat endheads endiagram endnotes endnotesj endofproofwd
     engpron engrec engtlc enigma enotez
     enumitem enumitem-zref envbig environ envlab
     epigrafica epigram epigraph epiolmec eplain

Modified: trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc	2018-05-13 21:52:41 UTC (rev 47702)
+++ trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc	2018-05-13 21:53:15 UTC (rev 47703)
@@ -13,6 +13,7 @@
 depend bxjscls
 depend bxorigcapt
 depend convbkmk
+depend endnotesj
 depend gentombow
 depend ifptex
 depend ifxptex

Added: trunk/Master/tlpkg/tlpsrc/endnotesj.tlpsrc
===================================================================


More information about the tex-live-commits mailing list