texlive[44514] Master: bxcalc (22may17)

commits+karl at tug.org commits+karl at tug.org
Tue Jun 6 23:57:28 CEST 2017


Revision: 44514
          http://tug.org/svn/texlive?view=revision&revision=44514
Author:   karl
Date:     2017-06-06 23:57:28 +0200 (Tue, 06 Jun 2017)
Log Message:
-----------
bxcalc (22may17)

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

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/bxcalc/
    trunk/Master/texmf-dist/doc/latex/bxcalc/LICENSE
    trunk/Master/texmf-dist/doc/latex/bxcalc/README-ja.md
    trunk/Master/texmf-dist/doc/latex/bxcalc/README.md
    trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcize.pdf
    trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcize.tex
    trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcux.pdf
    trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcux.tex
    trunk/Master/texmf-dist/doc/latex/bxcalc/sample-bxcalc.pdf
    trunk/Master/texmf-dist/doc/latex/bxcalc/sample-bxcalc.tex
    trunk/Master/texmf-dist/tex/latex/bxcalc/
    trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalc.sty
    trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalcize.sty
    trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalcux.sty
    trunk/Master/tlpkg/tlpsrc/bxcalc.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/bxcalc/LICENSE
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxcalc/LICENSE	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bxcalc/LICENSE	2017-06-06 21:57:28 UTC (rev 44514)
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2017 Takayuki YATO (aka. "ZR")
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

Added: trunk/Master/texmf-dist/doc/latex/bxcalc/README-ja.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxcalc/README-ja.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bxcalc/README-ja.md	2017-06-06 21:57:28 UTC (rev 44514)
@@ -0,0 +1,59 @@
+BXcalc パッケージ
+=================
+
+LaTeX: calc パッケージの機能を拡張する
+
+本パッケージバンドルは、以下のパッケージからなる:
+
+  * bxcalcize: calc 数式の適応範囲の拡大
+
+  * bxcalcux: 新しい長さ単位の追加
+
+この他に、このバンドルは bxcalc パッケージを含む。このパッケージは単に内部
+で上記のパッケージを一括して読み込む。
+
+### 前提環境
+
+  * フォーマット: LaTeX
+  * エンジン: 不問
+      - 一部の機能は e-TeX 拡張を必要とする。
+  * 依存パッケージ:
+      - calc
+
+### インストール
+
+  - `*.sty` → $TEXMF/tex/latex/BXcalc
+
+### ライセンス
+
+本パッケージは MIT ライセンスの下で配布される。
+
+bxcalc パッケージ ― 本体
+-------------------------
+
+本バンドルに含まれる他のパッケージを一括して読み込む。
+
+bxcalcize パッケージ ― calc 数式の適応範囲の拡大
+-------------------------------------------------
+
+LaTeX 標準命令中の長さ指定でこれまで calc パッケージの数式の使用が
+不可だった箇所を可能にする。
+
+詳細は解説文書 bxcalcize.pdf を参照。
+
+bxcalcux パッケージ ― 新しい長さ単位の追加
+-------------------------------------------
+
+ユーザが新しい長さ単位を定義して calc 数式で使えるようにする。
+
+詳細は解説文書 bxcalcux.pdf を参照。
+
+更新履歴
+--------
+
+  * Version 1.0  〈2017/05/21〉
+      - 本バンドルとしての最初の公開版。(元々は BXjatool の一部だった。)
+
+--------------------
+Takayuki YATO (aka. "ZR")  
+https://github.com/zr-tex8r


