<commit_before>%
% Package ``endnotesj.sty'' for endnotes in Japanese articles,
% written by <NAME> and <NAME>
%
% This package is part of the platex-tools bundle.
% https://github.com/aminophen/platex-tools
%
% Authors:
%  * <NAME> (Kumamoto Gakuen University)
%      Mail: herogw at kumagaku.ac.jp
%       Web: http://www2.kumagaku.ac.jp/teacher/herogw/index.html
%  * <NAME>
%      Mail: h.y.acetaminophen at gmail.com
%      Github: @aminophen
%
% This work is based on ``endnotes.sty'' (15 January 2003)
% written by <NAME>.
%
% ****************************************
% *           ENDNOTE MACROS             *
% ****************************************
%
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{endnotesj}
  [2016/09/15 v2.9d endnotesj (<NAME> and H. Yamashita)]
%
%% Ensure that endnotes.sty is NOT loaded after this package
\@ifpackageloaded{endnotes}{}{%
  \IfFileExists{endnotes.sty}{%
    \expandafter\def\csname ver@endnotes.sty\endcsname{}}{}}
%
%% Initialize \notesname
\def\notesname{} % should be empty by default (endnotesj.sty original)
%
%% Package options (endnotesj original)
%
%% Brackets - single or twin?
\newif\if@kakko \@kakkofalse
\DeclareOption{single}{\@kakkotrue}
%
%% Directions - yoko (horizontal) or tate (vertical)?
\newif\if@yoko \@yokofalse
\DeclareOption{yoko}{\@yokotrue}
\newif\if@tate \@tatefalse
\DeclareOption{tate}{\@tatetrue}
\newif\if@yokostar \@yokostarfalse
\DeclareOption{yoko*}{\@yokostartrue}
\newif\if@tatestar \@tatestarfalse
\DeclareOption{tate*}{\@tatestartrue}
%
%% Use utf/otf package?
\newif\if@utf \@utffalse
\DeclareOption{utf}{\@utftrue}
\DeclareOption{otf}{\@utftrue}
%
%% Use conditional definitions for switching marks depending on
%% vertical/horizontal Japanese writing direction
\newif\if@autotateyoko \@autotateyokofalse
\DeclareOption{auto-tateyoko}{\@autotateyokotrue}
\DeclareOption{auto-tateyoko*}{\@autotateyokotrue\@tatestartrue\@yokostartrue}
%
%% Other options are used as \notesname
\DeclareOption*{\edef\notesname{\CurrentOption}}
\ExecuteOptions{tate}
\ProcessOptions
%
%% If otf/utf options are specified, load either of otf.sty/utf.sty
\if@utf
  \@ifpackageloaded{utf}{}{\@ifpackageloaded{otf}{}{%
    \IfFileExists{otf.sty}{\AtEndOfPackage{\RequirePackage{otf}}}{%
    \IfFileExists{utf.sty}{\AtEndOfPackage{\RequirePackage{utf}}}{%
    \PackageError{endnotesj}{Neither otf.sty nor utf.sty found}\@ehc}
  }}}
