texlive[45212] Master/texmf-dist: fixjfm (4sep17)

commits+karl at tug.org commits+karl at tug.org
Mon Sep 4 23:44:37 CEST 2017


Revision: 45212
          http://tug.org/svn/texlive?view=revision&revision=45212
Author:   karl
Date:     2017-09-04 23:44:37 +0200 (Mon, 04 Sep 2017)
Log Message:
-----------
fixjfm (4sep17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/fixjfm/README.txt
    trunk/Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.pdf
    trunk/Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.tex
    trunk/Master/texmf-dist/tex/generic/fixjfm/fixjfm.sty

Modified: trunk/Master/texmf-dist/doc/generic/fixjfm/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/generic/fixjfm/README.txt	2017-09-04 21:44:24 UTC (rev 45211)
+++ trunk/Master/texmf-dist/doc/generic/fixjfm/README.txt	2017-09-04 21:44:37 UTC (rev 45212)
@@ -6,7 +6,7 @@
 
 Repository: https://github.com/Man-Ting-Fang/fixjfm
 
-Version: 2017-09-02 v0.2
+Version: 2017-09-04 v0.4
 
 Copyright 2017 Yue ZHANG
 

Modified: trunk/Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.tex	2017-09-04 21:44:24 UTC (rev 45211)
+++ trunk/Master/texmf-dist/doc/generic/fixjfm/fixjfm-doc.tex	2017-09-04 21:44:37 UTC (rev 45212)
@@ -68,6 +68,10 @@
 
 \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%
@@ -74,12 +78,13 @@
   \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 @@
 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 @@
 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 @@
 \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 @@
 \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}

Modified: trunk/Master/texmf-dist/tex/generic/fixjfm/fixjfm.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/fixjfm/fixjfm.sty	2017-09-04 21:44:24 UTC (rev 45211)
+++ trunk/Master/texmf-dist/tex/generic/fixjfm/fixjfm.sty	2017-09-04 21:44:37 UTC (rev 45212)
@@ -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 at empty
     \let\UseStandardCJKTextFontCommands=\fixjfm at empty
   \else
     \def\DeclareFixJFMCJKTextFontCommand#1#2{%
       \DeclareRobustCommand#1[1]{%
-        \relax\ifmmode\nfss at text\fi{#2\fixjfmspacing##1}\fixjfmspacing}}%
+        \relax\ifmmode\expandafter\nfss at text\fi
+        {#2\fixjfmspacing##1}\fixjfmspacing}}%
+    \def\DeclareStandardCJKTextFontCommand#1#2{%
+      \DeclareRobustCommand#1[1]{%
+        \relax\ifmmode\expandafter\nfss at 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
 



More information about the tex-live-commits mailing list