Property changes on: trunk/Master/texmf-dist/doc/latex/bxcalc/README-ja.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bxcalc/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxcalc/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bxcalc/README.md	2017-06-06 21:57:28 UTC (rev 44514)
@@ -0,0 +1,61 @@
+BXcalc Package
+==============
+
+LaTeX: To extend the functionality of the calc package
+
+This package bundle consists of the following packages:
+
+  * bxcalcize: To make calc expressions available in more places.
+
+  * bxcalcux: To add user-defined units to the calc syntax.
+
+In addition, this bundle provides the bxcalc package, which simply loads
+the above-mentioned packages internally.
+
+### System requirement
+
+  * TeX format: LaTeX.
+  * TeX engine: Anything.
+      - Some functions requires the e-TeX extension.
+  * Dependent packages:
+      - calc
+
+### Installation
+
+  - `*.sty` → $TEXMF/tex/latex/BXcalc
+
+### License
+
+This package is distributed under the MIT License.
+
+bxcalc package ― main
+----------------------
+
+This package simply loads all other packages in this bundle.
+
+bxcalcize package ― to make calc expressions available in more places
+----------------------------------------------------------------------
+
+Some standard LaTeX commands involving length specification do not allow
+the use of calc expressions. This package makes such uses possible.
+
+See the manual bxcalcize.pdf for detail.
+
+bxcalcux package ― to add user-defined units to the calc syntax
+----------------------------------------------------------------
+
+This package enables users to define new length units and use them in
+calc expressions.
+
+See the manual bxcalcux.pdf for detail.
+
+Revision History
+----------------
+
+  * Version 1.0  〈2017/05/21〉
+      - The first public version as this bundle, which has been seperated
+        from the old BXjatool bundle.
+
+--------------------
+Takayuki YATO (aka. "ZR")  
+https://github.com/zr-tex8r


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

Index: trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcize.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcize.pdf	2017-06-06 21:56:29 UTC (rev 44513)
+++ trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcize.pdf	2017-06-06 21:57:28 UTC (rev 44514)

