texlive[66857] Master/texmf-dist: evangelion-jfm (15apr23)

commits+karl at tug.org commits+karl at tug.org
Sat Apr 15 22:49:53 CEST 2023


Revision: 66857
          http://tug.org/svn/texlive?view=revision&revision=66857
Author:   karl
Date:     2023-04-15 22:49:53 +0200 (Sat, 15 Apr 2023)
Log Message:
-----------
evangelion-jfm (15apr23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/README.md
    trunk/Master/texmf-dist/tex/luatex/evangelion-jfm/jfm-eva.lua

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-en.pdf
    trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-en.tex
    trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-sc.pdf
    trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-sc.tex
    trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/
    trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig-jp.pdf
    trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig-tc.pdf
    trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig.tex
    trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/make.sh
    trunk/Master/texmf-dist/source/luatex/evangelion-jfm/
    trunk/Master/texmf-dist/source/luatex/evangelion-jfm/Evangelion-JFM.dtx

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Evangelion-doc.pdf
    trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Evangelion-doc.tex

Added: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-en.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-en.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-en.pdf	2023-04-15 20:49:32 UTC (rev 66856)
+++ trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-en.pdf	2023-04-15 20:49:53 UTC (rev 66857)

Property changes on: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-en.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-en.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-en.tex	2023-04-15 20:49:53 UTC (rev 66857)
@@ -0,0 +1,230 @@
+%! TeX Program = LuaLaTeX
+\documentclass[twoside]{article}
+\usepackage[margin=1.2in]{geometry}
+\usepackage{graphicx}
+\usepackage{fontspec, luatexja}
+\newfontfeature{microtype}{protrusion=default;expansion=default}
+\defaultfontfeatures{microtype}
+\adjustspacing=2
+\protrudechars=2
+\setmainfont{Linux Libertine O}
+\setsansfont{Linux Biolinum O}
+\setmonofont[Scale = MatchLowercase, FakeStretch = 1.137121]{Iosevka Slab}
+\usepackage{listings}
+\lstset{
+    basicstyle = \ttfamily\small,
+    breaklines = true,
+    columns = fullflexible,
+    keepspaces = true,
+    numbers = left,
+    numberstyle = \tiny,
+    stepnumber = 1,
+    gobble = 4,
+    numbersep = 6pt,
+    escapechar = §
+}
+\usepackage{hyperref}
+\hypersetup{
+    hidelinks,
+    pdftitle = {Evangelion-JFM},
+    pdfauthor = {Jing Huang},
+    pdfsubject = {TeX},
+    pdfkeywords = {Japanese Font Metric},
+    pdfstartview = FitV
+}
+\long\def\feature#1#2#3{{\vskip8pt\vbox{\normalsize\parindent=\zw\hangindent=2\zw\texttt{#1 --> ({\itshape #2\/})}\\\indent#3\par}}}
+\def\meta#1{{\normalfont\rmfamily\itshape$\langle$#1\/$\rangle$}}
+\def\LuaTeX{Lua\kern-.2ex\TeX}
+\def\pTeX{p\kern-.2ex\TeX}
+\def\pdfTeX{pdf\TeX}
+\title{\sffamily\bfseries Evangelion Japanese Font Metric for \LuaTeX}
+\author{\large \url{https://github.com/RadioNoiseE/Evangelion-JFM}\\\url{https://www.ctan.org/pkg/evangelion-jfm}}
+\date{2023, Jing Huang (黄京)}
+\begin{document}
+\parindent=12pt\parskip=2pt
+\maketitle
+
+\begin{abstract}
+    This documentation is going to introduce Evangelion Japanese Font Metric (hereinafter referred to as ``\textsf{Eva-JFM}''), a Japanese Font Metric for typesetting high quality Chinese and Japanese documents. It can be used with Traditional Chinese, Simplified Chinese and Japanese fonts for both vertically and horizontally typesetted texts. It aims to provide a font metric which makes full use of the \texttt{priority} feature (provided by \textsf{\LuaTeX-ja}), bases on the standard~\cite{jlreq}, and supports some advanced (a.k.a., rarely-used) features. The documentation is now written in both Chinese and English.\par
+    This documentation is far from complete. It may have many grammatical (and contextual) errors.
+\end{abstract}
+
+\section{Background Information and a Rough Introduction}
+{\TeX} is a powerful typesetting system ``intended for the creation of beautiful books'', it has full support for typesetting English based texts. However, its support for CJ text is limited\footnote{Maybe because there was no universally recognized or accepted CJ character set standard as well as an encoding system.}. For handling CJ texts in {\TeX}, both macro extensions (i.e., \textsf{CJK}) and engine extensions were developed. One of the most influential one is (the) {\pTeX} (series).\par
+{\pTeX} uses a virtual font scheme, by mapping TrueType or OpenType fonts using \texttt{TFM/VF} files. It doesn't support font configuration through macros, and has no support for PDF format output. Its advantage is the proven ability for dealing with traditional Japanese typographic layout requirements.\par
+{\pdfTeX} is a {\TeX} engine extension which can directly output PDF files (just as its name). But it has limited support to Unicode as well as modern font formats (TrueType and OpenType vector font formats).\par
+{\LuaTeX} is based on {\pdfTeX}. The inclusion of Lua enables it to support Unicode with the \textsf{reader} module, and modern fonts by using \textsf{fontloader}. Its macro based font setup feature is provided by \textsf{luaotfload}.\par
+\LuaTeX-ja can be seen as a porting of {\pTeX} and {\LuaTeX}. It's a macro package for typesetting high quality Japanese documents when using {\LuaTeX}. {\LuaTeX} supports font configuring by macros, therefore there's no need to keep {\pTeX}'s \texttt{VF} file. But for advanced features it left and extended\footnote{The \texttt{priority} feature and some imaginary characters as well.} the so-called JFM file.\par
+This document describes \textsf{Eva-JFM}, an advanced JFM file. By using {\LuaTeX}'s callback, it embeds features (maybe) needed in CJ text typesetting in \texttt{Eva-JFM.lua}. The features supported now are ``Traditional Chinese'', ``Simplified Chinese'', ``Japanese'', ``Vertical Typesetting'', ``Linegap Punctuations'', ``Hanging Punctuations'', ``Extended Font'', and ``Non Standard''.
+
+\section{Installation and Local Configurations}
+The sourcefiles are hosted on Github while it's also uploaded to CTAN. Users can simply use
+\begin{lstlisting}
+    tlmgr install evangelion-jfm
+\end{lstlisting}
+(or maybe using other package managers) to install. (But note that the CTAN branch is not always updated.) Developers can also use
+\begin{lstlisting}
+    mkdir Evangelion-JFM [&&] cd Evangelion-JFM
+    git clone https://github.com/RadioNoiseE/Evangelion-JFM
+\end{lstlisting}
+to extract the latest version, the  move it to the \texttt{TEXMF} directory, for instance
+\begin{lstlisting}
+    ~/Library/texlive/2023/texmf-dist/tex/luatex/eva-jfm
+\end{lstlisting}
+If your {\TeX} distribution requires
+\begin{lstlisting}
+    mktexlsr
+\end{lstlisting}
+to update the \texttt{Ls-R} database, make it so.\par
+\textsf{Eva-JFM} doesn't require any local configuration in most cases, but if you have some special requirements, have a look at section \ref{sec:config}.
+
+\section{Using}
+The above is an example of typesetting vertical text using Traditional Chinese fonts
+\begin{lstlisting}
+    \usepackage{luatexja-fontspec, luatexja-adjust}
+    \setmainjfont{Source Han Serif TC}[Language = Chinese Traditional, TateFeatures = {JFM = eva/{vert, trad, nstd}}]
+    \ltjenableadjust[priority = true]
+\end{lstlisting}
+(and be aware that you need to load a document class which supports vertical typesetting or use the \texttt{\string\tate} command. \LuaTeX-ja's JFM syntax is the above
+\begin{lstlisting}
+    jfm = §\meta{JFM name}§/{§\meta{JFM features}§}
+\end{lstlisting}
+while under {\LaTeX} the most common case while using \texttt{\string\setmainjfont} is most likely
+\begin{lstlisting}
+    \setmainjfont{§\meta{font name}§}[Language = §\meta{language name}§, §\meta{dir}§ = {JFM = §\meta{JFM name}§/{§\meta{JFM features}§}}]
+\end{lstlisting}
+Option \meta{font name} is the font (that you'd like to specify as the main font for your document)'s name. When using Japanese fonts, simply ignore the \meta{language name} since \LuaTeX-ja will automatically fill it for you. In this case, filling \texttt{Chinese} \texttt{Traditional} for Traditional Chinese fonts and \texttt{Chinese} \texttt{Simplified} for Simplified Chinese fonts is necessary\footnote{Without this, your output may result in wrong details, for instance wrong punctuation shape \& direction.}. \meta{dir} should be \texttt{TateFeatures} when typeset vertically and \texttt{YokoFeatures} for typesetting horizontally accordingly. The JFM's name is specified by the \meta{JFM name} option\footnote{\LuaTeX-ja searchs for a JFM file following the method \texttt{jfm-\meta{JFM name}.lua}.}. Finally, for the \meta{JFM features} key, fill in the JFM features. They are described in section \ref{sec:feat}.\par
+For advanced users, it's also recommanded to use the following
+\begin{lstlisting}
+    \def\ltj at stdyokojfm{eva/{§\meta{JFM features}§}}
+\end{lstlisting}
+or with the NFSS.\par
+To set up JFM in other cases, please refer to the \LuaTeX-ja document~\cite{luatexja-doc}.
+
+\section{Supported Features}
+\label{sec:feat}
+This section is going to give you a glance at all the features embedded in \textsf{Eva-JFM}. They are divided into 5 groups, and are described in the next 5 subsections respectively.
+
+\subsection{Language Features}
+You should specify one and only one feature from this section, or your {\TeX} is going to complain about it.\par
+\feature{jp}{JaPanese}{%
+    Japanese font feature. When using Japanese fonts, you are required to specify this. It's very difference from Traditional Chinese and Simplified Chinese feature, namely the glue inserted after Question Mark and Exclamation Mark, and some punctuation mark's position when typeset vertically. It affects the feature \texttt{lgp}, as well as the internal grouping.\par
+}
+\feature{trad}{TRADitional chinese}{%
+    Traditional Chinese feature. You should specify this when you are typesetting using Traditional Chinese fonts. The differences from the other two is because of its middle-placed punctuations. Hence the glues inserted next to it, the line-end adjust, as well as some kernings between punctuations are special.
+}
+\feature{smpl}{SiMPLified chinese}{%
+    Simplified Chinese feature, for Simplified Chinese fonts. All the punctuations are laid down and placed aside. Therefore its position is treated with care. \textsf{Eva-JFM} also takes some rare conditions into consideration. Note that the \textit{aki\/} after Question Mark and Exclamation Mark is different from that of the Japanese font feature.
+}
+
+\subsection{Direction Features}
+Features in this section is compatible with all the other features.\par
+\feature{vert}{VERTical writing}{%
+    Vertical Typesetting feature. It affects kerning, internal grouping, etc. You should specify this when typeseting vertically.
+}
+
+\subsection{Extended Features}
+Except the feature \texttt{hgp} doesn't rely on feature \texttt{vert}, all the other features need \texttt{vert} to work (since they should only be needed in vertical texts).
+\feature{extd}{EXTenDed font}{%
+    Extended font features. The dafault ratio is \textit{x\/}:\textit{y\/}=100:80 while \textit{x\/} is the width and \textit{y\/} is the height. You can customize it using \texttt{extd=\meta{ratio}} (the dafault \meta{ratio} is 1.25). It should be used with \texttt{extend} (\textsf{luaotfload}) or \texttt{FakeStretch} (\textsf{fontspec}).
+}
+\feature{lgp}{LineGap Punctuations}{%
+    The linegap punctuations feature. This hangs some punctuations into the linegap. Some difference occurs when it's used with the \texttt{jp} feature. For more information see section~\ref{sec:lgp}.
+}
+\feature{hgp}{HanGing Punctuations}{%
+    Hanging punctuation feature which ``hangs'' some punctuation at line-end (allowing them to stick out a bit). Traditional Chinese fonts doesn't support this feature because the result is somewhat (rather) wierd.
+}
+
+\subsection{English Features}
+You need to set the JAchar range using \texttt{\string\ltjsetparameter} before using features in this section, or they won't work properly. It's also recommended to use with the corresponding OpenType features.\par
+\feature{hwid}{Half WIDth}{%
+    Half width English characters feature. This will place each alphabets into a box which width is exactly $0.5$ times the CJ character's width. It's worth noting that it will not stretch or shrink the glyph, it only adjusts the spacing. Hence if the OpenType feature \texttt{hwid} is not set, English characters will simply overlap. All the kernings and italic corrections will also be lost (this may be fixed in the future versions), and will ignore the parameter \texttt{xkanjiskip}. Please use with care.
+}
+\feature{fwid}{Full WIDth}{%
+    Full width English characters feature. It's similar from feature \texttt{hwid} above except that the spacing will be stretched out on the contrary.
+}
+
+\subsection{Dark Features}
+Before using the following features, please make sure that you have carefully read the descriptions.\par
+\feature{nstd}{Non STandarD}{%
+    This one ignores the standard priority rules for punctuation kerning. While Japanese text layout requirement~\cite{jlreq} suggests that the priority for the period should be higher than the comma (which means the period is easier to stretch), this makes the comma's priority higher than the preiod's. Only works when \textsf{luatexja-adjust}'s priority feature is enabled (set to \texttt{true}).
+}
+
+\section{Linegap Punctuation Feature}
+\label{sec:lgp}
+Here more detailed information about linegap punctuations are provided, as well as the issues may occur and the possible solution.
+\subsection{About ``Hanging''}
+Linegap punctuations can be seen in Chinese ancient books, it's a combination of the punctuations marks and the traditional vertical typesetting method.\par
+Only periods and commas should be hanged but \textsf{Eva-JFM} hangs three more punctuations in addition. Japanese font is different in this aspect however, since the direction of colon and semicolon makes it impossible to be hanged.\par
+They are all hanged to the lower right of the glyph. See the next subsection for more details.
+
+\subsection{Hanging Position}
+\begin{figure}[htb]
+    \centering
+    \includegraphics[height = 120pt]{figure/fig-tc.pdf}\quad\includegraphics[height = 120pt]{figure/fig-jp.pdf}
+    \caption{The linegap punctuations feature}
+    \label{fig:lgp}
+\end{figure}
+The position of these hanged punctuations is decided according to the following rules as shown in the figure \ref{fig:lgp}. For customizing, see subsection~\ref{sec:config}. The rules which occurs more early have the higher priorities.
+\begin{itemize}
+    \item The style of the three fonts are unified;
+    \item The position of the similar elements in different punctuations should be the same;
+    \item The glyph of the punctuations should touch the \textit{kanji\/}'s boundary;
+    \item Different punctuations' position can vary considering their glyphs' shapes, sizes, design respectively.
+\end{itemize}
+
+\subsection{User Configs}
+\label{sec:config}
+This feature is designed for the Source Han font series (思源系列). Due to different fonts' different punctuation marks, the output may be wrong (overlap, not aligned, etc). Also you may prefer your own settings. Therefore, two methods of customizing the positions of hanged punctuations is provided here.
+
+\subsubsection{Changing Parameters}
+In \textsf{Eva-JFM}, the tables which contains the parameters for the positions of these hanged punctuations is
+\begin{lstlisting}
+    [101,2] ==> [1]; [201,2] ==> [2]; [301,2] ==> [3].
+\end{lstlisting}
+Kindly modify \texttt{left} (dir right) and \texttt{down} (dir down) until the output is fine.
+You can also refer to the last section (\textit{Implementing\/}).
+
+\subsubsection{Using Extra Font}
+Extracting the glyphs for punctuation marks and package them into a new font (you can use programs like \textit{fontforge\/}) and use them for hanging punctuations later is the second solution. You can also load another font just for its punctuations (but loading a CJ font into {\TeX}'s memory has an expensive cost).\par
+After installing that font, you can use the \texttt{AltFont} key provided by \LuaTeX-ja to replace the punctuations. The actual code is shown above.
+\begin{lstlisting}
+    \setmainjfont[
+        Language = §\meta{language}§,
+        TateFeatures = {
+            JFM = eva/{vert, lgp, §\meta{language}§},
+            AltFont = {
+                {Range = "§\meta{utf-8 code}§, Font = §\meta{symbol font}§}
+            }
+        }
+    ]{§\meta{main font}§}
+\end{lstlisting}
+One of \texttt{Japanese}, \texttt{Chinese Traditional} or \texttt{Chinese Simplified} should be filled in the first \meta{language} option, the other one is for the corresponding JFM features. \meta{utf-8 code} selects the punctuations you'd like to replace with the ``punctuation font''\footnote{You can search \url{https://www.unicode.org/charts/unihanrsindex.html} for their unicodes representations.}.
+Finally, it's obvious that the \meta{symbol font} and the \meta{main font} options are for the ``punctuation font'' and the main font.\par
+It's also recommended for the developers to use the NFSS with
+\begin{lstlisting}
+    \DeclareAlternateKanjiFont{§\meta{base encoding}§}{§\meta{base family}§}{§\meta{base series}§}{§\meta{base shape}§}{§\meta{alt encoding}§}{§\meta{alt family}§}{§\meta{alt series}§}{§\meta{alt shape}§}{§\meta{range}§}
+\end{lstlisting}
+Option \meta{base} and \meta{alt} stands for main font and ``punctuation font''.\par
+Refer to the \LuaTeX-ja document~\cite{luatexja-doc} for more detailed syntax and usage as well as some examples.
+
+\section{Inspiration}
+\textsf{Eva-JFM}'s internal grouping is inspired by \texttt{min10.tfm}~\cite{min10}, while its \texttt{priority} feature's data partly comes from Noriyuki Abe's \texttt{jlreq.lua}~\cite{ltxjlreq}.\par
+This JFM's name comes from the animation \textit{Neon Genesis Evangelion\/} by Hideaki Anno.
+
+\begin{thebibliography}{9}
+    \addcontentsline{toc}{section}{\refname}
+    \bibitem{jlreq} W3C Japanese Layout Task Force~(ed). \newblock Requirements for Japanese Text Layout (W3C Working Group Note), 2022, 2023. \newblock \url{https://www.w3.org/TR/jlreq/}.
+    \bibitem{luatexja-doc} \LuaTeX-jaプロジェクトチーム. \newblock \LuaTeX-jaパッケージ, 2022, 2023.
+    \bibitem{unicode} The Unicode Consortium. \newblock The Unicode Standard Version 15.0 - Core Specification, 2022.
+    \bibitem{tex-by-topic} Victor Eijkhout. \newblock \TeX{} by Topic, A \TeX nician's Reference, Addison-Wesley, 1992.
+    \bibitem{min10} 乙部厳己. \newblock min10フォントについて. \newblock \url{http://argent.shinshu-u.ac.jp/~otobe/tex/files/min10.pdf}.
+    \bibitem{ltxjlreq} Noriyuki Abe. \newblock Jlreq Document Class, 2022. \newblock \url{https://github.com/abenori/jlreq}.
+    \bibitem{evang} 庵野秀明. \newblock 新世紀エヴァンゲリオン.
+\end{thebibliography}
+
+\section*{Implementation}
+The above is the implementation of this font metric. Can be used for reference.
+\lstinputlisting{jfm-eva.lua}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-en.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-sc.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-sc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-sc.pdf	2023-04-15 20:49:32 UTC (rev 66856)
+++ trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-sc.pdf	2023-04-15 20:49:53 UTC (rev 66857)

Property changes on: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-sc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-sc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-sc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-sc.tex	2023-04-15 20:49:53 UTC (rev 66857)
@@ -0,0 +1,241 @@
+%! TeX Program = LuaLaTeX
+\makeatletter
+\def\ltj at stdmcfont{SourceHanSerifSC}
+\makeatother
+\documentclass[twoside]{ltjsarticle}
+\usepackage{graphicx}
+\usepackage[match]{luatexja-fontspec}
+\setmainfont{Linux Libertine O}
+\setmainjfont{Source Han Serif SC}[Language = Chinese Simplified, YokoFeatures = {JFM = eva/{smpl, nstd, hgp}}]
+\setsansfont{Linux Biolinum O}
+\setmonofont[Scale = MatchLowercase, FakeStretch = 1.137121]{Iosevka Slab}
+\usepackage{luatexja-adjust}
+\ltjenableadjust[priority = true]
+\usepackage{listings}
+\lstset{
+    basicstyle = \ttfamily\small,
+    breaklines = true,
+    columns = fullflexible,
+    keepspaces = true,
+    numbers = left,
+    numberstyle = \tiny,
+    stepnumber = 1,
+    gobble = 4,
+    numbersep = 6pt,
+    escapechar = §
+}
+\usepackage{hyperref}
+\hypersetup{
+    hidelinks,
+    pdftitle = {Evangelion-JFM},
+    pdfauthor = {黄京},
+    pdfsubject = {TeX},
+    pdfkeywords = {Japanese Font Metric},
+    pdfstartview = FitV
+}
+\long\def\feature#1#2#3{{\vskip8pt\vbox{\normalsize\parindent=\zw\hangindent=2\zw\texttt{#1 --> ({\itshape #2\/})}\\\indent#3\par}}}
+\def\meta#1{{\normalfont\rmfamily\itshape$\langle$#1\/$\rangle$}}
+\def\空{\quad}
+\def\段{\par}
+\def\LuaTeX{Lua\kern-.2ex\TeX}
+\def\pTeX{p\kern-.2ex\TeX}
+\def\pdfTeX{pdf\TeX}
+\title{\sffamily\bfseries Evangelion Japanese Font Metric for \LuaTeX}
+\author{\large \url{https://github.com/RadioNoiseE/Evangelion-JFM}\\\url{https://www.ctan.org/pkg/evangelion-jfm}}
+\date{西历2023年\quad{}黄京}
+\begin{document}
+\lstset{doubleletterspace = true}
+\parindent=2\zw\parskip=2pt
+\maketitle
+
+\begin{abstract}
+    本文档将介绍名为Evangelion Japanese Font Metric(下简称为``\textsf{Eva-JFM}'')的JFM文件。其适用于简体中文(以下简称为「简中」)、繁体中文(以下简称为「繁中」)及日文字体的横直排。旨在提供一个充分利用\LuaTeX{}-ja的\texttt{priority}特性,基于标准\cite{jlreq}的同时,支持一些罕用特性的JFM文件。文档暂使用中文及西文撰写。
+\end{abstract}
+
+\section{背景及略介}
+\TeX{}是高德纳教授于20世纪末开发的强大排版引擎,能够完全满足西文排版的需求。然因时代局限性\footnote{如没有事实上的统一字符编码等。}以及客观原因\footnote{如中日字符集较大,以及书写方式的不同(纵书、横书),标点等。}对中日排版支持十分有限。为达成中日排版需求,在宏扩展(如\textsf{CJK}等)之外出现了引擎扩展。影响力较大的是\pTeX{}系列。\段
+\pTeX{}系列采用虚拟字体的理念,使用\texttt{TFM/VF}映射TrueType或OpenType字体完成排版。其不支持宏配置字体,也不支持直接生成PDF格式文件。但可以满足日本的传统横纵排版需求(工业标准)。\段
+\pdfTeX{}则是当时另一个\TeX{}的引擎扩展,支持不经DVI格式直接输出PDF格式的文件。然对Unicode(字符编码)及TrueType、OpenType(「现代」矢量字体格式)的支持繁琐或有限。\段
+\LuaTeX{}便是基于\pdfTeX{}的引擎扩展,在原生支持Unicode下提供Lua语言扩展(使能够使用\textsf{fontloader}等模块)支持现代字体。宏配置字体特性由\textsf{luaotfload}宏集提供。它也支持直接生成PDF文件。\段
+\LuaTeX{}-ja可看作是对两者的合并。这是一个由日本开发者北川弘典首倡的\LuaTeX{}下的日文支持项目,即将\pTeX{}(大部分)移植到\LuaTeX{}下。由于\LuaTeX{}支持宏配置字体,故不需要\texttt{VF}文件为字体提供映射,但为标点挤压等需求保留并扩展\footnote{如优先挤压(\texttt{priority})特性,及一些特殊字符(如\texttt{parbdd}、\texttt{glue})等。}了JFM文件。\段
+本项目就是一个JFM文件。使用\LuaTeX{}的\texttt{callback},将简中、繁中、日文及横纵方向、行间标点、悬挂标点、压缩字体等特性集中于\texttt{jfm-eva.lua}单个文件中。用户可按需调用特性来完成高质量的中日排版。
+
+\section{安裝及本地配置}
+本项目将源文件托管于GitHub平台,且已上传至Comprehensive \TeX{} Archive Net(CTAN)。用户可使用
+\begin{lstlisting}
+    tlmgr install evangelion-jfm
+\end{lstlisting}
+或使用其他包管理器安装。用户也可使用
+\begin{lstlisting}
+    mkdir Evangelion-JFM [&&] cd Evangelion-JFM
+    git clone https://github.com/RadioNoiseE/Evangelion-JFM
+\end{lstlisting}
+获取源文件,再将其放置在本地的\texttt{TEXMF}路径中,如
+\begin{lstlisting}
+    ~/Library/texlive/2023/texmf-dist/tex/luatex/eva-jfm
+\end{lstlisting}
+等。最后运行
+\begin{lstlisting}
+    mktexlsr
+\end{lstlisting}
+更新本地\TeX{}的\texttt{Ls-R}文件即可。\段
+本文件一般情况下无需用户进行本地配置,但若有特殊需求可见第\ref{sec:config}节。
+
+\section{使用}
+以下是在\LaTeX{}下使用繁中字体进行直排的示例
+\begin{lstlisting}
+    \usepackage{luatexja-fontspec, luatexja-adjust}
+    \setmainjfont{Source Han Serif TC}[Language = Chinese Traditional, TateFeatures = {JFM = eva/{vert, trad, nstd}}]
+    \ltjenableadjust[priority = true]
+\end{lstlisting}
+(注意需要调用支持直书的文档类或使用\texttt{\string\tate}命令)。\LuaTeX-ja的JFM语法为:
+\begin{lstlisting}
+    jfm = §\meta{JFM name}§/{§\meta{JFM features}§}
+\end{lstlisting}
+而一般情况使用\texttt{\string\setmainjfont}时则为:
+\begin{lstlisting}
+    \setmainjfont{§\meta{font name}§}[Language = §\meta{language name}§, §\meta{dir}§ = {JFM = §\meta{JFM name}§/{§\meta{JFM features}§}}]
+\end{lstlisting}
+其中,\meta{font name}自然为需要的字体名称。\meta{language name}在使用日文字体时可忽略,而使用简中、繁中字体时为必填\footnote{简中填\texttt{Chinese Simplified},繁中填\texttt{Chinese Traditional}即可。},因\LuaTeX-ja会默认将其覆盖为\texttt{Japanese}选项,而这会带来灾难性的后果\footnote{比如错误的标点位置:日文为冒号及分号中置、其余偏靠,简中是全部偏靠,而繁中则是统统中置。}。\meta{dir}选填\texttt{TateFeatures}(直书)或\texttt{YokoFeatures}(横书)。其后的\meta{JFM name}为调用JFM的文件名\footnote{\LuaTeX-ja会依\texttt{jfm-\meta{JFM name}.lua}的格式来查找该文件。}。最后的\meta{JFM features}选项为选择使用的JFM特性,详细请看第\ref{sec:feat}章。\段
+对于进阶用户,也推荐用
+\begin{lstlisting}
+    \def\ltj at stdyokojfm{eva/{§\meta{JFM features}§}}
+\end{lstlisting}
+或配合NFSS来使用。\段
+其他情况下设置JFM及其更多信息请看\LuaTeX-ja文档\cite{luatexja-doc}。
+
+\section{支持特性}
+\label{sec:feat}
+本章节将介绍\textsf{Eva-JFM}的所有特性,分别为:语言特性、方向特性、扩展特性、西文特性及私有特性。
+
+\subsection{語言特性}
+本区特性必填且只可填一个。不然则会报错。\段
+\feature{jp}{JaPanese}{%
+    日本语特性。当使用日文字体时需调用该特性。其与简中、繁中区别在于问号及感叹号后插入的伸缩胶量。影响特性\texttt{lgp},且对内部分组有影响。
+}
+\feature{trad}{TRADitional chinese}{%
+    繁中特性。当使用繁体中文字体时需调用。与简中、日本语特性的区别源于中置的标点。故,对于全部标点左右插入的伸缩胶的量都与简中、日本语不同。针对句点紧挨闭括号、标点位于句末时等皆有优化。
+}
+\feature{smpl}{SiMPLified chinese}{%
+    简中特性,使用简体中文字体排版时调用。与日本语、繁中特性区别源于分号及冒号等全部偏靠从而影响其左右插入伸缩胶的量。\textsf{Eva-JFM}对一些(不该出现的)神奇情况(如两个句号同时出现、开括号后出现问号等)进行优化。对问号、感叹号等作了特殊处理。
+}
+
+\subsection{方向特性}
+本分区特性与全部其他特性兼容,可同时调用。\段
+\feature{vert}{VERTical writing}{%
+    直书特性。对标点挤压、分组有影响。直书时必须调用。
+}
+
+\subsection{擴展特性}
+本区特性\texttt{hgp}不依赖\texttt{vert}特性,其余需同\texttt{vert}特性同时调用。否则报错。\段
+\feature{extd}{EXTenDed font}{%
+    压缩字体特性。默认为横比纵为100比80的字体压缩\footnotemark{}。可用\texttt{extd=\meta{ratio}}设置横方向拉伸比例(默认即为\texttt{1.25}。需同\texttt{extend}(\textsf{luaotfload})或\texttt{FakeStretch}(\textsf{fontspec})同时使用。
+}
+\footnotetext{日本新闻字体,如每日新闻明朝体。}
+\feature{lgp}{LineGap Punctuations}{%
+    行间标点特性。该特性将部分标点「悬挂」至行间。日文字体时与繁、简中字体时会有区别。详见第\ref{sec:lgp}章。
+}
+\feature{hgp}{HanGing Punctuations}{%
+    悬挂标点特性。该特性将部分标点「悬挂」于行末。仅简中、日文字体拥有该特性。
+}
+
+\subsection{西文特性}
+本区特性使用时需先使用\texttt{\string\ltjsetparameter}设置\texttt{jacharrange}从而调整JAchar的范围。
+\begin{lstlisting}
+    \ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, -8, +9}}
+\end{lstlisting}
+同时推荐与对应OpenType特性同时使用。\段
+\feature{hwid}{Half WIDth}{%
+    半宽西文特性。使用此特性(且按上述设置完成后)西文字母排布为严格半宽。本特性不会压缩或拉伸西文字母,故当未使用对应半宽字体特性时,只会简单的重叠,此时不推荐使用。同时也将失去所有kern以及italic correction的数据,同时忽略\texttt{xkanjiskip}参数。请务必谨慎调用。
+}
+\feature{fwid}{Full WIDth}{%
+    全宽西文特性。描述同上。但,若不调用全宽特性,西文间距会被简单撑开。
+}
+
+\subsection{私有特性}
+使用本区特性前请先确保你清楚地知道你在做什么。\段
+\feature{nstd}{Non STandarD}{%
+    忽略标准特性。字体排印标准\cite{jlreq}认为逗号的压缩权重应比句号要低。本特性将句号的压缩优先级与逗号交换,使逗号被优先压缩\footnotemark{}。仅在使用\textsf{luatexja-adjust}宏集时有效。
+}
+\footnotetext{考虑逗号、句号在文字系统中占的重量,以及「开明」压缩风格。}
+
+\section{行間標點特性}
+\label{sec:lgp}
+本章节将提供更多详细的关于行间标点特性的信息,以及可能出现的问题及其解决方案。
+\subsection{關於「懸掛」}
+行间标点可见于古籍之中,是将标点符号与直书结合妥协的产物。\段
+传统上悬挂句号与逗号。而\textsf{Eva-JFM}特性在繁中、简中特性下会悬挂句号、逗号、顿号、冒号及分号,日文字体下则不悬挂冒号及分号。原因在于日本习惯上将冒号与分号看作「中点类」,直书时横置处理。\段
+本JFM将全部标点悬挂于字体右下位置。详见下一节。
+
+\subsection{懸掛的位置}
+\begin{figure}[htb]
+    \centering
+    \includegraphics[height = 12\zh]{figure/fig-tc.pdf}\空\includegraphics[height = 12\zh]{figure/fig-jp.pdf}
+    \caption{行间标点特性示意图}
+    \label{fig:lgp}
+\end{figure}
+标点悬挂的位置有以下考量,可参照图\ref{fig:lgp}~。若有特殊需求请看第\ref{sec:config}节。优先级由上至下。
+\begin{itemize}
+    \item 三种字体风格统一,位置原则上一致(故,繁中字体也悬挂于右下、而非居中);
+    \item 不同标点中的相同(似)元素位置相同;
+    \item 繁中、简中、日文字体标点触字框右边线;
+    \item 不同标点符号因形状不同可于字框底线略下沉或上浮;
+    \item 不同标点符号因大小不同可靠近或远离字框右边线;
+    \item 三种字体可分别因字符设计的差异而位置略微区别。
+\end{itemize}
+
+\subsection{用戶配置}
+\label{sec:config}
+本特性是以三套思源字体为基准设计的。而由于各字体的标点符号位置不可避免会有不同,故在某些特殊情况下会出现错位影响视觉效果的情况。或是单纯对原设定而言更偏好其他设定等原因,本节提供自定义及调整的两种方法。第一种较简单但可移植性较差,而第二种虽繁琐但一劳永逸。
+
+\subsubsection{修改原程式碼}
+在\textsf{Eva-JFM}中,控制行间标点的分区分别为
+\begin{lstlisting}
+    [101,2] ==> [1]; [201,2] ==> [2]; [301,2] ==> [3].
+\end{lstlisting}
+只需调整其中\texttt{left}和\texttt{down}键的值即可。其中\texttt{left}为向右移动,\texttt{down}为向下移动。
+具体可参照终章。
+
+\subsubsection{使用外掛符號字體}
+该方法的原理就是使用特殊的仅包含(标点)符号的字体来替换原有字体中的标点符号,从而稳定其表现。可使用字体熔炉等工具将标点符号从整套字体中提取出来并封装为新字体,也可使用开源符号字体。\段
+将其放入\texttt{TEXMF}并更新\texttt{Ls-R}文件后即可使用\LuaTeX-ja提供的\texttt{AltFont}键进行替换,例元:
+\begin{lstlisting}
+    \setmainjfont[
+        Language = §\meta{language}§,
+        TateFeatures = {
+            JFM = eva/{vert, lgp, §\meta{language}§},
+            AltFont = {
+                {Range = "§\meta{utf-8 code}§, Font = §\meta{symbol font}§}
+            }
+        }
+    ]{§\meta{main font}§}
+\end{lstlisting}
+其中首个\meta{language}可选填\texttt{Japanese}、\texttt{Chinese Traditional}或\texttt{Chinese Simplified},第二个则填语言特性分区的对应\texttt{jp}、\texttt{trad}及\texttt{smpl}特性。\meta{utf-8 code}则为需要替换的标点符号的Unicode编码,如需替换句号(ideographic full stop,\texttt{U+3002})则填\texttt{3002}\footnote{编码可至\url{https://www.unicode.org/charts/unihanrsindex.html}查询。}。
+\meta{symbol font}以及\meta{main font}填符号字体名称、正文字体名称即可。\段
+对于开发者,也建议使用NFSS的
+\begin{lstlisting}
+    \DeclareAlternateKanjiFont{§\meta{base encoding}§}{§\meta{base family}§}{§\meta{base series}§}{§\meta{base shape}§}{§\meta{alt encoding}§}{§\meta{alt family}§}{§\meta{alt series}§}{§\meta{alt shape}§}{§\meta{range}§}
+\end{lstlisting}
+进行替换。其中\meta{base}为正文字体,\meta{alt}则为替换符号字体。\段
+具体语法及示例可看\LuaTeX-ja文档\cite{luatexja-doc}。
+
+\section{启發}
+\textsf{Eva-JFM}的内部分组受\texttt{min10.tfm} \cite{min10}的启发,支持的\texttt{priority}特性则取自阿部紀行氏的\texttt{jlreq.lua} \cite{ltxjlreq}文件。其余可见参考文献。\段
+本JFM的名字来源于庵野秀明的『新世紀エヴァンゲリオン』。
+
+\begin{thebibliography}{9}
+    \addcontentsline{toc}{section}{\refname}
+    \bibitem{jlreq} W3C Japanese Layout Task Force~(ed). \newblock Requirements for Japanese Text Layout (W3C Working Group Note), 2022, 2023. \newblock \url{https://www.w3.org/TR/jlreq/}.
+    \bibitem{luatexja-doc} \LuaTeX-jaプロジェクトチーム. \newblock \LuaTeX-jaパッケージ, 2022, 2023.
+    \bibitem{unicode} The Unicode Consortium. \newblock The Unicode Standard Version 15.0 - Core Specification, 2022.
+    \bibitem{tex-by-topic} Victor Eijkhout. \newblock \TeX{} by Topic, A \TeX nician's Reference, Addison-Wesley, 1992.
+    \bibitem{min10} 乙部厳己. \newblock min10フォントについて. \newblock \url{http://argent.shinshu-u.ac.jp/~otobe/tex/files/min10.pdf}.
+    \bibitem{ltxjlreq} Noriyuki Abe. \newblock Jlreq Document Class, 2022. \newblock \url{https://github.com/abenori/jlreq}.
+    \bibitem{evang} 庵野秀明. \newblock 新世紀エヴァンゲリオン.
+\end{thebibliography}
+
+\section*{程式碼}
+以下为\texttt{jfm-eva.lua}文件内容,供参考。%及二次开发等。
+\lstinputlisting{jfm-eva.lua}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Eva-JFM_doc-sc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Evangelion-doc.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Evangelion-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Evangelion-doc.tex	2023-04-15 20:49:32 UTC (rev 66856)
+++ trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/Evangelion-doc.tex	2023-04-15 20:49:53 UTC (rev 66857)
@@ -1,225 +0,0 @@
-%! TeX Program = LuaLaTeX
-
-\documentclass{ltjsarticle}
-%\documentclass[
-%    paper = a4paper,
-%    fontsize = 12Q,
-%    jafontsize = 12Q,
-%    %line_length = ?zw,
-%    %number_of_lines = ?,
-%    article
-%]{jlreq}
-
-\usepackage{graphicx}
-
-\usepackage[match]{luatexja-fontspec}
-\setmainfont{Linux Libertine O}
-\setmainjfont{Source Han Serif SC}[Language = Chinese Simplified, YokoFeatures = {JFM = eva/{smpl, nstd}}]
-\setsansfont{Linux Biolinum O}
-%\setsansjfont{Source Han Sans SC}[Language = Chinese Simplified, YokoFeatures = {JFM = eva/{smpl, nstd}}]
-\setmonofont[Scale=MatchLowercase, FakeStretch=1.137121, RawFeature=-notdef]{Iosevka Slab}
-%\setmonojfont{Source Han Sans SC}
-
-\usepackage{luatexja-adjust}
-\ltjenableadjust[priority = true]
-
-\usepackage{listings}
-%\lstloadlanguages{TeX}
-\lstset{
-    %language = TeX,
-    basicstyle = \ttfamily\small,
-    breaklines = true,
-    columns = flexible,
-    numbers = left,
-    numberstyle = \tiny,
-    stepnumber = 1,
-    gobble = 4,
-    numbersep = 6pt,
-    escapechar = §
-}
-
-\usepackage{hyperref}
-\hypersetup{
-    hidelinks,
-    pdftitle = {Evangelion-JFM},
-    pdfauthor = {RadioNoiseE},
-    pdfsubject = {TeX},
-    pdfkeywords = {Japanese Font Metric},
-    pdfstartview = FitV
-}
-
-\long\def\feature#1#2#3{{\vskip8pt\vbox{\normalsize\parindent=\zw\hangindent=2\zw\texttt{#1 --> ({\itshape #2\/})}\\\indent#3\par}}}
-\def\meta#1{{\normalfont\rmfamily\itshape$\langle$#1\/$\rangle$}}
-\def\空{\quad}
-\def\段{\par}
-\def\LuaTeX{Lua\kern-.2ex\TeX}
-\def\pTeX{p\kern-.2ex\TeX}
-\def\pdfTeX{pdf\TeX}
-
-\title{\sffamily\bfseries Evangelion Japanese Font Metric for \LuaTeX}
-\author{\large \url{https://github.com/RadioNoiseE/Evangelion-JFM}}
-\date{西历2023年}
-
-\begin{document}
-\parindent=2\zw\parskip=2pt
-
-\maketitle
-
-\begin{abstract}
-    本文档将介绍名为Evangelion Japanese Font Metric(下简称为``\textsf{Eva-JFM}'')的JFM文件。其适用于简体中文(以下简称为「简中」)、繁体中文(以下简称为「繁中」)及日文字体的横直排。旨在提供一个充分利用\LuaTeX{}-ja的\texttt{priority}特性,基于标准\cite{jlreq}的同时,支持一些罕用特性的JFM文件。文档暂仅使用中文撰写。\段
-    % This document introduces a JFM file named ``Evangelion-JFM'' (hereinafter referred to as ``\textsf{Eva-JFM}''). It supports vertical and horizontal written Simplified Chinese (hereinafter referred to as ``SC''), Traditional Chinese (hereinafter referred to as ``TC''), and Japanese (hereinafter referred to ad ``JP''). It aims to provide a JFM file that takes full advantage of the \texttt{priority} and other powerful features from \LuaTeX{}-ja, supporting the widely accepted standards (i.e. \cite{jlreq}), and supporting some rarely-used features. The documentation is written in both Chinese Simplified and English.
-\end{abstract}
-
-\section{背景及略介:Background Knowledge and a Rough Introduction}
-\TeX{}是高德纳教授于20世纪末开发的强大排版引擎,能够完全满足西文排版的需求。然因时代局限性\footnote{如没有事实上的统一字符编码等。}以及客观原因\footnote{如中日字符集较大,以及书写方式的不同(纵书、横书),标点等。}对中日排版支持十分有限。为达成中日排版需求,在宏扩展(如\textsf{CJK}等)之外出现了引擎扩展。影响力较大的是\pTeX{}系列。\段
-\pTeX{}系列采用虚拟字体的理念,使用\texttt{TFM/VF}映射TrueType或OpenType字体完成排版。其不支持宏配置字体,也不支持直接生成PDF格式文件。但可以满足日本的传统横纵排版需求(工业标准)。\段
-\pdfTeX{}则是当时另一个\TeX{}的引擎扩展,支持不经DVI格式直接输出PDF格式的文件。然对Unicode(字符编码)及TrueType、OpenType(「现代」矢量字体格式)的支持繁琐或有限。\LuaTeX{}便是基于\pdfTeX{}的引擎扩展,在原生支持Unicode下提供Lua语言扩展(使能够使用\textsf{fontloader}等模块)支持现代字体。宏配置字体特性由\textsf{luaotfload}宏集提供。它也支持直接生成PDF文件。\段
-\LuaTeX{}-ja可看作是对两者的合并。这是一个由日本开发者北川弘典首倡的\LuaTeX{}下的日文支持项目,即将\pTeX{}(大部分)移植到\LuaTeX{}下。由于\LuaTeX{}支持宏配置字体,故不需要\texttt{VF}文件为字体提供映射,但为标点挤压等需求保留并扩展\footnote{如优先挤压(\texttt{priority})特性,及一些特殊字符(如\texttt{parbdd}、\texttt{glue})等。}了JFM文件。\段
-本项目就是一个JFM文件。使用\LuaTeX{}的\texttt{callback},将简中、繁中、日文及横纵方向、行间标点、悬挂标点、压缩字体等特性集中于\texttt{jfm-eva.lua}单个文件中。用户可按需调用特性来完成高质量的中日排版。
-
-\section{安裝及本地配置:Installation and Local Configs}
-本项目将源文件托管于GitHub平台,暂未上传至Comprehensive \TeX{} Archive Net(CTAN)。用户可使用
-\begin{lstlisting}
-    mkdir Evangelion-JFM [&&] cd Evangelion-JFM
-    git clone https://github.com/RadioNoiseE/Evangelion-JFM
-\end{lstlisting}
-获取源文件,再将其放置在本地的\texttt{TEXMF}路径中,如
-\begin{lstlisting}
-    ~/Library/texlive/2023/texmf-dist/tex/luatex/eva-jfm
-\end{lstlisting}
-等。最后运行
-\begin{lstlisting}
-    mktexlsr
-\end{lstlisting}
-更新本地\TeX{}的\texttt{Ls-R}文件即可。\段
-本文件一般情况下无需用户进行本地配置,但若有特殊需求可见第\ref{sec:config}节。
-
-\section{使用:Using}
-以下是在\LaTeX{}下使用繁中字体进行直排的示例
-\begin{lstlisting}
-    \usepackage{luatexja-fontspec, luatexja-adjust}
-    \setmainjfont{Source Han Serif TC}[Language = Chinese Traditional, TateFeatures = {JFM = eva/{vert, trad, nstd}}]
-    \ltjenableadjust[priority = true]
-\end{lstlisting}
-(注意需要调用支持直书的文档类或使用\texttt{\string\tate}命令)。\LuaTeX-ja的JFM语法为:
-\begin{lstlisting}
-    jfm = §\meta{JFM name}§/{§\meta{JFM features}§}
-\end{lstlisting}
-而一般情况使用\texttt{\string\setmainjfont}时则为:
-\begin{lstlisting}
-    \setmainjfont{§\meta{font name}§}[Language = §\meta{language name}§, §\meta{dir}§ = {JFM = §\meta{JFM name}§/{§\meta{JFM features}§}}]
-\end{lstlisting}
-其中,\meta{font name}自然为需要的字体名称。\meta{language name}在使用日文字体时可忽略,而使用简中、繁中字体时为必填,因\LuaTeX-ja会默认将其覆盖为\texttt{Japanese}选项,而这会带来灾难性的后果\footnote{比如错误的标点位置:日文为冒号及分号中置、其余偏靠,简中是全部偏靠,而繁中则是统统中置。}。\meta{dir}选填\texttt{TateFeatures}(直书)或\texttt{YokoFeatures}(横书)。其后的\meta{JFM name}为调用JFM的文件名\footnote{\LuaTeX-ja会依\texttt{jfm-\meta{JFM name}.lua}的格式来查找该文件。}。最后的\meta{JFM features}选项为选择使用的JFM特性,详细请看第\ref{sec:feat}章。\段
-其他情况下设置JFM及其更多信息请看\LuaTeX-ja文档\cite{luatexja-doc}。
-
-\section{支持特性:Supported Features}\label{sec:feat}
-本章节将介绍\textsf{Eva-JFM}的所有特性,分别为:语言特性、方向特性、扩展特性及私有特性。
-
-\subsection{語言特性:Language Features}
-本区特性必填且只可填一个。不然则会报错。\段
-\feature{jp}{JaPanese}{%
-    日本语特性。当使用日文字体时需调用该特性。其与简中、繁中区别在于问号及感叹号后插入的伸缩胶量。影响特性\texttt{lgp},且对内部分组有影响。
-}
-\feature{trad}{TRADitional chinese}{%
-    繁中特性。当使用繁体中文字体时需调用。与简中、日本语特性的区别源于中置的标点。故,对于全部标点左右插入的伸缩胶的量都与简中、日本语不同。针对句点紧挨闭括号、标点位于句末时等皆有优化。
-}
-\feature{smpl}{SiMPLified}{%
-    简中特性,使用简体中文字体排版时调用。与日本语、繁中特性区别源于分号及冒号等全部偏靠从而影响其左右插入伸缩胶的量。\textsf{Eva-JFM}对一些(不该出现的)神奇情况(如两个句号同时出现、开括号后出现问号等)进行优化。对问号、感叹号等作了特殊处理。
-}
-
-\subsection{方向特性:(Writing) Direction Features}
-本分区特性与全部其他特性兼容,可同时调用。\段
-\feature{vert}{VERTical writing}{%
-    直书特性。对标点挤压、分组有影响。直书时必须调用。
-}
-
-\subsection{擴展特性:Extended Features}
-本区特性\texttt{hgp}不依赖\texttt{vert}特性,其余需同\texttt{vert}特性同时调用。否则报错。\段
-\feature{extd}{EXTenDed font}{%
-    压缩字体特性。目前仅支持横比纵为100比80的字体压缩\footnotemark{}。需同\texttt{extend}(\textsf{luaotfload})或\texttt{FakeStretch}(\textsf{fontspec})同时使用。
-}\footnotetext{日本新闻字体,如每日新闻明朝体。}
-\feature{lgp}{LineGap Punctuations}{%
-    行间标点特性。该特性将部分标点「悬挂」至行间。日文字体时与繁、简中字体时会有区别。详见第\ref{sec:lgp}章。
-}
-\feature{hgp}{HanGing Punctuations}{%
-    悬挂标点特性。该特性将部分标点「悬挂」于行末。仅简中、日文字体拥有该特性。
-}
-
-\subsection{私有特性:Dark Features}
-使用本区特性前请先确保你清楚地知道你在做什么。\段
-\feature{nstd}{Non STandarD}{%
-    忽略标准特性。字体排印标准\cite{jlreq}认为逗号的压缩权重应比句号要低。本特性将句号的压缩优先级与逗号交换,使逗号被优先压缩\footnotemark{}。仅在使用\textsf{luatexja-adjust}宏集时有效。
-}\footnotetext{考虑逗号、句号在文字系统中占的重量,以及「开明」压缩风格。}
-
-\section{行間標點特性:More About Linegap Punctuations}\label{sec:lgp}
-本章节将提供更多详细的关于行间标点特性的信息,以及可能出现的问题及其解决方案。
-
-\subsection{關於「懸掛」:About ``Hanging''}
-行间标点可见于古籍之中,是将标点符号与直书结合妥协的产物。\段
-传统上悬挂句号与逗号。而\textsf{Eva-JFM}特性在繁中、简中特性下会悬挂句号、逗号、顿号、冒号及分号,日文字体下则不悬挂冒号及分号。原因在于日本习惯上将冒号与分号看作「中点类」,直书时横置处理。\段
-本JFM将全部标点悬挂于字体右下位置。详见下一节。
-
-\subsection{懸掛的位置:Hanging Position}
-%Figure Here
-\begin{figure}[htb]
-    \centering
-    \includegraphics[height = 12\zh]{figure/fig-tc.pdf}\空\includegraphics[height = 12\zh]{figure/fig-jp.pdf}
-    \caption{行间标点特性示意图}\label{fig:lgp}
-\end{figure}
-
-标点悬挂的位置有以下考量,可参照图\ref{fig:lgp}。若有特殊需求请看第\ref{sec:config}节。优先级由上至下。
-\begin{itemize}
-    \item 三种字体风格统一,位置原则上一致(故,繁中字体也悬挂于右下、而非居中);
-    \item 不同标点中的相同(似)元素位置相同;
-    \item 繁中、简中、日文字体标点触字框右边线;
-    \item 不同标点符号因形状不同可于字框底线略下沉或上浮;
-    \item 不同标点符号因大小不同可靠近或远离字框右边线;
-    \item 三种字体可分别因字符设计的差异而位置略微区别。
-\end{itemize}
-
-\subsection{用戶配置:Configurations}\label{sec:config}
-本特性是以三套思源字体为基准设计的。而由于各字体的标点符号位置不可避免会有不同,故在某些特殊情况下会出现错位影响视觉效果的情况。或是单纯对原设定而言更偏好其他设定等原因,本节提供自定义及调整的两种方法。第一种较简单但可移植性较差,而第二种虽繁琐但一劳永逸。
-
-\subsubsection{修改原程式碼:Changing Parameters}
-在\textsf{Eva-JFM}中,控制行间标点的分区分别为
-\begin{lstlisting}
-    [101,2] ==> [1]; [201,2] ==> [2]; [301,2] ==> [3].
-\end{lstlisting}
-只需调整其中\texttt{left}和\texttt{down}键的值即可。其中\texttt{left}为向右移动,\texttt{down}为向下移动。
-具体可参照第\ref{sec:impl}章。
-
-\subsubsection{使用外掛符號字體:Using Seperate Punctuation Font}
-该方法的原理就是使用特殊的仅包含(标点)符号的字体来替换原有字体中的标点符号,从而稳定其表现。符号字体可使用\url{https://github.com/Buernia/Zhudou-Sans}处的开源字体。其基于思源黑体,还添加了许多其他符号(但这里我们只会用到六个符号)及标点挤压等特性。\段
-将其放入\texttt{TEXMF}并更新\texttt{Ls-R}文件后即可使用\LuaTeX-ja提供的\texttt{AltFont}键进行替换,例元:
-\begin{lstlisting}
-    \setmainjfont[
-        Language = §\meta{language}§,
-        TateFeatures = {
-            JFM = eva/{vert, lgp, §\meta{language}§},
-            AltFont = {
-                {Range = "§\meta{utf-8 code}§, Font = §\meta{symbol font}§}
-            }
-        }
-    ]{§\meta{main font}§}
-\end{lstlisting}
-其中首个\meta{language}可选填\texttt{Japanese}、\texttt{Chinese Traditional}或\texttt{Chinese Simplified},第二个则填语言特性分区的对应\texttt{jp}、\texttt{trad}及\texttt{smpl}特性。\meta{utf-8 code}则为需要替换的标点符号的Unicode编码,如需替换句号(ideographic full stop,\texttt{U+3002})则填\texttt{3002}\footnote{编码可至\url{https://www.unicode.org/charts/unihanrsindex.html}查询。}即可。
-\meta{symbol font}以及\meta{main font}填符号字体名称、正文字体名称即可。具体语法及示例可看\cite{luatexja-doc}。
-
-\section{启發:Inspiration}
-\textsf{Eva-JFM}的内部分组受\texttt{min10.tfm} \cite{min10}的启发,支持的\texttt{priority}特性则取自阿部紀行氏的\texttt{jlreq.lua} \cite{ltxjlreq}文件。其余可见参考文献。
-
-\begin{thebibliography}{99}
-    \addcontentsline{toc}{section}{\refname}
-    \bibitem{jlreq} W3C Japanese Layout Task Force~(ed). \newblock Requirements for Japanese Text Layout (W3C Working Group Note), 2022, 2023. \newblock \url{https://www.w3.org/TR/jlreq/}.
-    \bibitem{luatexja-doc} \LuaTeX-jaプロジェクトチーム. \newblock \LuaTeX-jaパッケージ, 2022, 2023.
-    \bibitem{unicode} The Unicode Consortium. \newblock The Unicode Standard Version 15.0 - Core Specification, 2022.
-    \bibitem{tex-by-topic} Victor Eijkhout. \newblock \TeX{} by Topic, A \TeX nician's Reference, Addison-Wesley, 1992.
-    \bibitem{min10} 乙部厳己. \newblock min10フォントについて. \newblock \url{http://argent.shinshu-u.ac.jp/~otobe/tex/files/min10.pdf}.
-    \bibitem{ltxjlreq} Noriyuki Abe. \newblock Jlreq Document Class, 2022. \newblock \url{https://github.com/abenori/jlreq}.
-\end{thebibliography}
-
-\section*{程式碼:Implementation}\label{sec:impl}
-以下为\texttt{jfm-eva.lua}文件内容,供参考。%及二次开发等。
-\lstinputlisting{jfm-eva.lua}
-
-\end{document}

Modified: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/README.md	2023-04-15 20:49:32 UTC (rev 66856)
+++ trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/README.md	2023-04-15 20:49:53 UTC (rev 66857)
@@ -2,25 +2,85 @@
 
 ## 简介  Some Information
 
-`Eva-JFM`是一个为在LuaTeX-ja下使用行间标点、压缩字体等特性设计的JFM文件。其可用于简中、繁中、日文字体,完全利用priority特性(数据来源jlreq),支持直书,同时为繁体字体进行优化(如行末、与直角引号之间等)。七个特性全集中与一个`Lua`文件中,可简单调用。
+`Eva-JFM`是一个为在LuaTeX-ja下使用行间标点、压缩字体等特性设计的JFM文件。其可用于简中、繁中、日文字体,充分利用priority特性(数据来源jlreq),支持直书,同时为繁体字体进行优化(如行末、与直角引号之间等)。
 
-详细请看[文档](Evangelion-doc.pdf)。
+详细请看[简体中文文档](Eva-JFM_doc-sc.pdf)。
 
-`Eva-JFM` is a JFM file which aims to support 'linegap puncutations', 'scaled font' and more features under LuaTeX-ja. It can be used with Traditional Chinese, Simplified Chinese and Japanese fonts, supporting vertical typesetting, making full-use of the `priority` feature, and added special support for Traditional Chinese font. It's based on jlreq, and insipered by `min10.tfm`. All its seven features are embeded into one file `jfm-eva.lua` to simplify the using.
+本项目已上传至[CTAN](https://www.ctan.org/pkg/evangelion-jfm)。
 
-For more datails please see the [documentation](Evagelion-doc.pdf). The English and Japanese documentation is still in progress.
+`Eva-JFM` is a JFM file which aims to support 'linegap puncutations', 'scaled font' and more features under LuaTeX-ja. It can be used with Traditional Chinese, Simplified Chinese and Japanese fonts, supporting vertical typesetting, making full-use of the `priority` feature, and added special support for Traditional Chinese font. It's based on jlreq, and insipered by `min10.tfm`. All its nine features are embeded into single file `jfm-eva.lua` to simplify the using.
 
+For more datails please see the [English documentation](Eva-JFM_doc-en.pdf). 
+
+The Japanese documentation is still in progress.
+
+This package is also available on [CTAN](https://www.ctan.org/pkg/evangelion-jfm).
+
+## 支持特性 Supported Features
+
+- 行间标点 Linegap Punctuations
+
+- 标点悬挂 Hanging Punctuations
+
+- 简体中文 Simplified Chinese
+
+- 繁体中文 Traditional Chinese
+
+- 日本语 Japanese
+
+- 直书 Vertical Typesetting
+
+- 半宽西文 Half-width Alphabets
+
+- 全宽西文 Full-width Alphabets
+
+- 忽略标准 Non-standard
+
 ## 状态 Current Version
-`Ver 1.0.0 (b)`
 
+`Ver 1.0.2 (h)`
+
 ## 历史 Changelog
-- 2023.2.11 Ver 1.0.0 (a): fixed feature `lgp` and added the documentation.
 
-- 2023.2.7 Ver 1.0.0 (b): the first version.
+- 2023.4.15 Ver 1.0.2 (h): revised English doc and add reference.
 
+- 2023.4.2 Ver 1.0.2 (g): typeset English document and revised both.
+
+- 2023.3.19 Ver 1.0.2 (f): fix `extd_ratio` and add `end_adjust` for midp.
+
+- 2023.3.18 Ver 1.0.2 (e): line-end adjust key fixed.
+
+- 2023.3.15 Ver 1.0.2 (d): revised documentation.
+
+- 2023.3.13 Ver 1.0.2 (c): entire documentation translated to English.
+
+- 2023.3.12 Ver 1.0.2 (b): the English documentation (section 3).
+
+- 2023.3.12 Ver 1.0.2 (a): the English documentation (section 1 & 2).
+
+- 2023.3.6 Ver 1.0.1 (f): adjust kanjiskip after `lgp`.
+
+- 2023.3.3 Ver 1.0.1 (e): fix `extd_ratio`.
+
+- 2023.2.27 Ver 1.0.1 (d): fix `parbdd` and `boxbdd`.
+
+- 2023.2.26 Ver 1.0.1 (c): users can now customize ratio for `extd` feature.
+
+- 2023.2.26 Ver 1.0.1 (b): docstrip, updated documentation.
+
+- 2023.2.25 Ver 1.0.1 (a): add feature `hwid` and `fwid`.
+
+- 2023.2.24 Ver 1.0.0 (d): more `priority`, revised document.
+
+- 2023.2.18 Ver 1.0.0 (c): fix bug and updated documentation, uploaded to ctan, and added feature `hanging punc`.
+
+- 2023.2.11 Ver 1.0.0 (b): fixed feature `lgp` and added documentation.
+
+- 2023.2.7 Ver 1.0.0 (a): initial version.
+
 ## Copyright
 This project is under MIT License.
 
-Author: RadioNoiseE.
+Author: RadioNoiseE, 黄京.
 
-Contact: j18516785606 at icloud.com.
+Email Addr: j18516785606 at icloud.com.

Added: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig-jp.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig-jp.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig-jp.pdf	2023-04-15 20:49:32 UTC (rev 66856)
+++ trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig-jp.pdf	2023-04-15 20:49:53 UTC (rev 66857)

Property changes on: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig-jp.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig-tc.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig-tc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig-tc.pdf	2023-04-15 20:49:32 UTC (rev 66856)
+++ trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig-tc.pdf	2023-04-15 20:49:53 UTC (rev 66857)

Property changes on: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig-tc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig.tex	2023-04-15 20:49:53 UTC (rev 66857)
@@ -0,0 +1,18 @@
+\documentclass{ltjtarticle}
+\usepackage{luatexja-fontspec, geometry, lua-visual-debug}
+
+\geometry{papersize = {9\zh, 7\zw}, margin=1\zw}%textwidth = 6\zh, lines = 4, ignoreall, centering}
+\pagestyle{empty}
+
+\setmainjfont{SourceHanSerif}[TateFeatures = {JFM = eva/{jp, vert, lgp}}]
+
+\begin{document}
+
+\parindent=0pt\obeylines\lineskip=\zw\baselineskip=2\zw
+
+綠螘新醅酒,
+紅泥小火爐。
+晚來天欲雪,
+能飲一杯無。
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/figure/fig.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/make.sh
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/make.sh	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/make.sh	2023-04-15 20:49:53 UTC (rev 66857)
@@ -0,0 +1,22 @@
+## RadioNoiseE, 2023.
+## Evangelion Japanese Font Metric
+
+# Init
+echo "--Make: Running--"
+
+# Literate Programming - Strip out En/Sc docu
+luatex Evangelion-JFM.dtx
+
+# Complie respectively
+lualatex Eva-JFM_doc-sc.tex
+lualatex Eva-JFM_doc-sc.tex
+lualatex Eva-JFM_doc-en.tex
+lualatex Eva-JFM_doc-en.tex
+
+# Clean-up (requires LaTeXmk)
+latexmk -c Eva-JFM_doc-sc.tex
+latexmk -c Eva-JFM_doc-en.tex
+rm Eva-JFM_doc-sc.tex Eva-JFM_doc-en.tex
+
+# Terminate
+echo "--Make: Documentations and run-time files generated--"


Property changes on: trunk/Master/texmf-dist/doc/luatex/evangelion-jfm/make.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/luatex/evangelion-jfm/Evangelion-JFM.dtx
===================================================================
--- trunk/Master/texmf-dist/source/luatex/evangelion-jfm/Evangelion-JFM.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/luatex/evangelion-jfm/Evangelion-JFM.dtx	2023-04-15 20:49:53 UTC (rev 66857)
@@ -0,0 +1,361 @@
+% \iffalse meta-comment
+% Copyright © 2023, RadioNoiseE (Jing Huang)
+% Evangelion Japanese Font Metric for LuaTeX
+% Current Version: 1.0.1 (a)
+% Dev URL: https://github.com/RadioNoiseE/Evangelion-JFM
+% \fi
+%<*batchfile>
+\input docstrip.tex
+\keepsilent
+\edef\eva{\perCent! TeX Program = LuaLaTeX}
+\generate{\usepreamble\eva
+          \usepostamble\empty
+          \file{Eva-JFM_doc-sc.tex}{\from{\jobname.dtx}{sc}}
+          \file{Eva-JFM_doc-en.tex}{\from{\jobname.dtx}{en}}}
+\begingroup\obeyspaces
+\Msg{**********************************************}
+\Msg{* Now you can run the two generated files:   *}
+\Msg{*             Eva-JFM_doc-sc.tex             *}
+\Msg{*             Eva-JFM_doc-en.tex             *}
+\Msg{* through LuaLaTeX to get the documentation. *}
+\Msg{**********************************************}
+\endgroup
+\endbatchfile
+%</batchfile>
+%<*sc>
+\makeatletter
+\def\ltj at stdmcfont{SourceHanSerifSC}
+\makeatother
+%</sc>
+%<sc>\documentclass[twoside]{ltjsarticle}
+%<en>\documentclass[twoside]{article}
+%<en>\usepackage[margin=1.2in]{geometry}
+\usepackage{graphicx}
+%<sc>\usepackage[match]{luatexja-fontspec}
+%<en>\usepackage{fontspec, luatexja}
+%<*en>
+\newfontfeature{microtype}{protrusion=default;expansion=default}
+\defaultfontfeatures{microtype}
+\adjustspacing=2
+\protrudechars=2
+%</en>
+\setmainfont{Linux Libertine O}
+%<sc>\setmainjfont{Source Han Serif SC}[Language = Chinese Simplified, YokoFeatures = {JFM = eva/{smpl, nstd, hgp}}]
+\setsansfont{Linux Biolinum O}
+\setmonofont[Scale = MatchLowercase, FakeStretch = 1.137121]{Iosevka Slab}
+%<*sc>
+\usepackage{luatexja-adjust}
+\ltjenableadjust[priority = true]
+%</sc>
+\usepackage{listings}
+\lstset{
+    basicstyle = \ttfamily\small,
+    breaklines = true,
+    columns = fullflexible,
+    keepspaces = true,
+    numbers = left,
+    numberstyle = \tiny,
+    stepnumber = 1,
+    gobble = 4,
+    numbersep = 6pt,
+    escapechar = §
+}
+\usepackage{hyperref}
+\hypersetup{
+    hidelinks,
+    pdftitle = {Evangelion-JFM},
+%<sc>    pdfauthor = {黄京},
+%<en>    pdfauthor = {Jing Huang},
+    pdfsubject = {TeX},
+    pdfkeywords = {Japanese Font Metric},
+    pdfstartview = FitV
+}
+\long\def\feature#1#2#3{{\vskip8pt\vbox{\normalsize\parindent=\zw\hangindent=2\zw\texttt{#1 --> ({\itshape #2\/})}\\\indent#3\par}}}
+\def\meta#1{{\normalfont\rmfamily\itshape$\langle$#1\/$\rangle$}}
+%<sc>\def\空{\quad}
+%<sc>\def\段{\par}
+\def\LuaTeX{Lua\kern-.2ex\TeX}
+\def\pTeX{p\kern-.2ex\TeX}
+\def\pdfTeX{pdf\TeX}
+\title{\sffamily\bfseries Evangelion Japanese Font Metric for \LuaTeX}
+\author{\large \url{https://github.com/RadioNoiseE/Evangelion-JFM}\\\url{https://www.ctan.org/pkg/evangelion-jfm}}
+%<sc>\date{西历2023年\quad{}黄京}
+%<en>\date{2023, Jing Huang (黄京)}
+\begin{document}
+%<sc>\lstset{doubleletterspace = true}
+%<sc>\parindent=2\zw\parskip=2pt
+%<en>\parindent=12pt\parskip=2pt
+\maketitle
+
+\begin{abstract}
+%<sc>    本文档将介绍名为Evangelion Japanese Font Metric(下简称为``\textsf{Eva-JFM}'')的JFM文件。其适用于简体中文(以下简称为「简中」)、繁体中文(以下简称为「繁中」)及日文字体的横直排。旨在提供一个充分利用\LuaTeX{}-ja的\texttt{priority}特性,基于标准\cite{jlreq}的同时,支持一些罕用特性的JFM文件。文档暂使用中文及西文撰写。
+%<en>    This documentation is going to introduce Evangelion Japanese Font Metric (hereinafter referred to as ``\textsf{Eva-JFM}''), a Japanese Font Metric for typesetting high quality Chinese and Japanese documents. It can be used with Traditional Chinese, Simplified Chinese and Japanese fonts for both vertically and horizontally typesetted texts. It aims to provide a font metric which makes full use of the \texttt{priority} feature (provided by \textsf{\LuaTeX-ja}), bases on the standard~\cite{jlreq}, and supports some advanced (a.k.a., rarely-used) features. The documentation is now written in both Chinese and English.\par
+%<en>    This documentation is far from complete. It may have many grammatical (and contextual) errors.
+\end{abstract}
+
+%<sc>\section{背景及略介}
+%<en>\section{Background Information and a Rough Introduction}
+%<sc>\TeX{}是高德纳教授于20世纪末开发的强大排版引擎,能够完全满足西文排版的需求。然因时代局限性\footnote{如没有事实上的统一字符编码等。}以及客观原因\footnote{如中日字符集较大,以及书写方式的不同(纵书、横书),标点等。}对中日排版支持十分有限。为达成中日排版需求,在宏扩展(如\textsf{CJK}等)之外出现了引擎扩展。影响力较大的是\pTeX{}系列。\段
+%<en>{\TeX} is a powerful typesetting system ``intended for the creation of beautiful books'', it has full support for typesetting English based texts. However, its support for CJ text is limited\footnote{Maybe because there was no universally recognized or accepted CJ character set standard as well as an encoding system.}. For handling CJ texts in {\TeX}, both macro extensions (i.e., \textsf{CJK}) and engine extensions were developed. One of the most influential one is (the) {\pTeX} (series).\par
+%<sc>\pTeX{}系列采用虚拟字体的理念,使用\texttt{TFM/VF}映射TrueType或OpenType字体完成排版。其不支持宏配置字体,也不支持直接生成PDF格式文件。但可以满足日本的传统横纵排版需求(工业标准)。\段
+%<en>{\pTeX} uses a virtual font scheme, by mapping TrueType or OpenType fonts using \texttt{TFM/VF} files. It doesn't support font configuration through macros, and has no support for PDF format output. Its advantage is the proven ability for dealing with traditional Japanese typographic layout requirements.\par
+%<sc>\pdfTeX{}则是当时另一个\TeX{}的引擎扩展,支持不经DVI格式直接输出PDF格式的文件。然对Unicode(字符编码)及TrueType、OpenType(「现代」矢量字体格式)的支持繁琐或有限。\段
+%<en>{\pdfTeX} is a {\TeX} engine extension which can directly output PDF files (just as its name). But it has limited support to Unicode as well as modern font formats (TrueType and OpenType vector font formats).\par
+%<sc>\LuaTeX{}便是基于\pdfTeX{}的引擎扩展,在原生支持Unicode下提供Lua语言扩展(使能够使用\textsf{fontloader}等模块)支持现代字体。宏配置字体特性由\textsf{luaotfload}宏集提供。它也支持直接生成PDF文件。\段
+%<en>{\LuaTeX} is based on {\pdfTeX}. The inclusion of Lua enables it to support Unicode with the \textsf{reader} module, and modern fonts by using \textsf{fontloader}. Its macro based font setup feature is provided by \textsf{luaotfload}.\par
+%<sc>\LuaTeX{}-ja可看作是对两者的合并。这是一个由日本开发者北川弘典首倡的\LuaTeX{}下的日文支持项目,即将\pTeX{}(大部分)移植到\LuaTeX{}下。由于\LuaTeX{}支持宏配置字体,故不需要\texttt{VF}文件为字体提供映射,但为标点挤压等需求保留并扩展\footnote{如优先挤压(\texttt{priority})特性,及一些特殊字符(如\texttt{parbdd}、\texttt{glue})等。}了JFM文件。\段
+%<en>\LuaTeX-ja can be seen as a porting of {\pTeX} and {\LuaTeX}. It's a macro package for typesetting high quality Japanese documents when using {\LuaTeX}. {\LuaTeX} supports font configuring by macros, therefore there's no need to keep {\pTeX}'s \texttt{VF} file. But for advanced features it left and extended\footnote{The \texttt{priority} feature and some imaginary characters as well.} the so-called JFM file.\par
+%<sc>本项目就是一个JFM文件。使用\LuaTeX{}的\texttt{callback},将简中、繁中、日文及横纵方向、行间标点、悬挂标点、压缩字体等特性集中于\texttt{jfm-eva.lua}单个文件中。用户可按需调用特性来完成高质量的中日排版。
+%<en>This document describes \textsf{Eva-JFM}, an advanced JFM file. By using {\LuaTeX}'s callback, it embeds features (maybe) needed in CJ text typesetting in \texttt{Eva-JFM.lua}. The features supported now are ``Traditional Chinese'', ``Simplified Chinese'', ``Japanese'', ``Vertical Typesetting'', ``Linegap Punctuations'', ``Hanging Punctuations'', ``Extended Font'', and ``Non Standard''.
+
+%<sc>\section{安裝及本地配置}
+%<en>\section{Installation and Local Configurations}
+%<sc>本项目将源文件托管于GitHub平台,且已上传至Comprehensive \TeX{} Archive Net(CTAN)。用户可使用
+%<en>The sourcefiles are hosted on Github while it's also uploaded to CTAN. Users can simply use
+\begin{lstlisting}
+    tlmgr install evangelion-jfm
+\end{lstlisting}
+%<sc>或使用其他包管理器安装。用户也可使用
+%<en>(or maybe using other package managers) to install. (But note that the CTAN branch is not always updated.) Developers can also use
+\begin{lstlisting}
+    mkdir Evangelion-JFM [&&] cd Evangelion-JFM
+    git clone https://github.com/RadioNoiseE/Evangelion-JFM
+\end{lstlisting}
+%<sc>获取源文件,再将其放置在本地的\texttt{TEXMF}路径中,如
+%<en>to extract the latest version, the  move it to the \texttt{TEXMF} directory, for instance
+\begin{lstlisting}
+    ~/Library/texlive/2023/texmf-dist/tex/luatex/eva-jfm
+\end{lstlisting}
+%<sc>等。最后运行
+%<en>If your {\TeX} distribution requires
+\begin{lstlisting}
+    mktexlsr
+\end{lstlisting}
+%<sc>更新本地\TeX{}的\texttt{Ls-R}文件即可。\段
+%<en>to update the \texttt{Ls-R} database, make it so.\par
+%<sc>本文件一般情况下无需用户进行本地配置,但若有特殊需求可见第\ref{sec:config}节。
+%<en>\textsf{Eva-JFM} doesn't require any local configuration in most cases, but if you have some special requirements, have a look at section \ref{sec:config}.
+
+%<sc>\section{使用}
+%<en>\section{Using}
+%<sc>以下是在\LaTeX{}下使用繁中字体进行直排的示例
+%<en>The above is an example of typesetting vertical text using Traditional Chinese fonts
+\begin{lstlisting}
+    \usepackage{luatexja-fontspec, luatexja-adjust}
+    \setmainjfont{Source Han Serif TC}[Language = Chinese Traditional, TateFeatures = {JFM = eva/{vert, trad, nstd}}]
+    \ltjenableadjust[priority = true]
+\end{lstlisting}
+%<sc>(注意需要调用支持直书的文档类或使用\texttt{\string\tate}命令)。\LuaTeX-ja的JFM语法为:
+%<en>(and be aware that you need to load a document class which supports vertical typesetting or use the \texttt{\string\tate} command. \LuaTeX-ja's JFM syntax is the above
+\begin{lstlisting}
+    jfm = §\meta{JFM name}§/{§\meta{JFM features}§}
+\end{lstlisting}
+%<sc>而一般情况使用\texttt{\string\setmainjfont}时则为:
+%<en>while under {\LaTeX} the most common case while using \texttt{\string\setmainjfont} is most likely
+\begin{lstlisting}
+    \setmainjfont{§\meta{font name}§}[Language = §\meta{language name}§, §\meta{dir}§ = {JFM = §\meta{JFM name}§/{§\meta{JFM features}§}}]
+\end{lstlisting}
+%<sc>其中,\meta{font name}自然为需要的字体名称。\meta{language name}在使用日文字体时可忽略,而使用简中、繁中字体时为必填\footnote{简中填\texttt{Chinese Simplified},繁中填\texttt{Chinese Traditional}即可。},因\LuaTeX-ja会默认将其覆盖为\texttt{Japanese}选项,而这会带来灾难性的后果\footnote{比如错误的标点位置:日文为冒号及分号中置、其余偏靠,简中是全部偏靠,而繁中则是统统中置。}。\meta{dir}选填\texttt{TateFeatures}(直书)或\texttt{YokoFeatures}(横书)。其后的\meta{JFM name}为调用JFM的文件名\footnote{\LuaTeX-ja会依\texttt{jfm-\meta{JFM name}.lua}的格式来查找该文件。}。最后的\meta{JFM features}选项为选择使用的JFM特性,详细请看第\ref{sec:feat}章。\段
+%<en>Option \meta{font name} is the font (that you'd like to specify as the main font for your document)'s name. When using Japanese fonts, simply ignore the \meta{language name} since \LuaTeX-ja will automatically fill it for you. In this case, filling \texttt{Chinese} \texttt{Traditional} for Traditional Chinese fonts and \texttt{Chinese} \texttt{Simplified} for Simplified Chinese fonts is necessary\footnote{Without this, your output may result in wrong details, for instance wrong punctuation shape \& direction.}. \meta{dir} should be \texttt{TateFeatures} when typeset vertically and \texttt{YokoFeatures} for typesetting horizontally accordingly. The JFM's name is specified by the \meta{JFM name} option\footnote{\LuaTeX-ja searchs for a JFM file following the method \texttt{jfm-\meta{JFM name}.lua}.}. Finally, for the \meta{JFM features} key, fill in the JFM features. They are described in section \ref{sec:feat}.\par
+%<sc>对于进阶用户,也推荐用
+%<en>For advanced users, it's also recommanded to use the following
+\begin{lstlisting}
+    \def\ltj at stdyokojfm{eva/{§\meta{JFM features}§}}
+\end{lstlisting}
+%<sc>或配合NFSS来使用。\段
+%<en>or with the NFSS.\par
+%<sc>其他情况下设置JFM及其更多信息请看\LuaTeX-ja文档\cite{luatexja-doc}。
+%<en>To set up JFM in other cases, please refer to the \LuaTeX-ja document~\cite{luatexja-doc}.
+
+%<sc>\section{支持特性}
+%<en>\section{Supported Features}
+\label{sec:feat}
+%<sc>本章节将介绍\textsf{Eva-JFM}的所有特性,分别为:语言特性、方向特性、扩展特性、西文特性及私有特性。
+%<en>This section is going to give you a glance at all the features embedded in \textsf{Eva-JFM}. They are divided into 5 groups, and are described in the next 5 subsections respectively.
+
+%<sc>\subsection{語言特性}
+%<en>\subsection{Language Features}
+%<sc>本区特性必填且只可填一个。不然则会报错。\段
+%<en>You should specify one and only one feature from this section, or your {\TeX} is going to complain about it.\par
+\feature{jp}{JaPanese}{%
+%<sc>    日本语特性。当使用日文字体时需调用该特性。其与简中、繁中区别在于问号及感叹号后插入的伸缩胶量。影响特性\texttt{lgp},且对内部分组有影响。
+%<en>    Japanese font feature. When using Japanese fonts, you are required to specify this. It's very difference from Traditional Chinese and Simplified Chinese feature, namely the glue inserted after Question Mark and Exclamation Mark, and some punctuation mark's position when typeset vertically. It affects the feature \texttt{lgp}, as well as the internal grouping.\par
+}
+\feature{trad}{TRADitional chinese}{%
+%<sc>    繁中特性。当使用繁体中文字体时需调用。与简中、日本语特性的区别源于中置的标点。故,对于全部标点左右插入的伸缩胶的量都与简中、日本语不同。针对句点紧挨闭括号、标点位于句末时等皆有优化。
+%<en>    Traditional Chinese feature. You should specify this when you are typesetting using Traditional Chinese fonts. The differences from the other two is because of its middle-placed punctuations. Hence the glues inserted next to it, the line-end adjust, as well as some kernings between punctuations are special.
+}
+\feature{smpl}{SiMPLified chinese}{%
+%<sc>    简中特性,使用简体中文字体排版时调用。与日本语、繁中特性区别源于分号及冒号等全部偏靠从而影响其左右插入伸缩胶的量。\textsf{Eva-JFM}对一些(不该出现的)神奇情况(如两个句号同时出现、开括号后出现问号等)进行优化。对问号、感叹号等作了特殊处理。
+%<en>    Simplified Chinese feature, for Simplified Chinese fonts. All the punctuations are laid down and placed aside. Therefore its position is treated with care. \textsf{Eva-JFM} also takes some rare conditions into consideration. Note that the \textit{aki\/} after Question Mark and Exclamation Mark is different from that of the Japanese font feature.
+}
+
+%<sc>\subsection{方向特性}
+%<en>\subsection{Direction Features}
+%<sc>本分区特性与全部其他特性兼容,可同时调用。\段
+%<en>Features in this section is compatible with all the other features.\par
+\feature{vert}{VERTical writing}{%
+%<sc>    直书特性。对标点挤压、分组有影响。直书时必须调用。
+%<en>    Vertical Typesetting feature. It affects kerning, internal grouping, etc. You should specify this when typeseting vertically.
+}
+
+%<sc>\subsection{擴展特性}
+%<en>\subsection{Extended Features}
+%<sc>本区特性\texttt{hgp}不依赖\texttt{vert}特性,其余需同\texttt{vert}特性同时调用。否则报错。\段
+%<en>Except the feature \texttt{hgp} doesn't rely on feature \texttt{vert}, all the other features need \texttt{vert} to work (since they should only be needed in vertical texts).
+\feature{extd}{EXTenDed font}{%
+%<sc>    压缩字体特性。默认为横比纵为100比80的字体压缩\footnotemark{}。可用\texttt{extd=\meta{ratio}}设置横方向拉伸比例(默认即为\texttt{1.25}。需同\texttt{extend}(\textsf{luaotfload})或\texttt{FakeStretch}(\textsf{fontspec})同时使用。
+%<en>    Extended font features. The dafault ratio is \textit{x\/}:\textit{y\/}=100:80 while \textit{x\/} is the width and \textit{y\/} is the height. You can customize it using \texttt{extd=\meta{ratio}} (the dafault \meta{ratio} is 1.25). It should be used with \texttt{extend} (\textsf{luaotfload}) or \texttt{FakeStretch} (\textsf{fontspec}).
+}
+%<sc>\footnotetext{日本新闻字体,如每日新闻明朝体。}
+\feature{lgp}{LineGap Punctuations}{%
+%<sc>    行间标点特性。该特性将部分标点「悬挂」至行间。日文字体时与繁、简中字体时会有区别。详见第\ref{sec:lgp}章。
+%<en>    The linegap punctuations feature. This hangs some punctuations into the linegap. Some difference occurs when it's used with the \texttt{jp} feature. For more information see section~\ref{sec:lgp}.
+}
+\feature{hgp}{HanGing Punctuations}{%
+%<sc>    悬挂标点特性。该特性将部分标点「悬挂」于行末。仅简中、日文字体拥有该特性。
+%<en>    Hanging punctuation feature which ``hangs'' some punctuation at line-end (allowing them to stick out a bit). Traditional Chinese fonts doesn't support this feature because the result is somewhat (rather) wierd.
+}
+
+%<sc>\subsection{西文特性}
+%<en>\subsection{English Features}
+%<sc>本区特性使用时需先使用\texttt{\string\ltjsetparameter}设置\texttt{jacharrange}从而调整JAchar的范围。
+%<*sc>
+\begin{lstlisting}
+    \ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, -8, +9}}
+\end{lstlisting}
+同时推荐与对应OpenType特性同时使用。\段
+%</sc>
+%<en>You need to set the JAchar range using \texttt{\string\ltjsetparameter} before using features in this section, or they won't work properly. It's also recommended to use with the corresponding OpenType features.\par
+\feature{hwid}{Half WIDth}{%
+%<sc>    半宽西文特性。使用此特性(且按上述设置完成后)西文字母排布为严格半宽。本特性不会压缩或拉伸西文字母,故当未使用对应半宽字体特性时,只会简单的重叠,此时不推荐使用。同时也将失去所有kern以及italic correction的数据,同时忽略\texttt{xkanjiskip}参数。请务必谨慎调用。
+%<en>    Half width English characters feature. This will place each alphabets into a box which width is exactly $0.5$ times the CJ character's width. It's worth noting that it will not stretch or shrink the glyph, it only adjusts the spacing. Hence if the OpenType feature \texttt{hwid} is not set, English characters will simply overlap. All the kernings and italic corrections will also be lost (this may be fixed in the future versions), and will ignore the parameter \texttt{xkanjiskip}. Please use with care.
+}
+\feature{fwid}{Full WIDth}{%
+%<sc>    全宽西文特性。描述同上。但,若不调用全宽特性,西文间距会被简单撑开。
+%<en>    Full width English characters feature. It's similar from feature \texttt{hwid} above except that the spacing will be stretched out on the contrary.
+}
+
+%<sc>\subsection{私有特性}
+%<en>\subsection{Dark Features}
+%<sc>使用本区特性前请先确保你清楚地知道你在做什么。\段
+%<en>Before using the following features, please make sure that you have carefully read the descriptions.\par
+\feature{nstd}{Non STandarD}{%
+%<sc>    忽略标准特性。字体排印标准\cite{jlreq}认为逗号的压缩权重应比句号要低。本特性将句号的压缩优先级与逗号交换,使逗号被优先压缩\footnotemark{}。仅在使用\textsf{luatexja-adjust}宏集时有效。
+%<en>    This one ignores the standard priority rules for punctuation kerning. While Japanese text layout requirement~\cite{jlreq} suggests that the priority for the period should be higher than the comma (which means the period is easier to stretch), this makes the comma's priority higher than the preiod's. Only works when \textsf{luatexja-adjust}'s priority feature is enabled (set to \texttt{true}).
+}
+%<sc>\footnotetext{考虑逗号、句号在文字系统中占的重量,以及「开明」压缩风格。}
+
+%<sc>\section{行間標點特性}
+%<en>\section{Linegap Punctuation Feature}
+\label{sec:lgp}
+%<sc>本章节将提供更多详细的关于行间标点特性的信息,以及可能出现的问题及其解决方案。
+%<en>Here more detailed information about linegap punctuations are provided, as well as the issues may occur and the possible solution.
+%<sc>\subsection{關於「懸掛」}
+%<en>\subsection{About ``Hanging''}
+%<sc>行间标点可见于古籍之中,是将标点符号与直书结合妥协的产物。\段
+%<en>Linegap punctuations can be seen in Chinese ancient books, it's a combination of the punctuations marks and the traditional vertical typesetting method.\par
+%<sc>传统上悬挂句号与逗号。而\textsf{Eva-JFM}特性在繁中、简中特性下会悬挂句号、逗号、顿号、冒号及分号,日文字体下则不悬挂冒号及分号。原因在于日本习惯上将冒号与分号看作「中点类」,直书时横置处理。\段
+%<en>Only periods and commas should be hanged but \textsf{Eva-JFM} hangs three more punctuations in addition. Japanese font is different in this aspect however, since the direction of colon and semicolon makes it impossible to be hanged.\par
+%<sc>本JFM将全部标点悬挂于字体右下位置。详见下一节。
+%<en>They are all hanged to the lower right of the glyph. See the next subsection for more details.
+
+%<sc>\subsection{懸掛的位置}
+%<en>\subsection{Hanging Position}
+\begin{figure}[htb]
+    \centering
+%<sc>    \includegraphics[height = 12\zh]{figure/fig-tc.pdf}\空\includegraphics[height = 12\zh]{figure/fig-jp.pdf}
+%<en>    \includegraphics[height = 120pt]{figure/fig-tc.pdf}\quad\includegraphics[height = 120pt]{figure/fig-jp.pdf}
+%<sc>    \caption{行间标点特性示意图}
+%<en>    \caption{The linegap punctuations feature}
+    \label{fig:lgp}
+\end{figure}
+%<sc>标点悬挂的位置有以下考量,可参照图\ref{fig:lgp}~。若有特殊需求请看第\ref{sec:config}节。优先级由上至下。
+%<en>The position of these hanged punctuations is decided according to the following rules as shown in the figure \ref{fig:lgp}. For customizing, see subsection~\ref{sec:config}. The rules which occurs more early have the higher priorities.
+\begin{itemize}
+%<sc>    \item 三种字体风格统一,位置原则上一致(故,繁中字体也悬挂于右下、而非居中);
+%<en>    \item The style of the three fonts are unified;
+%<sc>    \item 不同标点中的相同(似)元素位置相同;
+%<en>    \item The position of the similar elements in different punctuations should be the same;
+%<sc>    \item 繁中、简中、日文字体标点触字框右边线;
+%<en>    \item The glyph of the punctuations should touch the \textit{kanji\/}'s boundary;
+%<sc>    \item 不同标点符号因形状不同可于字框底线略下沉或上浮;
+%<en>    \item Different punctuations' position can vary considering their glyphs' shapes, sizes, design respectively.
+%<sc>    \item 不同标点符号因大小不同可靠近或远离字框右边线;
+%<sc>    \item 三种字体可分别因字符设计的差异而位置略微区别。
+\end{itemize}
+
+%<sc>\subsection{用戶配置}
+%<en>\subsection{User Configs}
+\label{sec:config}
+%<sc>本特性是以三套思源字体为基准设计的。而由于各字体的标点符号位置不可避免会有不同,故在某些特殊情况下会出现错位影响视觉效果的情况。或是单纯对原设定而言更偏好其他设定等原因,本节提供自定义及调整的两种方法。第一种较简单但可移植性较差,而第二种虽繁琐但一劳永逸。
+%<en>This feature is designed for the Source Han font series (思源系列). Due to different fonts' different punctuation marks, the output may be wrong (overlap, not aligned, etc). Also you may prefer your own settings. Therefore, two methods of customizing the positions of hanged punctuations is provided here.
+
+%<sc>\subsubsection{修改原程式碼}
+%<en>\subsubsection{Changing Parameters}
+%<sc>在\textsf{Eva-JFM}中,控制行间标点的分区分别为
+%<en>In \textsf{Eva-JFM}, the tables which contains the parameters for the positions of these hanged punctuations is
+\begin{lstlisting}
+    [101,2] ==> [1]; [201,2] ==> [2]; [301,2] ==> [3].
+\end{lstlisting}
+%<sc>只需调整其中\texttt{left}和\texttt{down}键的值即可。其中\texttt{left}为向右移动,\texttt{down}为向下移动。
+%<en>Kindly modify \texttt{left} (dir right) and \texttt{down} (dir down) until the output is fine.
+%<sc>具体可参照终章。
+%<en>You can also refer to the last section (\textit{Implementing\/}).
+
+%<sc>\subsubsection{使用外掛符號字體}
+%<en>\subsubsection{Using Extra Font}
+%<sc>该方法的原理就是使用特殊的仅包含(标点)符号的字体来替换原有字体中的标点符号,从而稳定其表现。可使用字体熔炉等工具将标点符号从整套字体中提取出来并封装为新字体,也可使用开源符号字体。\段
+%<en>Extracting the glyphs for punctuation marks and package them into a new font (you can use programs like \textit{fontforge\/}) and use them for hanging punctuations later is the second solution. You can also load another font just for its punctuations (but loading a CJ font into {\TeX}'s memory has an expensive cost).\par
+%<sc>将其放入\texttt{TEXMF}并更新\texttt{Ls-R}文件后即可使用\LuaTeX-ja提供的\texttt{AltFont}键进行替换,例元:
+%<en>After installing that font, you can use the \texttt{AltFont} key provided by \LuaTeX-ja to replace the punctuations. The actual code is shown above.
+\begin{lstlisting}
+    \setmainjfont[
+        Language = §\meta{language}§,
+        TateFeatures = {
+            JFM = eva/{vert, lgp, §\meta{language}§},
+            AltFont = {
+                {Range = "§\meta{utf-8 code}§, Font = §\meta{symbol font}§}
+            }
+        }
+    ]{§\meta{main font}§}
+\end{lstlisting}
+%<sc>其中首个\meta{language}可选填\texttt{Japanese}、\texttt{Chinese Traditional}或\texttt{Chinese Simplified},第二个则填语言特性分区的对应\texttt{jp}、\texttt{trad}及\texttt{smpl}特性。\meta{utf-8 code}则为需要替换的标点符号的Unicode编码,如需替换句号(ideographic full stop,\texttt{U+3002})则填\texttt{3002}\footnote{编码可至\url{https://www.unicode.org/charts/unihanrsindex.html}查询。}。
+%<en>One of \texttt{Japanese}, \texttt{Chinese Traditional} or \texttt{Chinese Simplified} should be filled in the first \meta{language} option, the other one is for the corresponding JFM features. \meta{utf-8 code} selects the punctuations you'd like to replace with the ``punctuation font''\footnote{You can search \url{https://www.unicode.org/charts/unihanrsindex.html} for their unicodes representations.}.
+%<sc>\meta{symbol font}以及\meta{main font}填符号字体名称、正文字体名称即可。\段
+%<en>Finally, it's obvious that the \meta{symbol font} and the \meta{main font} options are for the ``punctuation font'' and the main font.\par
+%<sc>对于开发者,也建议使用NFSS的
+%<en>It's also recommended for the developers to use the NFSS with
+\begin{lstlisting}
+    \DeclareAlternateKanjiFont{§\meta{base encoding}§}{§\meta{base family}§}{§\meta{base series}§}{§\meta{base shape}§}{§\meta{alt encoding}§}{§\meta{alt family}§}{§\meta{alt series}§}{§\meta{alt shape}§}{§\meta{range}§}
+\end{lstlisting}
+%<sc>进行替换。其中\meta{base}为正文字体,\meta{alt}则为替换符号字体。\段
+%<en>Option \meta{base} and \meta{alt} stands for main font and ``punctuation font''.\par
+%<sc>具体语法及示例可看\LuaTeX-ja文档\cite{luatexja-doc}。
+%<en>Refer to the \LuaTeX-ja document~\cite{luatexja-doc} for more detailed syntax and usage as well as some examples.
+
+%<sc>\section{启發}
+%<en>\section{Inspiration}
+%<sc>\textsf{Eva-JFM}的内部分组受\texttt{min10.tfm} \cite{min10}的启发,支持的\texttt{priority}特性则取自阿部紀行氏的\texttt{jlreq.lua} \cite{ltxjlreq}文件。其余可见参考文献。\段
+%<sc>本JFM的名字来源于庵野秀明的『新世紀エヴァンゲリオン』。
+%<en>\textsf{Eva-JFM}'s internal grouping is inspired by \texttt{min10.tfm}~\cite{min10}, while its \texttt{priority} feature's data partly comes from Noriyuki Abe's \texttt{jlreq.lua}~\cite{ltxjlreq}.\par
+%<en>This JFM's name comes from the animation \textit{Neon Genesis Evangelion\/} by Hideaki Anno.
+
+\begin{thebibliography}{9}
+    \addcontentsline{toc}{section}{\refname}
+    \bibitem{jlreq} W3C Japanese Layout Task Force~(ed). \newblock Requirements for Japanese Text Layout (W3C Working Group Note), 2022, 2023. \newblock \url{https://www.w3.org/TR/jlreq/}.
+    \bibitem{luatexja-doc} \LuaTeX-jaプロジェクトチーム. \newblock \LuaTeX-jaパッケージ, 2022, 2023.
+    \bibitem{unicode} The Unicode Consortium. \newblock The Unicode Standard Version 15.0 - Core Specification, 2022.
+    \bibitem{tex-by-topic} Victor Eijkhout. \newblock \TeX{} by Topic, A \TeX nician's Reference, Addison-Wesley, 1992.
+    \bibitem{min10} 乙部厳己. \newblock min10フォントについて. \newblock \url{http://argent.shinshu-u.ac.jp/~otobe/tex/files/min10.pdf}.
+    \bibitem{ltxjlreq} Noriyuki Abe. \newblock Jlreq Document Class, 2022. \newblock \url{https://github.com/abenori/jlreq}.
+    \bibitem{evang} 庵野秀明. \newblock 新世紀エヴァンゲリオン.
+\end{thebibliography}
+
+%<sc>\section*{程式碼}
+%<en>\section*{Implementation}
+%<sc>以下为\texttt{jfm-eva.lua}文件内容,供参考。%及二次开发等。
+%<en>The above is the implementation of this font metric. Can be used for reference.
+\lstinputlisting{jfm-eva.lua}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/source/luatex/evangelion-jfm/Evangelion-JFM.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/luatex/evangelion-jfm/jfm-eva.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/evangelion-jfm/jfm-eva.lua	2023-04-15 20:49:32 UTC (rev 66856)
+++ trunk/Master/texmf-dist/tex/luatex/evangelion-jfm/jfm-eva.lua	2023-04-15 20:49:53 UTC (rev 66857)
@@ -1,11 +1,11 @@
 ---- Evangelion Japanese Font Metric for LuaTeX
----- Current Version: 1.0.0 (b)
+---- Current Version: 1.0.2 (h)
 ---- Dev URL: https://github.com/RadioNoiseE/Evangelion-JFM
----- © Copyright 2023, RadioNoiseE
+---- Copyright 2023, RadioNoiseE ©
 
 
 -- 初始化
-local lang_jp, lang_tc, lang_sc, dir_vt, font_extd, punc_lg, punc_hg, std_nil
+local lang_jp, lang_tc, lang_sc, dir_vt, font_extd, punc_lg, punc_hg, std_nil, al_hw, al_fw
 
 if luatexja.jfont.jfm_feature then 
     lang_jp = luatexja.jfont.jfm_feature.jp
@@ -16,6 +16,8 @@
     punc_lg = luatexja.jfont.jfm_feature.lgp
     punc_hg = luatexja.jfont.jfm_feature.hgp
     std_nil = luatexja.jfont.jfm_feature.nstd
+    al_hw = luatexja.jfont.jfm_feature.hwid
+    al_fw = luatexja.jfont.jfm_feature.fwid
 end
 
 -- 預處理及容錯
@@ -29,6 +31,10 @@
               'For now I\'ll ignore it.')
 end
 
+if al_hw == true and al_fw == true then
+    tex.error('JFM feature "hwid" cannot be used with "fwid".')
+end
+
 if not ((lang_jp and not (lang_tc or lang_sc)) or
     (lang_tc and not (lang_jp or lang_sc)) or
     (lang_sc and not (lang_jp or lang_tc))) then
@@ -38,6 +44,14 @@
               'For now I\'ll use "lang_jp" for japanese by default.')
 end
 
+-- 壓縮比例設定
+if font_extd == true then
+    local extd_ratio = (type(font_extd) == 'string') and tonumber(font_extd) or 1.25
+end
+
+-- 行間標點字間距補足
+local lgp_kanjiskip = {kanjiskip_natural = 0, kanjiskip_stretch = 1, kanjiskip_shrink = 1}
+
 -- 定義函數宏
 local function logic_anif(f1, f2, r1, r2)
      local rta = f1 and (f2 and r1) or r2
@@ -50,12 +64,12 @@
 end
 
 local function context_height()
-    local rth = dir_vt and (font_extd and 0.625 or 0.5) or 0.88
+    local rth = dir_vt and (font_extd and extd_ratio/2 or 0.5) or 0.88
     return rth
 end
 
 local function context_depth()
-    local rtd = dir_vt and (font_extd and 0.625 or 0.5) or 0.12
+    local rtd = dir_vt and (font_extd and extd_ratio/2 or 0.5) or 0.12
     return rtd
 end
 
@@ -64,9 +78,9 @@
     version = 3,
     dir = logic_if(dir_vt, 'tate', 'yoko'),
     zw = 1,
-    zh = logic_anif(dir_vt, font_extd, 1.25, 1),
+    zh = logic_anif(dir_vt, font_extd, extd_ratio, 1),
     kanjiskip = {0, 0.25, 0},
-    xkanjiskip = {0.25, 0.25, 0.125},
+    xkanjiskip = {0.25, 0.125, 0.125},
 
     [0] = { -- 缺省類
         width = 1,
@@ -77,9 +91,9 @@
         down = 0,
         align = 'middle',
         glue = {
-            [1] = logic_if(lang_tc, {0.25, 0, 0.125, ratio = 1, priority = logic_if(std_nil, {-1, 0}, {-1, -2})}, {}),
-            [2] = logic_if(lang_tc, {0.25, 0, 0.125, ratio = 1, priority = logic_if(std_nil, {-1, -2}, {-1, 0})}, {}),
-            [3] = logic_if(dir_vt, {}, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 1, priority = {-1, -1}}, {priority = {0, -1}})),
+            [1] = logic_if(lang_tc, {0.25, 0, 0.125, ratio = 1, priority = logic_if(std_nil, {-1, 0}, {-1, -2})}, {priority = logic_if(std_nil, {-1, 0}, {-1, -2})}),
+            [2] = logic_if(lang_tc, {0.25, 0, 0.125, ratio = 1, priority = logic_if(std_nil, {-1, -2}, {-1, 0})}, {priority = logic_if(std_nil, {-1, -2}, {-1, 0})}),
+            [3] = logic_if(dir_vt, {priority = {0, -1}}, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 1, priority = {-1, -1}}, {priority = {-1, -1}})),
             [7] = {0.5, 0, 0.25, ratio = 1, priority = {-1, -2}},
             [9] = {0.25, 0, 0.125, ratio = 1, priority = {-1, -1}}
         },
@@ -98,7 +112,7 @@
         glue = {
             [0] = logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = logic_if(std_nil, {-1, 0}, {-1, -2})}, {0.5, 0, 0.25, ratio = 0, priority = logic_if(std_nil, {-1, 0}, {-1, -2})}),
             [1] = logic_if(lang_tc, {0.5, 0, 0.25}, {0.5, 0, 0.25}),
-            [2] = logic_if(lang_tc, {0.5, 0, 0.5}, {0.5, 0, 0.25}),
+            [2] = logic_if(lang_tc, {0.5, 0, 0.25}, {0.5, 0, 0.25}),
             [3] = logic_if(dir_vt, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = {0, -1}}, {0.5, 0, 0.25, priority = {0, -1}}), logic_if(lang_tc, {0.5, 0, 0.25, priority = {0, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {0, -1}})),
             [4] = logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = logic_if(std_nil, {0, 0}, {0, -2})}, {0.5, 0, 0.25, ratio = 0, priority = logic_if(std_nil, {0, 0}, {0, -2})}),
             [5] = logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = logic_if(std_nil, {0, 0}, {0, -2})}, {0.5, 0, 0.25, ratio = 0, priority = logic_if(std_nil, {0, 0}, {0, -2})}),
@@ -107,7 +121,7 @@
             [8] = logic_if(lang_tc, {0.25, 0, 0.125}, {}),
             [9] = logic_if(lang_tc, {0.5, 0, 0.25, priority = {0, -1}}, {0.75, 0, 0.25, ratio = 1/3, priority = {0, -1}})
         },
-        end_adjust = logic_if(lang_tc, {0.25, 0}, logic_if(punc_hg, {-0.5, 0}, {0, 0}))
+        end_adjust = logic_if(lang_tc, {0.25, 0}, logic_if(punc_hg, {-0.5, 0.5, 0}, {0, 0}))
     },
 
     [101] = { -- 読点類(行間a)
@@ -118,7 +132,10 @@
         italic = 0,
         left = 0.38,
         down = -0.34,
-        align = 'left'
+        align = 'left',
+        glue = {
+            [0] = lgp_kanjiskip
+        }
     },
 
     [102] = { -- 読点類(行間b)
@@ -129,7 +146,10 @@
         italic = 0,
         left = logic_if(lang_tc, 0.62, 0.40),
         down = logic_if(lang_tc, -0.58, -0.26),
-        align = 'left'
+        align = 'left',
+        glue = {
+            [0] = lgp_kanjiskip
+        }
     },
 
     [2] = { -- 句點類
@@ -153,7 +173,7 @@
             [8] = logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0}, {}),
             [9] = logic_if(lang_tc, {0.5, 0, 0.25, priority = {0, -1}}, {0.75, 0, 0.25, ratio = 1/3, priority = {0, -1}})
         },
-        end_adjust = logic_if(lang_tc, {0.25, 0}, logic_if(punc_hg, {-0.5, 0}, {0, 0}))
+        end_adjust = logic_if(lang_tc, {0.25, 0}, logic_if(punc_hg, {-0.5, 0.5, 0}, {0, 0}))
     },
 
     [201] = { -- 句點類(行間a)
@@ -164,7 +184,10 @@
         italic = 0,
         left = logic_if(lang_tc, 0.68, 0.34),
         down = logic_if(lang_tc, -0.58, -0.28),
-        align = 'left'
+        align = 'left',
+        glue = {
+            [0] = lgp_kanjiskip
+        }
     },
 
     [202] = { -- 句點類(行間b)
@@ -175,7 +198,10 @@
         italic = 0,
         left = 0.42,
         down = -0.35,
-        align = 'left'
+        align = 'left',
+        glue = {
+            [0] = lgp_kanjiskip
+        }
     },
 
     [3] = { -- 兩點類
@@ -188,14 +214,14 @@
         down = 0,
         align = logic_if(lang_tc, 'middle', 'left'),
         glue = {
-            [0] = logic_if(dir_vt, {}, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = {-1, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {-1, -1}})),
+            [0] = logic_if(dir_vt, {priority = {-1, -1}}, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = {-1, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {-1, -1}})),
             [1] = logic_if(dir_vt, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 1, priority = {0, -1}}, {priority = {0, -1}}), logic_if(lang_tc, {0.5, 0, 0.25, priority = {0, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {0, -1}})),
             [2] = logic_if(dir_vt, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 1, priority = {0, -1}}, {priority = {0, -1}}), logic_if(lang_tc, {0.5, 0, 0.25, priority = {0, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {0, -1}})),
-            [3] = logic_if(dir_vt, {}, logic_if(lang_tc, {0.5, 0, 0.25, priority = {0, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {0, -1}})),
-            [4] = logic_if(dir_vt, {}, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = {0, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {0, -1}})),
-            [5] = logic_if(dir_vt, {}, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = {0, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {0, -1}})),
-            [6] = logic_if(dir_vt, {}, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = {-1, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {-1, -1}})),
-            [7] = logic_if(dir_vt, {}, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = {-1, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {-1, -1}})),
+            [3] = logic_if(dir_vt, {priority = {0, -1}}, logic_if(lang_tc, {0.5, 0, 0.25, priority = {0, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {0, -1}})),
+            [4] = logic_if(dir_vt, {priority = {0, -1}}, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = {0, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {0, -1}})),
+            [5] = logic_if(dir_vt, {priority = {0, -1}}, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = {0, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {0, -1}})),
+            [6] = logic_if(dir_vt, {priority = {-1, -1}}, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = {-1, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {-1, -1}})),
+            [7] = logic_if(dir_vt, {priority = {-1, -1}}, logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = {-1, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {-1, -1}})),
             [8] = logic_if(lang_tc, {0.25, 0, 0.125, ratio = 0, priority = {0, -1}}, {0.5, 0, 0.25, ratio = 0, priority = {0, -1}}),
             [9] = logic_if(lang_tc, {0.5, 0, 0.25, priority = {0, -1}}, {0.75, 0, 0.25, ratio = 1/3, priority = {0, -1}})
         }
@@ -209,7 +235,10 @@
         italic = 0,
         left = logic_if(lang_tc, 0.94, 0.72),
         down = logic_if(lang_tc, -0.58, -0.34),
-        align = 'left'
+        align = 'left',
+        glue = {
+            [0] = lgp_kanjiskip
+        }
     },
 
     [302] = { -- 兩點類(行間b)
@@ -220,7 +249,10 @@
         italic = 0,
         left = logic_if(lang_tc, 0.96, 0.78),
         down = logic_if(lang_tc, -0.58, -0.34),
-        align = 'left'
+        align = 'left',
+        glue = {
+            [0] = lgp_kanjiskip
+        }
     },
 
     [4] = { -- 小書きの仮名類
@@ -319,7 +351,7 @@
             [0] = {0.5, 0, 0.25, ratio = 0, priority = {-1, -2}},
             [1] = logic_if(lang_tc, {0.25, 0, 0.125, ratio = 1}, {}),
             [2] = logic_if(lang_tc, {0.25, 0, 0.125, ratio = 1}, {}),
-            [3] = logic_if(lang_sc, {}, {0.25, 0, 0.125, ratio = 1, priority = {0, -1}}),
+            [3] = logic_if(lang_sc, {priority = {0, -1}}, {0.25, 0, 0.125, ratio = 1, priority = {0, -1}}),
             [4] = {0.5, 0, 0.25, ratio = 0, priority = {0, -2}},
             [5] = {0.5, 0, 0.25, ratio = 0, priority = {0, -2}},
             [6] = {0.5, 0, 0.25, ratio = 0, priroity = {-1, -2}},
@@ -349,19 +381,49 @@
             [7] = {0.25, 0, 0.125, ratio = 0, priority = {-1, -1}},
             [8] = {0.25, 0, 0.125, ratio = 0, priority = {0, -1}},
             [9] = {0.5, 0, 0.25, priority = {0, -1}}
-        }
+        },
+        end_adjust = {0.25, 0}
     },
 
-    [10] = { -- 行頭
-        chars = {'boxbdd', 'parbdd'},
+    [10] = { -- 西文
+        chars = {},
+        width = 0,
+        height = context_height(),
+        depth = context_depth(),
+        italic = 0,
+        left = 0,
+        down = 0,
+        align = 'middle',
+        glue = {}
+    },
+
+    [11] = { -- 行頭
+        chars = {'parbdd', 'boxbdd'},
         glue = {
             [7] = {0, 0, 0}
         }
-    },
-
-    [11] = { -- 伸縮膠
-        chars = {'glue'}
     }
 }    
 
+if al_hw == true or al_fw == true then
+    eva[10].chars = {'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',
+                     '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'}
+    eva[10].glue = table.fastcopy(eva[0].glue)
+    eva[10].glue[0] = {0.25, 0.125, 0.125, ratio = 0, priority = {0, -1}}
+    eva[0].glue[10] = {0.25, 0.125, 0.125, ratio = 1, priority = {0, -1}}
+    for _, catnum in ipairs({1, 2, 3, 5, 8, 9}) do
+        eva[catnum].glue[10] = table.fastcopy(eva[catnum].glue[0])
+    end
+end
+
+if al_hw == true and al_fw == false then
+    eva[10].width = 0.5
+end
+
+if al_fw == false and al_fw == true then
+    eva[10].width = 1
+end
+
 luatexja.jfont.define_jfm(eva)



More information about the tex-live-commits mailing list.