texlive[45193] Master: upzhkinsoku (2sep17)

commits+karl at tug.org commits+karl at tug.org
Sat Sep 2 23:29:34 CEST 2017


Revision: 45193
          http://tug.org/svn/texlive?view=revision&revision=45193
Author:   karl
Date:     2017-09-02 23:29:34 +0200 (Sat, 02 Sep 2017)
Log Message:
-----------
upzhkinsoku (2sep17)

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

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/generic/upzhkinsoku/
    trunk/Master/texmf-dist/doc/generic/upzhkinsoku/README.txt
    trunk/Master/texmf-dist/doc/generic/upzhkinsoku/upzhkinsoku-doc.pdf
    trunk/Master/texmf-dist/doc/generic/upzhkinsoku/upzhkinsoku-doc.tex
    trunk/Master/texmf-dist/tex/generic/upzhkinsoku/
    trunk/Master/texmf-dist/tex/generic/upzhkinsoku/upzhkinsoku.sty
    trunk/Master/tlpkg/tlpsrc/upzhkinsoku.tlpsrc

Added: trunk/Master/texmf-dist/doc/generic/upzhkinsoku/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/generic/upzhkinsoku/README.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/upzhkinsoku/README.txt	2017-09-02 21:29:34 UTC (rev 45193)
@@ -0,0 +1,17 @@
+
+
+The upzhkinsoku package --- Supplementary Chinese kinsoku for Unicode *pTeX
+
+CTAN Homepage: https://ctan.org/pkg/upzhkinsoku
+
+Repository: https://github.com/Man-Ting-Fang/upzhkinsoku
+
+Version: 2017-09-02 v0.2
+
+Copyright 2017 Yue ZHANG
+
+License: Knuth License (https://ctan.org/license/knuth)
+
+This package provides supplementary Chinese kinsoku (line breaking rules etc.)
+settings for Unicode (e-)upTeX ((e-)upTeX when using Unicode as its internal
+encoding) and ApTeX. Both LaTeX and plain TeX are supported.


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

Index: trunk/Master/texmf-dist/doc/generic/upzhkinsoku/upzhkinsoku-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/generic/upzhkinsoku/upzhkinsoku-doc.pdf	2017-09-02 00:21:30 UTC (rev 45192)
+++ trunk/Master/texmf-dist/doc/generic/upzhkinsoku/upzhkinsoku-doc.pdf	2017-09-02 21:29:34 UTC (rev 45193)

Property changes on: trunk/Master/texmf-dist/doc/generic/upzhkinsoku/upzhkinsoku-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/generic/upzhkinsoku/upzhkinsoku-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/upzhkinsoku/upzhkinsoku-doc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/upzhkinsoku/upzhkinsoku-doc.tex	2017-09-02 21:29:34 UTC (rev 45193)
@@ -0,0 +1,82 @@
+
+
+% upzhkinsoku-doc.tex
+
+% !TeX encoding = UTF-8
+% !TeX program  = pdfLaTeX
+
+\RequirePackage{fix-cm}
+
+\documentclass[a4paper]{article}
+
+\usepackage[OT1]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage[UKenglish]{babel}
+\usepackage[babel]{microtype}
+\usepackage{etoolbox}
+
+\AtBeginEnvironment{verbatim}{\microtypesetup{activate=false}}
+
+\newcommand\NormalSans{\normalfont\sffamily}
+\newcommand\pkg[1]{{\protect\NormalSans#1}}
+
+\newcommand\pTeX{p\kern-0.15em\TeX}
+\newcommand\e{\ensuremath{\varepsilon}}
+\newcommand\upTeX{u\pTeX}
+\newcommand\ApTeX{A\kern-0.1em\pTeX}
+
+\newcommand\kn{test}
+\newcommand\sk{test}
+
+\font\kn=ipxm-r-u79 at 9.62216pt
+\font\sk=ipxm-r-u52 at 9.62216pt
+
+\begin{document}
+
+\title{The \pkg{upzhkinsoku} package%
+  \thanks{CTAN Homepage: \texttt{https://ctan.org/pkg/upzhkinsoku}}
+  \thanks{Repository: \texttt{https://github.com/Man-Ting-Fang/upzhkinsoku}}}
+\author{Yue \textsc{Zhang}}
+\date{2017-09-02\quad v0.2}
+
+\maketitle
+
+\begin{abstract}
+This package provides supplementary Chinese kinsoku (line breaking rules etc.)
+settings for Unicode (\e-)\upTeX\footnote{(\e-)\upTeX\ when using Unicode as its
+internal encoding.} and \ApTeX.
+\end{abstract}
+
+\section{Introduction}
+
+\textit{Kinsoku} is the romanisation of the Japanese word ``{\kn\char"81\relax
+\sk\char"47}'' which means ``prohibition rules''. It is a set of rules to avoid
+prohibited line breaks in CJK typography, such as ``line-start prohibition
+rules'', ``line-end prohibition rules'', inseparable or unbreakable character
+sequences and so on.\footnote{\textit{Requirements for Japanese Text Layout}:
+\texttt{https://www.w3.org/TR/jlreq/}}
+
+(\e-)\upTeX\ and \ApTeX's default kinsoku parameters are set in
+\verb|ukinsoku.tex|. However, the default settings do not satisfy Chinese
+typesetting,\footnote{\textit{Requirements for Chinese Text Layout}:
+\texttt{https://www.w3.org/TR/clreq/}} thus this package provides supplementary
+Chinese kinsoku settings for Unicode (\e-)\upTeX\ and \ApTeX.
+
+Please note that this package is specifically optimised for Chinese typesetting,
+so it is usually not suitable for document whose main language is not Chinese.
+
+\section{Usage}
+
+This package has no options, just load it as usual:
+\begin{itemize}
+\item \LaTeX: \verb|\usepackage{upzhkinsoku}|
+\item Plain \TeX: \verb|\input upzhkinsoku.sty|
+\end{itemize}
+If you are using \LaTeX\ and would like to change some kinsoku parameters (this
+is usually unnecessary, however), please do that after \verb|\begin{document}|,
+or via \verb|\AtBeginDocument| after loading this package; otherwise they may be
+overridden.\footnote{For technical reasons, the actual execution of this package
+is delayed to \texttt{\char"5C begin\char"7B document\char"7D}, also via
+\texttt{\char"5C AtBeginDocument}.}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/generic/upzhkinsoku/upzhkinsoku-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/generic/upzhkinsoku/upzhkinsoku.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/upzhkinsoku/upzhkinsoku.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/upzhkinsoku/upzhkinsoku.sty	2017-09-02 21:29:34 UTC (rev 45193)
@@ -0,0 +1,165 @@
+
+
+% upzhkinsoku.sty
+% Copyright 2017 Yue ZHANG
+% License: Knuth License (https://ctan.org/license/knuth)
+
+\csname ENDINPUTUPZHKINSOKUDOTSTY\endcsname
+
+\let\ENDINPUTUPZHKINSOKUDOTSTY=\endinput
+
+\begingroup\expandafter\expandafter\expandafter\endgroup
+  \expandafter\ifx\csname ProvidesPackage\endcsname\relax
+  \else
+    \ProvidesPackage{upzhkinsoku}[2017/09/02 v0.2
+      Supplementary Chinese kinsoku for Unicode *pTeX]%
+  \fi
+
+\edef\UPZHKINSOKUDOTSTYRESTORECATCODE{%
+  \catcode`\noexpand\@=\the\catcode`\@\relax}
+
+\catcode`\@=11\relax
+
+\def\upzhkinsoku at ifprimitive#1{%
+  \begingroup
+    \edef\upzhkinsoku at temp@meaning{\meaning#1}%
+    \edef\upzhkinsoku at temp@string{\string#1}%
+    \expandafter
+  \endgroup
+  \ifx\upzhkinsoku at temp@meaning\upzhkinsoku at temp@string}
+
+\upzhkinsoku at ifprimitive\ucs
+\else
+  \errmessage{upTeX / e-upTeX / ApTeX is required}%
+  \UPZHKINSOKUDOTSTYRESTORECATCODE
+  \expandafter\endinput
+\fi
+
+\ifnum\ucs"3000="3000\relax
+\else
+  \errmessage{Unicode upTeX / Unicode e-upTeX / ApTeX is required}%
+  \UPZHKINSOKUDOTSTYRESTORECATCODE
+  \expandafter\endinput
+\fi
+
+\def\upzhkinsoku at setpenalties{%
+  \postbreakpenalty`\#=10000\relax % U+0023
+  \postbreakpenalty"24=10000\relax % U+0024 ($; variable slot)
+  \prebreakpenalty`\%=10000\relax  % U+0025
+  \prebreakpenalty`\&=10000\relax  % U+0026
+  \prebreakpenalty`\*=10000\relax  % U+002A
+  \prebreakpenalty"2B=10000\relax  % U+002B (+; \+ is \outer in plain.tex)
+  \prebreakpenalty`\/=10000\relax  % U+002F
+  \prebreakpenalty`\==10000\relax  % U+003D
+  \postbreakpenalty`\@=10000\relax % U+0040
+  \prebreakpenalty`\^=10000\relax  % U+005E
+  \prebreakpenalty`\~=10000\relax  % U+007E
+  \postbreakpenalty`〚=10000\relax % U+301A
+  \prebreakpenalty`〛=10000\relax  % U+301B
+  \prebreakpenalty"B7=10000\relax  % U+00B7 (·; variable slot)
+  \prebreakpenalty`•=10000\relax   % U+2022
+  \prebreakpenalty`‧=10000\relax  % U+2027
+  \prebreakpenalty`‐=10000\relax   % U+2010
+  \prebreakpenalty`–=10000\relax   % U+2013
+  \prebreakpenalty`-=10000\relax  % U+FF0D
+  \prebreakpenalty`…=0\relax       % U+2026
+  \prebreakpenalty`‥=0\relax      % U+2025
+  \prebreakpenalty`/=10000\relax  % U+FF0F
+  \prebreakpenalty`~=10000\relax  % U+FF5E
+}
+\def\upzhkinsoku at setxspcodes{%
+  \xspcode`\!=2\relax % U+0021
+  \xspcode`\#=1\relax % U+0023
+  \xspcode"24=1\relax % U+0024 ($; variable slot)
+  \xspcode`\%=2\relax % U+0025
+  \xspcode`\&=3\relax % U+0026
+  \xspcode`\:=2\relax % U+003A
+  \xspcode`\?=2\relax % U+003F
+  \xspcode`\@=1\relax % U+0040
+}
+\def\upzhkinsoku at setinhibitxspcodes{%
+  \inhibitxspcode`〚=2\relax % U+301A
+  \inhibitxspcode`〛=1\relax % U+301B
+  \inhibitxspcode"B7=0\relax % U+00B7 (·; variable slot)
+  \inhibitxspcode`•=0\relax  % U+2022
+  \inhibitxspcode`‧=0\relax % U+2027
+  \inhibitxspcode`・=0\relax % U+30FB
+  \inhibitxspcode`:=1\relax % U+FF1A
+  \inhibitxspcode`!=1\relax % U+FF01
+  \inhibitxspcode`‐=0\relax  % U+2010
+  \inhibitxspcode`–=0\relax  % U+2013
+  \inhibitxspcode`⸺=0\relax  % U+2E3A
+  \inhibitxspcode`-=0\relax % U+FF0D
+  \inhibitxspcode`‥=0\relax % U+2025
+  \inhibitxspcode`/=0\relax % U+FF0F
+}
+
+\def\upzhkinsoku at setwith@ascii{% variable slots
+  \prebreakpenalty"3C=10000\relax  % <
+  \prebreakpenalty"3E=10000\relax  % >
+  \prebreakpenalty"5C=10000\relax  % \
+  \prebreakpenalty"5F=10000\relax  % _
+  \postbreakpenalty"7B=10000\relax % {
+  \prebreakpenalty"7C=10000\relax  % |
+  \prebreakpenalty"7D=10000\relax  % }
+  \xspcode"22=0\relax % "
+  \xspcode"3C=0\relax % <
+  \xspcode"3E=0\relax % >
+  \xspcode"5C=0\relax % \
+  \xspcode"7B=1\relax % {
+  \xspcode"7D=2\relax % }
+}
+\def\upzhkinsoku at setwith@otlatin{% variable slots
+  \postbreakpenalty"3C=10000\relax % ¡
+  \postbreakpenalty"3E=10000\relax % ¿
+  \postbreakpenalty"5C=10000\relax % “
+  \prebreakpenalty"5F=0\relax      % ˙
+  \prebreakpenalty"7B=10000\relax  % –
+  \prebreakpenalty"7C=0\relax      % —
+  \prebreakpenalty"7D=0\relax      % ˝
+  \xspcode"22=2\relax % ”
+  \xspcode"3C=1\relax % ¡
+  \xspcode"3E=1\relax % ¿
+  \xspcode"5C=1\relax % “
+  \xspcode"7B=0\relax % –
+  \xspcode"7D=0\relax % ˝
+}
+
+\def\DisableOTLatinVariableSlotsKinsoku{\upzhkinsoku at setwith@ascii}
+\def\EnableOTLatinVariableSlotsKinsoku{\upzhkinsoku at setwith@otlatin}
+
+\upzhkinsoku at ifprimitive\input
+  \def\upzhkinsoku at input#1{\input#1\relax}%
+\else
+  \def\upzhkinsoku at input#1{\input{#1}}%
+\fi
+
+\edef\upzhkinsoku at otone{OT1}
+\edef\upzhkinsoku at otfour{OT4}
+
+\def\setupzhkinsokuwith#1{%
+  \upzhkinsoku at input{ukinsoku.tex}%
+  \upzhkinsoku at setpenalties
+  \upzhkinsoku at setxspcodes
+  \upzhkinsoku at setinhibitxspcodes
+  \edef\upzhkinsoku at defaultfontenc{#1}%
+  \ifx\upzhkinsoku at defaultfontenc\upzhkinsoku at otone
+    \upzhkinsoku at setwith@otlatin
+  \else
+    \ifx\upzhkinsoku at defaultfontenc\upzhkinsoku at otfour
+      \upzhkinsoku at setwith@otlatin
+    \else
+      \upzhkinsoku at setwith@ascii
+    \fi
+  \fi}
+
+\begingroup\expandafter\expandafter\expandafter\endgroup
+  \expandafter\ifx\csname encodingdefault\endcsname\relax
+    \setupzhkinsokuwith{\upzhkinsoku at otone}%
+  \else
+    \AtBeginDocument{\setupzhkinsokuwith{\encodingdefault}}%
+  \fi
+
+\UPZHKINSOKUDOTSTYRESTORECATCODE
+
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/generic/upzhkinsoku/upzhkinsoku.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-09-02 00:21:30 UTC (rev 45192)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-09-02 21:29:34 UTC (rev 45193)
@@ -648,7 +648,7 @@
     unravel unswcover
     uothesis uowthesis uowthesistitlepage
     upca uplatex upmethodology uppunctlm upquote
-    uptex-base uptex-fonts
+    uptex-base uptex-fonts upzhkinsoku
     uri url urlbst urcls urwchancal usebib ushort uspace uspatent
     ut-thesis utf8mex uwmslide uwthesis
   vak vancouver variablelm variations varindex varisize

Modified: trunk/Master/tlpkg/tlpsrc/collection-langchinese.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-langchinese.tlpsrc	2017-09-02 00:21:30 UTC (rev 45192)
+++ trunk/Master/tlpkg/tlpsrc/collection-langchinese.tlpsrc	2017-09-02 21:29:34 UTC (rev 45193)
@@ -19,6 +19,7 @@
 depend lshort-chinese
 depend texlive-zh-cn
 depend texproposal
+depend upzhkinsoku
 depend xpinyin
 depend zhlipsum
 depend zhmetrics

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


More information about the tex-live-commits mailing list