diff options
author | Karl Berry <karl@freefriends.org> | 2017-09-04 21:44:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-09-04 21:44:37 +0000 |
commit | bcda35605553f3c49a16e9ebfafe378c4e270c2a (patch) | |
tree | 1d1c7c1d9c49c988b5302fe204308929833913e2 /Master/texmf-dist | |
parent | 8df9c434780b2d6ba9b711f34b8213416cdabe6c (diff) |
fixjfm (4sep17)
git-svn-id: svn://tug.org/texlive/trunk@45212 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/generic/fixjfm/README.txt | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.pdf | bin | 253281 -> 279247 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.tex | 71 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/fixjfm/fixjfm.sty | 16 |
4 files changed, 72 insertions, 17 deletions
diff --git a/Master/texmf-dist/doc/generic/fixjfm/README.txt b/Master/texmf-dist/doc/generic/fixjfm/README.txt index 3f1b8892906..58c347456b2 100644 --- a/Master/texmf-dist/doc/generic/fixjfm/README.txt +++ b/Master/texmf-dist/doc/generic/fixjfm/README.txt @@ -6,7 +6,7 @@ CTAN Homepage: https://ctan.org/pkg/fixjfm Repository: https://github.com/Man-Ting-Fang/fixjfm -Version: 2017-09-02 v0.2 +Version: 2017-09-04 v0.4 Copyright 2017 Yue ZHANG diff --git a/Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.pdf b/Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.pdf Binary files differindex 9170671fee3..c671472650f 100644 --- a/Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.pdf +++ b/Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.pdf diff --git a/Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.tex b/Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.tex index 8eaad94f4ec..b3531945615 100644 --- a/Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.tex +++ b/Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.tex @@ -68,18 +68,23 @@ \font\sans=SourceSansPro-Semibold-tlf-ot1 at 10pt +\newenvironment{history}[1]% + {\noindent\textbf{#1}\begin{itemize}}% + {\end{itemize}} + \begin{document} \title{The \pkg{fixjfm} package% \thanks{CTAN Homepage: \texttt{https://ctan.org/pkg/fixjfm}} \thanks{Repository: \texttt{https://github.com/Man-Ting-Fang/fixjfm}}} \author{Yue \textsc{Zhang}} -\date{2017-09-02\quad v0.2} +\date{2017-09-04\quad v0.4} \maketitle \begin{abstract} -This package fixes several bugs in the JFM format. +This package fixes several bugs in the JFM format. Both \LaTeX\ and plain \TeX\ +are supported. \end{abstract} \section{Introduction} @@ -182,17 +187,34 @@ If you are using plain \TeX, you should always add \verb|\fixjfmspacing| by yourself, because plain (*p)\TeX\ does not have \verb|\textmc|, \verb|\textgt|, or the like. -Incidentally, if you are using \LaTeX\ and prefer the original (u)\pLaTeX\ -version of \verb|\textmc| and \verb|\textgt|, you can declare +If you are using \LaTeX\ and prefer the standard version\footnote{Since v0.3, +the ``standard version'' is similar to \pkg{jsclasses} and \pkg{BXjscls} rather +than (u)\pLaTeX.} of \verb|\textmc| and \verb|\textgt|, you can declare \begin{verbatim} \UseStandardCJKTextFontCommands \end{verbatim} -in your preamble. In contrast, +In contrast, \begin{verbatim} \UseFixJFMCJKTextFontCommands \end{verbatim} redefines \verb|\textmc| and \verb|\textgt| and is declared by default. These -two commands can only be used in preamble. +two commands are important. Consider the following example: +\begin{trivlist} +\item\relax{\ttfamily\hskip2em}\verb|\textgt{\Large |\TwoFwBoxes\verb|}| +\end{trivlist} +It causes a fatal error when the \pkg{fixjfm} version of \verb|\textgt| is used. +The solution is to change \verb|\textgt| back to the standard version, either +globally or locally: +\begin{trivlist}\itemsep=0pt\relax\parsep=0pt\relax +\item\relax{\ttfamily\hskip2em}% +\verb|\UseFixJFMCJKTextFontCommands \textgt{|\TwoFwBoxes\verb|}| +\item\relax{\ttfamily\hskip2em}% +\verb|\UseStandardCJKTextFontCommands \textgt{\Large |\TwoFwBoxes\verb|}| +\item\relax{\ttfamily\hskip2em}% +\verb|\UseFixJFMCJKTextFontCommands \textgt{|\TwoFwBoxes\verb|}| +\item\relax{\ttfamily\hskip1.5em}% +\verb|{\UseStandardCJKTextFontCommands \textgt{\Large |\TwoFwBoxes\verb|}}| +\end{trivlist} \section{Advanced usage} @@ -211,8 +233,8 @@ They expect an argument specifying how much space to stretch and shrink respectively. This package sets both of them to \verb|0.05zw| by default. Macro writers may want to (re)define commands like the \pkg{fixjfm} version of -\verb|\textmc| and \verb|\textgt| for CJK fonts, thus the following command is -provided: +\verb|\textmc| and \verb|\textgt| for CJK text fonts, thus the following command +is provided: \begin{verbatim} \DeclareFixJFMCJKTextFontCommand \end{verbatim} @@ -221,7 +243,12 @@ It is similar to \LaTeX's \verb|\DeclareTextFontCommand|. For example, \begin{verbatim} \DeclareFixJFMCJKTextFontCommand\textmc{\mcfamily} \end{verbatim} -and \verb|\textgt| is similar. +and \verb|\textgt| is similar. In contrast, +\begin{verbatim} + \DeclareStandardCJKTextFontCommand +\end{verbatim} +(re)defines a CJK text font command like the standard version of \verb|\textmc| +and \verb|\textgt|. Finally, there are several macros that may be useful for \TeX nicians: \begin{verbatim} @@ -264,4 +291,30 @@ and \pkg{platex} (Kazuki Maeda \& Japanese \TeX\ Development Community): \end{verbatim} Many thanks to the authors of these packages. +\section{History} + +\begin{history}{2017-09-02 v0.2} +\item First public version. +\end{history} + +\begin{history}{2017-09-04 v0.3} +\item Fixes. +\item Make \verb|\UseFixJFMCJKTextFontCommands| and + \verb|\UseStandardCJKTextFontCommands| also available after + \verb|\begin{document}|. +\item Add \verb|\DeclareStandardCJKTextFontCommand| and use it for redefining + the standard version of \verb|\textmc| and \verb|\textgt|. +\end{history} +Thanks to Hironobu Yamashita for suggesting all these changes: +\begin{verbatim} + https://github.com/Man-Ting-Fang/fixjfm/pull/1 +\end{verbatim} + +\begin{history}{2017-09-04 v0.4} +\item Bug fix, thanks to Hironobu Yamashita: +\end{history} +\begin{verbatim} + https://github.com/Man-Ting-Fang/fixjfm/pull/2 +\end{verbatim} + \end{document} diff --git a/Master/texmf-dist/tex/generic/fixjfm/fixjfm.sty b/Master/texmf-dist/tex/generic/fixjfm/fixjfm.sty index 02cd455fc7b..c4921fcfead 100644 --- a/Master/texmf-dist/tex/generic/fixjfm/fixjfm.sty +++ b/Master/texmf-dist/tex/generic/fixjfm/fixjfm.sty @@ -11,7 +11,7 @@ \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname ProvidesPackage\endcsname\relax \else - \ProvidesPackage{fixjfm}[2017/09/02 v0.2 Fix JFM (for *pTeX)]% + \ProvidesPackage{fixjfm}[2017/09/04 v0.4 Fix JFM (for *pTeX)]% \fi \edef\FIXJFMDOTSTYRESTORECATCODE{\catcode`\noexpand\@=\the\catcode`\@\relax} @@ -99,21 +99,23 @@ \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname DeclareTextFontCommand\endcsname\relax \def\DeclareFixJFMCJKTextFontCommand#1#2{}% + \def\DeclareStandardCJKTextFontCommand#1#2{}% \let\UseFixJFMCJKTextFontCommands=\fixjfm@empty \let\UseStandardCJKTextFontCommands=\fixjfm@empty \else \def\DeclareFixJFMCJKTextFontCommand#1#2{% \DeclareRobustCommand#1[1]{% - \relax\ifmmode\nfss@text\fi{#2\fixjfmspacing##1}\fixjfmspacing}}% + \relax\ifmmode\expandafter\nfss@text\fi + {#2\fixjfmspacing##1}\fixjfmspacing}}% + \def\DeclareStandardCJKTextFontCommand#1#2{% + \DeclareRobustCommand#1[1]{% + \relax\ifmmode\expandafter\nfss@text\fi{#2##1}}}% \def\UseFixJFMCJKTextFontCommands{% \DeclareFixJFMCJKTextFontCommand\textmc{\mcfamily}% \DeclareFixJFMCJKTextFontCommand\textgt{\gtfamily}}% \def\UseStandardCJKTextFontCommands{% - \DeclareTextFontCommand\textmc{\mcfamily}% - \DeclareTextFontCommand\textgt{\gtfamily}}% - \@onlypreamble\DeclareFixJFMCJKTextFontCommand - \@onlypreamble\UseFixJFMCJKTextFontCommands - \@onlypreamble\UseStandardCJKTextFontCommands + \DeclareStandardCJKTextFontCommand\textmc{\mcfamily}% + \DeclareStandardCJKTextFontCommand\textgt{\gtfamily}}% \UseFixJFMCJKTextFontCommands \fi |