\fi
%
%%%%% Import from endnotes.sty
%
\@definecounter{endnote}
\def\theendnote{\arabic{endnote}}
%
%%%%% End
%
%
%% Customized endnote marks inside the main text for Japanese documents
%
% (1) Common style for vertical writing with twin full-width round brackets
%     like "Journal of Japanese history" (Nihonshi kenkyu)
%     enabled by \usepackage[tate]{endnotesj} (default style)
\def\endnj@tate@makeenmark{%
    \kern -1.2zw%
    \raisebox{.8zh}{\tiny \char\jis"214A\relax\hspace{0.2zw}%
      \hbox{\yoko\@theenmark}%
      \hspace{0.2zw}\char\jis"214B\relax
    }%
}
%
% (1A) Improved a little (added 2016/09/09)
%     enabled by \usepackage[tate*]{endnotesj}
\if@tatestar
\def\endnj@tate@makeenmark{%
  \hb@xt@\z@{%
    \kern -1.2zw%
    \raisebox{.8zh}{\tiny \char\jis"214A\relax\hspace{0.1zw}%
      \hbox{\yoko\@theenmark}%
      \hspace{0.1zw}\char\jis"214B\relax
    }%
  }%
}
\fi
%
% (2) Common style for horizontal writing with twin round brackets
%     enabled by \usepackage[yoko]{endnotesj}
\def\endnj@yoko@makeenmark{%
  \raisebox{.5zh}{\tiny (\hspace{0.2zw}%
    \hbox{\@theenmark}%
    )%
  }%
}
%
% (2A) Improved a little using twin full-width round brackets (added 2016/09/09)
%     enabled by \usepackage[yoko*]{endnotesj}
\if@yokostar
\def\endnj@yoko@makeenmark{%
  \raisebox{.5zh}{\tiny \char\jis"214A\relax\hspace{0.1zw}%
    \hbox{\@theenmark}%
    \hspace{0.1zw}\char\jis"214B\relax
  }%
}
\fi
%
% (3) Style for horizontal writing with single round bracket
%     like "Journal of historical studies" (Rekishigaku kenkyu)
%     enabled by \usepackage[single]{endnotesj}
\def\endnj@single@makeenmark{%
  \raisebox{.5zh}{\tiny
    \hbox{\@theenmark}%
    )%
  }%
}
%
% (1')-(3') More beautiful definitions using otf/utf package
\def\endnj@tate@utf@makeenmark{%
    \kern -1.2zw%
    \raisebox{.8zh}{\tiny \char\jis"214A\relax
      \hbox{\yoko\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
      \char\jis"214B\relax
    }%
}
\if@tatestar
\def\endnj@tate@utf@makeenmark{%
  \hb@xt@\z@{%
    \kern -1.2zw%
    \raisebox{.8zh}{\tiny \char\jis"214A\relax
      \hbox{\yoko\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
      \char\jis"214B\relax
    }%
  }%
}
\fi
\def\endnj@yoko@utf@makeenmark{%
  \raisebox{.5zh}{\tiny \char\jis"214A\relax
    \hbox{\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
    \char\jis"214B\relax
  }%
}
\if@yokostar % currently the same as above
\def\endnj@yoko@utf@makeenmark{%
  \raisebox{.5zh}{\tiny \char\jis"214A\relax
    \hbox{\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
    \char\jis"214B\relax
  }%<commit_msg>endnotesj.sty: Avoid underfull warning in \hb@xt@\z@<commit_after>%
% Package ``endnotesj.sty'' for endnotes in Japanese articles,
% written by <NAME> and <NAME>
%
% This package is part of the platex-tools bundle.
% https://github.com/aminophen/platex-tools
%
% Authors:
%  * <NAME> (Kumamoto Gakuen University)
%      Mail: herogw at kumagaku.ac.jp
%       Web: http://www2.kumagaku.ac.jp/teacher/herogw/index.html
%  * <NAME>
%      Mail: h.y.acetaminophen at gmail.com
%      Github: @aminophen
%
% This work is based on ``endnotes.sty'' (15 January 2003)
% written by <NAME>.
%
% ****************************************
% *           ENDNOTE MACROS             *
% ****************************************
%
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{endnotesj}
  [2016/09/15 v2.9e endnotesj (<NAME> and <NAME>)]
%
%% Ensure that endnotes.sty is NOT loaded after this package
\@ifpackageloaded{endnotes}{}{%
  \IfFileExists{endnotes.sty}{%
    \expandafter\def\csname ver@endnotes.sty\endcsname{}}{}}
%
%% Initialize \notesname
\def\notesname{} % should be empty by default (endnotesj.sty original)
%
%% Package options (endnotesj original)
%
%% Brackets - single or twin?
\newif\if@kakko \@kakkofalse
\DeclareOption{single}{\@kakkotrue}
%
%% Directions - yoko (horizontal) or tate (vertical)?
\newif\if@yoko \@yokofalse
\DeclareOption{yoko}{\@yokotrue}
\newif\if@tate \@tatefalse
\DeclareOption{tate}{\@tatetrue}
\newif\if@yokostar \@yokostarfalse
\DeclareOption{yoko*}{\@yokostartrue}
\newif\if@tatestar \@tatestarfalse
\DeclareOption{tate*}{\@tatestartrue}
%
%% Use utf/otf package?
\newif\if@utf \@utffalse
\DeclareOption{utf}{\@utftrue}
\DeclareOption{otf}{\@utftrue}
%
%% Use conditional definitions for switching marks depending on
%% vertical/horizontal Japanese writing direction
\newif\if@autotateyoko \@autotateyokofalse
\DeclareOption{auto-tateyoko}{\@autotateyokotrue}
\DeclareOption{auto-tateyoko*}{\@autotateyokotrue\@tatestartrue\@yokostartrue}
%
%% Other options are used as \notesname
\DeclareOption*{\edef\notesname{\CurrentOption}}
\ExecuteOptions{tate}
\ProcessOptions
%
%% If otf/utf options are specified, load either of otf.sty/utf.sty
\if@utf
  \@ifpackageloaded{utf}{}{\@ifpackageloaded{otf}{}{%
    \IfFileExists{otf.sty}{\AtEndOfPackage{\RequirePackage{otf}}}{%
    \IfFileExists{utf.sty}{\AtEndOfPackage{\RequirePackage{utf}}}{%
    \PackageError{endnotesj}{Neither otf.sty nor utf.sty found}\@ehc}
  }}}
\fi
%
%%%%% Import from endnotes.sty
%
\@definecounter{endnote}
\def\theendnote{\arabic{endnote}}
%
%%%%% End
%
%
%% Customized endnote marks inside the main text for Japanese documents
%
% (1) Common style for vertical writing with twin full-width round brackets
%     like "Journal of Japanese history" (Nihonshi kenkyu)
%     enabled by \usepackage[tate]{endnotesj} (default style)
\def\endnj@tate@makeenmark{%
    \kern -1.2zw%
    \raisebox{.8zh}{\tiny \char\jis"214A\relax\hspace{0.2zw}%
      \hbox{\yoko\@theenmark}%
      \hspace{0.2zw}\char\jis"214B\relax
    }%
}
%
% (1A) Improved a little (added 2016/09/09)
%     enabled by \usepackage[tate*]{endnotesj}
\if@tatestar
\def\endnj@tate@makeenmark{%
  \hb@xt@\z@{%
    \kern -1.2zw\hfil
    \raisebox{.8zh}{\tiny \char\jis"214A\relax\hspace{0.1zw}%
      \hbox{\yoko\@theenmark}%
      \hspace{0.1zw}\char\jis"214B\relax
    }%
  }%
}
\fi
%
% (2) Common style for horizontal writing with twin round brackets
%     enabled by \usepackage[yoko]{endnotesj}
\def\endnj@yoko@makeenmark{%
  \raisebox{.5zh}{\tiny (\hspace{0.2zw}%
    \hbox{\@theenmark}%
    )%
  }%
}
%
% (2A) Improved a little using twin full-width round brackets (added 2016/09/09)
%     enabled by \usepackage[yoko*]{endnotesj}
\if@yokostar
\def\endnj@yoko@makeenmark{%
  \raisebox{.5zh}{\tiny \char\jis"214A\relax\hspace{0.1zw}%
    \hbox{\@theenmark}%
    \hspace{0.1zw}\char\jis"214B\relax
  }%
}
\fi
%
% (3) Style for horizontal writing with single round bracket
%     like "Journal of historical studies" (Rekishigaku kenkyu)
%     enabled by \usepackage[single]{endnotesj}
\def\endnj@single@makeenmark{%
  \raisebox{.5zh}{\tiny
    \hbox{\@theenmark}%
    )%
  }%
}
%
% (1')-(3') More beautiful definitions using otf/utf package
\def\endnj@tate@utf@makeenmark{%
    \kern -1.2zw%
    \raisebox{.8zh}{\tiny \char\jis"214A\relax
      \hbox{\yoko\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
      \char\jis"214B\relax
    }%
}
\if@tatestar
\def\endnj@tate@utf@makeenmark{%
  \hb@xt@\z@{%
    \kern -1.2zw\hfil
    \raisebox{.8zh}{\tiny \char\jis"214A\relax
      \hbox{\yoko\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
      \char\jis"214B\relax
    }%
  }%
}
\fi
\def\endnj@yoko@utf@makeenmark{%
  \raisebox{.5zh}{\tiny \char\jis"214A\relax
    \hbox{\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
    \char\jis"214B\relax
  }%
}
\if@yokostar % currently the same as above
\def\endnj@yoko@utf@makeenmark{%
  \raisebox{.5zh}{\tiny \char\jis"214A\relax
    \hbox{\expandafter\ajTumesuji\expandafter*\expandafter{\number\@theenmark}}%
    \char\jis"214B\relax
  }%
{'fraction_non_alphanumeric': 0.18247959885950252, 'fraction_numerical': 0.02241667485989578, 'mean_word_length': 4.103863522328148, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2301520', 'n_tokens_mistral': 4248, 'n_tokens_neox': 3882, 'n_words': 666}