Property changes on: trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcize.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcize.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcize.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcize.tex	2017-06-06 21:57:28 UTC (rev 44514)
@@ -0,0 +1,56 @@
+\documentclass[a4paper]{article}
+\usepackage[scale=0.75]{geometry}
+\usepackage{shortvrb}
+\MakeShortVerb{\|}
+\newcommand{\PkgVersion}{1.0}
+\newcommand{\PkgDate}{2017/05/21}
+\newcommand{\Pkg}[1]{\textsf{#1}}
+\newcommand{\Meta}[1]{$\langle$\textit{#1}$\rangle$}
+\newcommand{\Note}{\par\noindent \textbf{NB:}\quad}
+\newcommand{\Means}{~:\quad}
+\providecommand{\eTeX}{$\varepsilon$-{\TeX}}
+%-----------------------------------------------------------
+\begin{document}
+\title{The \Pkg{bxcalcize} package}
+\author{Takayuki YATO\quad (aka.~``ZR'')}
+\date{v\PkgVersion \quad[\PkgDate]}
+\maketitle
+
+%===========================================================
+\section{Overview}
+
+After loading \Pkg{calc}, most of the length specifications
+in {\LaTeX} become aware of that package--- i.e.\ 
+\Pkg{calc} expressions can be written in place of
+simple lengths.
+However some commands remain \Pkg{calc}-unaware; for example
+one cannot use expressions in the argument of |\hspace|.
+This package patches to the {\LaTeX} kernel and eliminates
+remaining \Pkg{calc}-unawareness
+(as far as I know).
+
+\paragraph{Supported format} \LaTeX.
+\paragraph{Supported engine} Any engine with {\eTeX} extensions.
+\paragraph{Prerequisite packages} \Pkg{calc} package.
+
+%===========================================================
+\section{Package Loading}
+
+Use |\usepackage| as usual, with no options.
+\begin{quote}\small\begin{verbatim}
+\usepackage{bxcalcize}
+\end{verbatim}\end{quote}
+
+%===========================================================
+\section{Usage}
+
+After loading the package, one can use \Pkg{calc} expressions
+in the following places:
+\begin{itemize}
+\item the sole argument of |\hspace|(|*|), |\vspace|(|*|), 
+and |\addvspace|;
+\item the sole optional argument of |\\|.
+\end{itemize}
+
+%===========================================================
+\end{document}


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

Index: trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcux.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcux.pdf	2017-06-06 21:56:29 UTC (rev 44513)
+++ trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcux.pdf	2017-06-06 21:57:28 UTC (rev 44514)

Property changes on: trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcux.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcux.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcux.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bxcalc/bxcalcux.tex	2017-06-06 21:57:28 UTC (rev 44514)
@@ -0,0 +1,86 @@
+\documentclass[a4paper]{article}
+\usepackage[scale=0.75]{geometry}
+\usepackage{shortvrb}
+\MakeShortVerb{\|}
+\newcommand{\PkgVersion}{1.0}
+\newcommand{\PkgDate}{2017/05/21}
+\newcommand{\Pkg}[1]{\textsf{#1}}
+\newcommand{\Meta}[1]{$\langle$\textit{#1}$\rangle$}
+\newcommand{\Note}{\par\noindent \textbf{NB:}\quad}
+\newcommand{\Means}{~:\quad}
+\providecommand{\eTeX}{$\varepsilon$-{\TeX}}
+%-----------------------------------------------------------
+\begin{document}
+\title{The \Pkg{bxcalcux} package}
+\author{Takayuki YATO\quad (aka.~``ZR'')}
+\date{v\PkgVersion \quad[\PkgDate]}
+\maketitle
+
+%===========================================================
+\section{Overview}
+
+This package allows one to create a new unit of length
+that can be used in length expressions
+of the  \Pkg{calc} package.
+For example,
+\begin{quote}\small\begin{verbatim}
+\newcalcunit{thou}{0.07227pt}% thousandth of inch
+\setlength{\lengthA}{10thou}
+\end{verbatim}\end{quote}
+will assign 0.72266\,pt to |\lengthA|.%
+\footnote{Using \texttt{0.001in} instead of
+\texttt{0.07227pt} will give rather inaccurate results,
+since \texttt{0.001in} is evaluated to 0.7277\,pt.}
+
+\paragraph{Supported format} \LaTeX.
+\paragraph{Supported engine} Any engine with {\eTeX} extension.
+\paragraph{Prerequisite packages}
+\Pkg{calc}, \Pkg{etoolbox}.
+
+%===========================================================
+\section{Package Loading}
+
+Use |\usepackage| as usual, with no options.
+\begin{quote}\small\begin{verbatim}
+\usepackage{bxcalcux}
+\end{verbatim}\end{quote}
+
+%===========================================================
+\section{Usage}
+
+\begin{itemize}
+\item |\newcalcunit{|\Meta{unit}|}{|\Meta{length}|}|\Means
+Declares a new unit \Meta{unit} as equal to \Meta{length}.
+The unit name must consist only of alphabets.
+You can use relative units such as |0.5em| in \Meta{length},
+and such relative units are resolved
+when \Pkg{calc} expressions are evaluated.
+
+\item |\DeclareCalcUnit{|\Meta{unit}|}{|\Meta{text}|}|\Means
+\textsl{(for {\TeX}nicians)}
+Declares a new unit \Meta{unit} as equal to the unit
+expressed by a token list \Meta{text},
+which must form a ``unit of dimen'' (in {\TeX} terminology).
+Here is an example.
+\begin{quote}\small\begin{verbatim}
+\DeclareCalcUnit{ls}{\baselineskip}% current line skip
+\end{verbatim}\end{quote}
+
+\end{itemize}
+
+%===========================================================
+\section{Notices}
+
+\begin{itemize}
+\item Usually unit names are treated as case-insensitive;
+but as exception, unit names with a single letter are
+case-sensitive.
+\item You must not create a unit name that coincides
+with a prefix of existing (built-in or created) units
+or any keywords that could be used in \Pkg{calc} expressions
+(such as |plus|, |fil|, etc.); otherwise unexpected
+things would occur.
+\end{itemize}
+
+%===========================================================
+\end{document}


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

Index: trunk/Master/texmf-dist/doc/latex/bxcalc/sample-bxcalc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxcalc/sample-bxcalc.pdf	2017-06-06 21:56:29 UTC (rev 44513)
+++ trunk/Master/texmf-dist/doc/latex/bxcalc/sample-bxcalc.pdf	2017-06-06 21:57:28 UTC (rev 44514)

Property changes on: trunk/Master/texmf-dist/doc/latex/bxcalc/sample-bxcalc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bxcalc/sample-bxcalc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bxcalc/sample-bxcalc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/bxcalc/sample-bxcalc.tex	2017-06-06 21:57:28 UTC (rev 44514)
@@ -0,0 +1,29 @@
+\documentclass[a4paper]{article}
+\usepackage{bxcalc}
+% Declares new units
+\newcalcunit{ls}{\baselineskip}
+\newcalcunit{tm}{0.05em}
+%
+\title{Sample document of \textsf{bxcalc}}
+\author{ZR}
+\date{}
+\begin{document}
+\maketitle
+
+\section{Example 1}
+
+\noindent
+The quick brown fox\\[1ex-1ls]% so line skip is 1ex
+jump\hspace{6tm}s\hspace{12tm}ov\hspace{2tm}er\\[1ex-1ls]
+\hspace*{3tm}t\hspace{4tm}he\hspace{9tm}lazy\hspace{4tm}dog.
+
+\section{Example 2}
+
+\noindent
+AAAAAAAAAAAAAAAAAAAA\\[\heightof{A}-1ls+2tm]
+A\hspace{\widthof{A}*18}A\\[\heightof{A}-1ls+2tm]
+A\hspace{\widthof{A}*18}A\\[\heightof{A}-1ls+2tm]
+A\hspace{\widthof{A}*18}A\\[\heightof{A}-1ls+2tm]
+AAAAAAAAAAAAAAAAAAAA
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/bxcalc/sample-bxcalc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalc.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalc.sty	2017-06-06 21:57:28 UTC (rev 44514)
@@ -0,0 +1,25 @@
+%%
+%% This is file 'bxcalc.sty'.
+%% 
+%% Copyright (c) 2017 Takayuki YATO (aka. "ZR")
+%%   GitHub:   https://github.com/zr-tex8r
+%%   Twitter:  @zr_tex8r
+%%
+%% This package is distributed under the MIT License.
+%%
+
+%% package declaration
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{bxcalc}[2017/05/21 v1.0]
+\def\bxqcz at pkgname{bxcalc}
+
+%--------------------------------------- main
+
+%% packages
+\RequirePackage{calc}[]
+\RequirePackage{bxcalcize}[2017/05/21]% v1.0
+\RequirePackage{bxcalcux}[2017/05/21]% v1.0
+
+%--------------------------------------- all done
+\endinput
+%% EOF


Property changes on: trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalc.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalcize.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalcize.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalcize.sty	2017-06-06 21:57:28 UTC (rev 44514)
@@ -0,0 +1,81 @@
+%%
+%% This is file 'bxcalcize.sty'.
+%% 
+%% Copyright (c) 2017 Takayuki YATO (aka. "ZR")
+%%   GitHub:   https://github.com/zr-tex8r
+%%   Twitter:  @zr_tex8r
+%%
+%% This package is distributed under the MIT License.
+%%
+
+%% package declaration
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{bxcalcize}[2017/05/21 v1.0]
+\def\bxcy at pkgname{bxcalcize}
+
+%% code guards
+\edef\bxcy at restore@codes{%
+\catcode45=\the\catcode45%
+\catcode46=\the\catcode46%
+\catcode47=\the\catcode47%
+\endlinechar=\the\endlinechar%
+\relax}
+\catcode45=12 % <->
+\catcode46=12 % <.>
+\catcode47=12 % </>
+\endlinechar\m at ne
+\AtEndOfPackage{
+\bxcy at restore@codes
+\let\bxcy at restore@codes\relax}
+
+
+%--------------------------------------- general
+
+%% packages
+\RequirePackage{calc}[]
+\RequirePackage{etoolbox}[]
+\ifx\numdef\@undefined\endinput\fi
+
+%% variables
+\newdimen\bxcy at resdim
+
+%--------------------------------------- patches to standard commands
+
+%% to \hspace / \vspace
+\csdef{hspace }{
+  \@ifstar{\bxcy at with@calc\@hspacer}
+   {\bxcy at with@calc\@hspace}
+}
+\csdef{vspace }{
+  \@ifstar{\bxcy at with@calc\@vspacer}
+   {\bxcy at with@calc\@vspace}
+}
+
+%% to \addvspace
+\let\bxcy at org@addvspace\addvspace
+\def\addvspace{
+  \bxcy at with@calc\bxcy at org@addvspace
+}
+
+%% to \\[<len>] (\@newline)
+\patchcmd{\@newline}{
+  \@gnewline{\vskip#1}
+}{
+  \setlength\bxcy at resdim{#1}
+  \edef\bxcy at tmpa{{\vskip\the\bxcy at resdim}}
+  \expandafter\@gnewline\bxcy at tmpa
+}{}{% failure
+  \PackageWarningNoLine\bxcy at pkgname
+   {Patch to \string\@newline\space failed.}
+}
+
+%% \bxcy at with@calc
+\def\bxcy at with@calc#1#2{
+  \setlength\bxcy at resdim{#2}
+  \edef\bxcy at tmpa{{\the\bxcy at resdim}}
+  \expandafter#1\bxcy at tmpa
+}
+
+%--------------------------------------- all done
+\endinput
+%% EOF


Property changes on: trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalcize.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalcux.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalcux.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalcux.sty	2017-06-06 21:57:28 UTC (rev 44514)
@@ -0,0 +1,302 @@
+%%
+%% This is file 'bxcalcux.sty'.
+%% 
+%% Copyright (c) 2017 Takayuki YATO (aka. "ZR")
+%%   GitHub:   https://github.com/zr-tex8r
+%%   Twitter:  @zr_tex8r
+%%
+%% This package is distributed under the MIT License.
+%%
+
+%% package declaration
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{bxcalcux}[2017/05/21 v1.0]
+\def\bxcx at pkgname{bxcalcux}
+
+%% code guards
+\edef\bxcx at restore@codes{%
+\catcode33=\the\catcode33%
+\catcode34=\the\catcode34%
+\catcode63=\the\catcode63%
+\endlinechar=\the\endlinechar%
+\relax}
+\catcode33=12 %<!>
+\catcode34=12 %<">
+\catcode63=12 %<?>
+\endlinechar\m at ne
+\AtEndOfPackage{
+\bxcx at restore@codes
+\let\bxcx at restore@codes\@undefined}
+
+%--------------------------------------- general
+
+%% packages
+\RequirePackage{calc}[]
+\RequirePackage{etoolbox}[]
+\ifx\numdef\@undefined\endinput\fi
+
+%% unique tokens
+\def\bxcx at end{\noexpand\bxcx at end@}
+\def\bxcx at mark{\noexpand\bxcx at mark@}
+\def\bxcx at mt{\noexpand\bxcx at mt@}
+
+%% variables
+\let\bxcx at parsed\@empty   % parsed token list
+\let\bxcx at unit\@empty     % unit string now holding
+\let\bxcx at unitlc\@empty   % unit string now holding, lowercased
+\newcount\bxcx at arg@count  % # of arguments remaining
+\let\bxcx at mode\relax      % current mode (N/L/U)
+\let\bxcx at g@tempa\@empty  % global temp
+% \bxcx at arity\CS          % arity of functions of which the
+                          % argument should be also parsed
+% \bxcx at lc/<char>         % lowercase letter of an alphabet letter
+% \bxcx at tl/<str>          % tl that relates to unit <str>
+% \bxcx at mluf/<str>        % is there a multichar unit <char>... ?
+
+%% Makes the array \bxcx at arity*.
+\csdef{bxcx at arity\string\minof}{2}
+\csdef{bxcx at arity\string\maxof}{2}
+
+%% Makes the array \bxcx at lc/*.
+\@tempcnta=65
+\@tempcntb=97
+\@whilenum\@tempcnta<91 \do{
+  \lccode`!=\@tempcnta \lccode`?=\@tempcntb
+  \lowercase{
+    \csdef{bxcx at lc/!}{?}
+    \csdef{bxcx at lc/?}{?}
+  }
+  \advance\@tempcnta\@ne
+  \advance\@tempcntb\@ne
+}
+
+%% \bxcx at cond\ifXXX...\fi{<true>}{<false>}
+\@gobbletwo\if\if \def\bxcx at cond#1\fi{
+  #1\expandafter\@firstoftwo
+  \else \expandafter\@secondoftwo
+  \fi
+}
+
+%--------------------------------------- unit registration
+
+%%<*> \newcalcunit{<unit>}{<length>}
+\newcommand*\newcalcunit[2]{
+  \DeclareCalcUnit{#1}{\dimexpr#2\relax}
+}
+
+%%<+> \DeclareCalcUnit{<unit>}{<unit-of-dimen>}
+\newcommand*\DeclareCalcUnit[2]{
+  \edef\bxcx at tempa{#1}
+  \expandafter\bxcx at check@unit at name\meaning\bxcx at tempa\bxcx at end
+  \bxcx at cond\ifx\bxcx at tempa\@empty\fi{}{%else
+    \expandafter\bxcx at decl@calc at unit@a\meaning\bxcx at tempa\bxcx at end{#2}
+  }
+}
+\def\bxcx at decl@calc at unit@a#1>#2#3\bxcx at end#4{
+  \ifstrempty{#3}{
+    \csdef{bxcx at tl/#2}{#4}
+  }{%else
+    \csdef{bxcx at mluf/\@nameuse{bxcx at lc/#2}}{t}
+    \let\bxcx at unitlc\@empty
+    \@tfor\bxcx at tempa:=#2#3\do{
+      \eappto\bxcx at unitlc{\@nameuse{bxcx at lc/\bxcx at tempa}}
+    }
+    \csdef{bxcx at tl/\bxcx at unitlc}{#4}
+  }
+}
+\def\bxcx at check@unit at name#1>#2\bxcx at end{
+  \@tfor\bxcx at tempb:=#2\do{
+    \ifcsdef{bxcx at lc/\bxcx at tempb}{}{%else
+      \let\bxcx at tempa\@empty
+    }
+  }
+  \ifx\bxcx at tempa\@empty
+    \PackageError\bxcx at pkgname
+     {Illegal unit name '#2'}
+  \fi
+}
+
+%--------------------------------------- parser
+
+%%<+> \CUXParseExpr\CS{<expr>}
+\newcommand*\CUXParseExpr[2]{
+  \bxcx at parse{#2}
+  \let#1=\bxcx at parsed
+}
+
+%% \bxcx at parse
+\def\bxcx at parse#1{
+  \let\bxcx at parsed\@empty
+  \bxcx at clear@unit
+  \let\bxcx at mode=N\relax
+  \bxcx at parse@a#1@\bxcx at end
+}
+\def\bxcx at the#1{\expandafter\bxcx at thee\meaning#1}
+{\lccode`?=`r \lowercase{\gdef\bxcx at thee#1? #2{#2}}}
+\def\bxcx at parse@a{
+%\typeout{[\bxcx at the\bxcx at mode:\the\bxcx at arg@count:\bxcx at unitlc]\expandonce{\bxcx at parsed}}
+  \futurelet\bxcx at tok\bxcx at parse@b
+}
+\def\bxcx at parse@b{
+%\typeout{<token:\meaning\bxcx at tok>}
+  \bxcx at cond\ifx\bxcx at tok\@sptoken\fi{
+    \bxcx at parse@space
+  }{\bxcx at cond\ifx\bxcx at tok\bgroup\fi{
+    \bxcx at parse@group
+  }{\bxcx at cond\ifcat\relax\noexpand\bxcx at tok\fi{
+    \bxcx at arg@count=\z@
+    \bxcx at parse@cs
+  }{%else
+    \bxcx at arg@count=\z@
+    \bxcx at parse@char
+  }}}
+}
+\expandafter\def\expandafter\bxcx at parse@space\space{
+  \bxcx at parse@char{ }
+}
+\def\bxcx at parse@char#1{
+  \bxcx at cond\if N\bxcx at mode\fi{
+    \ifcsdef{bxcx at lc/#1}{
+      \ifcsdef{bxcx at tl/#1}{
+        \bxcx at add@unit{#1}
+        \let\bxcx at mode=L\relax
+      }{\ifcsdef{bxcx at mluf/\@nameuse{bxcx at lc/#1}}{
+        \bxcx at addto@unit{#1}
+        \let\bxcx at mode=U\relax
+      }{%else
+        \appto\bxcx at parsed{#1}
+        \let\bxcx at mode=L\relax
+      }}
+    }{%else
+      \appto\bxcx at parsed{#1}
+    }
+  }{\bxcx at cond\if U\bxcx at mode\fi{
+    \ifcsdef{bxcx at lc/#1}{
+      \bxcx at addto@unit{#1}
+      \ifcsdef{bxcx at tl/\bxcx at unitlc}{
+        \bxcx at add@unit{\bxcx at unitlc}
+        \bxcx at clear@unit
+        \let\bxcx at mode=L\relax
+      }{}
+    }{%else
+      \eappto\bxcx at parsed{\bxcx at unit}
+      \bxcx at clear@unit
+      \appto\bxcx at parsed{#1}
+      \let\bxcx at mode=N\relax
+    }
+  }{%else(L\bxcx at mode)
+    \appto\bxcx at parsed{#1}
+    \ifcsdef{bxcx at lc/#1}{}{%else
+      \let\bxcx at mode=N\relax
+    }
+  }}
+  \bxcx at parse@a
+}
+\def\bxcx at parse@cs#1{
+%\typeout{<cs:\string#1>}
+  \bxcx at cond\ifx#1\bxcx at end\fi{
+    \bxcx at parse@fin
+  }{%else
+    \ifcsdef{bxcx at arity\string#1}{
+      \bxcx at arg@count=\@nameuse{bxcx at arity\string#1}\relax
+    }{}
+    \bxcx at cond\if U\bxcx at mode\fi{
+      \eappto\bxcx at parsed{\bxcx at unit}
+      \bxcx at clear@unit
+    }{}
+    \appto\bxcx at parsed{#1}
+    \let\bxcx at mode=N\relax
+    \bxcx at parse@a
+  }
+}
+\def\bxcx at parse@group#1{
+  \bxcx at cond\if U\bxcx at mode\fi{
+    \eappto\bxcx at parsed{\bxcx at unit}
+    \bxcx at clear@unit
+  }{}
+  \bxcx at cond\ifnum\bxcx at arg@count>\z@\fi{
+%\typeout{<group:parse>}
+    \begingroup
+      \bxcx at parse{#1}
+      \global\let\bxcx at gtempa\bxcx at parsed
+    \endgroup
+    \expandafter\bxcx at parse@group at a\bxcx at gtempa\bxcx at end
+    \advance\bxcx at arg@count\m at ne
+  }{%else
+%\typeout{<group:pass>}
+    \appto\bxcx at parsed{{#1}}
+  }
+  \let\bxcx at mode=N\relax
+  \bxcx at parse@a
+}
+\def\bxcx at parse@group at a#1\bxcx at end{
+  \appto\bxcx at parsed{{#1}}
+}
+\def\bxcx at parse@fin{
+  \expandafter\bxcx at parse@fin at a\bxcx at parsed\bxcx at end
+}
+\def\bxcx at parse@fin at a#1@\bxcx at end{
+  \def\bxcx at parsed{#1}
+}
+
+%% \bxcx at add@unit
+\def\bxcx at add@unit#1{
+%\typeout{<unit:#1>}
+  \expandafter\bxcx at add@unit at a\csname bxcx at tl/#1
+   \endcsname\bxcx at end
+}
+\def\bxcx at add@unit at a#1\bxcx at end{
+  \appto\bxcx at parsed{#1}
+}
+
+%% \bxcx at clear@unit
+\def\bxcx at clear@unit{
+  \let\bxcx at unit\@empty
+  \let\bxcx at unitlc\@empty
+}
+
+%% \bxcx at addto@unit
+\def\bxcx at addto@unit#1{
+  \appto\bxcx at unit{#1}
+  \eappto\bxcx at unitlc{\@nameuse{bxcx at lc/#1}}
+}
+
+%--------------------------------------- apply the patch
+
+%% \bxcx at decl@patch\xxx{<body>}
+% Here xxx is setlength or addtolength; and gives a new
+% definition to that command. The <body> knows two macro
+% arguments (#1 & #2) and \CUXxxx is the original definition
+% of \xxx.
+\def\bxcx at decl@patch#1{
+  \expandafter\bxcx at decl@patch at a\csname
+   \expandafter\@gobble\string#1\space\expandafter\endcsname
+   \csname CUX\expandafter\@gobble\string#1\endcsname
+   #1
+}
+\def\bxcx at decl@patch at a#1#2#3{
+  \def\bxcx at tempa{\protect#1}
+  \bxcx at cond\ifx\bxcx at tempa#3\fi{
+    \let#2=#1
+    \def#1##1##2
+  }{%else
+    \let#2=#3
+    \DeclareRobustCommand*#3[2]
+  }
+}
+
+%% Patch to \setlength.
+\bxcx at decl@patch\setlength{
+  \bxcx at parse{#2}
+  \CUXsetlength{#1}{\bxcx at parsed}
+}
+
+%% Patch to \addtolength.
+\bxcx at decl@patch\addtolength{
+  \bxcx at parse{#2}
+  \CUXaddtolength{#1}{\bxcx at parsed}
+}
+
+%--------------------------------------- all done
+\endinput
+%% EOF


Property changes on: trunk/Master/texmf-dist/tex/latex/bxcalc/bxcalcux.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-06-06 21:56:29 UTC (rev 44513)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-06-06 21:57:28 UTC (rev 44514)
@@ -123,7 +123,7 @@
     br-lex bracketkey braids braille braket brandeis-dissertation
     breakcites breakurl bredzenie breqn bropd brushscr
     bullcntr bundledoc burmese bussproofs
-    bxbase bxcjkjatype bxdpx-beamer bxdvidriver
+    bxbase bxcalc bxcjkjatype bxdpx-beamer bxdvidriver
     bxpapersize bxpdfver bxeepic bxenclose
     bxjalipsum bxjscls bxnewfont bxorigcapt bytefield 
   c90 c-pascal cabin cachepic caladea calcage calctab calculation calculator

Added: trunk/Master/tlpkg/tlpsrc/bxcalc.tlpsrc
===================================================================
Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2017-06-06 21:56:29 UTC (rev 44513)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2017-06-06 21:57:28 UTC (rev 44514)
@@ -103,6 +103,7 @@
 depend breakurl
 depend bullcntr
 depend bussproofs
+depend bxcalc
 depend bxdpx-beamer
 depend bxdvidriver
 depend bxenclose



More information about the tex-live-commits mailing list