summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-10-09 22:07:51 +0000
committerKarl Berry <karl@freefriends.org>2017-10-09 22:07:51 +0000
commitab470e9d889b5624187d9c30bb9ff093348039de (patch)
tree8ad791ed60d32b3f970da0069ffa5fe45232e21e
parent46088a3268571a362dd9a36835c27eb3c4cfe42a (diff)
isopt (9oct17)
git-svn-id: svn://tug.org/texlive/trunk@45509 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/isopt/Changes1
-rw-r--r--Master/texmf-dist/doc/latex/isopt/README.md11
-rw-r--r--Master/texmf-dist/doc/latex/isopt/isopt-doc.bib9
-rw-r--r--Master/texmf-dist/doc/latex/isopt/isopt-doc.pdfbin0 -> 60820 bytes
-rw-r--r--Master/texmf-dist/doc/latex/isopt/isopt-doc.tex66
-rw-r--r--Master/texmf-dist/tex/latex/isopt/isopt.sty57
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds1
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/isopt.tlpsrc0
10 files changed, 147 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/isopt/Changes b/Master/texmf-dist/doc/latex/isopt/Changes
new file mode 100644
index 00000000000..b465017572c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/isopt/Changes
@@ -0,0 +1 @@
+v. 0.01 2017-10-09 - first CTAN version \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/isopt/README.md b/Master/texmf-dist/doc/latex/isopt/README.md
new file mode 100644
index 00000000000..0f74096c4b0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/isopt/README.md
@@ -0,0 +1,11 @@
+# README #
+
+Writing a TeX length with \the writes the value and
+the unit without a space. Package isopt provides
+a macro \ISO which inserts a user defined space
+between number and unit.
+
+
+This program can be redistributed and/or modified under the terms
+of the LaTeX Project Public License Distributed from CTAN archives
+in directory macros/latex/base/lppl.txt.
diff --git a/Master/texmf-dist/doc/latex/isopt/isopt-doc.bib b/Master/texmf-dist/doc/latex/isopt/isopt-doc.bib
new file mode 100644
index 00000000000..00e85d5c910
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/isopt/isopt-doc.bib
@@ -0,0 +1,9 @@
+@online{nist,
+url={https://physics.nist.gov/cuu/Units/checklist.html},
+author={{NIST: National Institut of Standards and Technology}},
+organisation= {U.S. Department of Commerce},
+title={SI Unit rules and style conventions},
+subtitle={Check List for Reviewing Manuscripts},
+date={2004-09},
+urldate={2017-10-09},
+}
diff --git a/Master/texmf-dist/doc/latex/isopt/isopt-doc.pdf b/Master/texmf-dist/doc/latex/isopt/isopt-doc.pdf
new file mode 100644
index 00000000000..89b03cc6209
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/isopt/isopt-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/isopt/isopt-doc.tex b/Master/texmf-dist/doc/latex/isopt/isopt-doc.tex
new file mode 100644
index 00000000000..d8cb300c8a9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/isopt/isopt-doc.tex
@@ -0,0 +1,66 @@
+\documentclass[paper=a4]{article}
+\usepackage{geometry}
+\usepackage{dejavu-otf}
+\usepackage[space=~]{isopt}
+\makeatletter
+\let\FV\ISOpt@fileversion
+\makeatother
+
+\usepackage{biblatex}
+\addbibresource{\jobname.bib}
+
+\title{Writing a \TeX\ length in ISO style\thanks{Thanks to Heiko Oberdiek}\\[7pt] \normalsize v. \FV}
+\author{Herbert Voß}
+
+\begin{document}
+
+\maketitle
+
+\section{How it works}
+By default \TeX\ writes an internal length in the following way:
+
+\verb|\the\baselineskip|$\rightarrow$\the\baselineskip
+
+There is no space between value and unit. Package \texttt{isopt} provides the macro
+\texttt{\textbackslash ISO} which needs a \TeX\ length as argument and prints
+it with the default \verb|\thinspace|
+
+\verb|\ISO\the\baselineskip|$\rightarrow$\ISO\the\baselineskip
+
+\begin{verbatim}
+\sbox0{Hello World}
+The box is \ISO\wd0\ wide, \ISO\ht0\ high and has a depth of \ISO\dp0.
+\end{verbatim}
+
+\sbox0{Hello World}
+The box is \ISO\wd0\ wide, \ISO\ht0\ high and has a depth of \ISO\dp0.
+
+
+There is also a short form \verb|\THE| which is defined as \verb|\ISO\the|.
+It saves only some keystrokes:
+
+\verb|\THE\tabcolsep|$\rightarrow$\THE\tabcolsep
+
+
+If you prefer the tilde \verb|~| as space between value and unit, then pass
+it as optional argument of the package:
+
+\begin{verbatim}
+\usepackage[space=~]{isopt}
+\end{verbatim}
+
+The predefined space is \verb|\usepackage[space=\thinspace]{isopt}|
+
+\section{Limitations}
+
+The current version does not support a rubber length like \verb|\the\parskip|$\rightarrow$\the\parskip
+
+
+
+
+
+\nocite{*}
+\printbibliography
+
+\end{document}
+
diff --git a/Master/texmf-dist/tex/latex/isopt/isopt.sty b/Master/texmf-dist/tex/latex/isopt/isopt.sty
new file mode 100644
index 00000000000..019cfbdc2a0
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/isopt/isopt.sty
@@ -0,0 +1,57 @@
+%%
+%% IMPORTANT NOTICE:
+%%
+%% This is file `ISOpt.sty',
+%%
+%% Herbert Voss <hvoss@tug.org>
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory macros/latex/base/lppl.txt.
+%%
+%% DESCRIPTION:
+%% `ISOpt' offers writing a TeX length in ISO style
+%%
+\NeedsTeXFormat{LaTeX2e}
+\def\ISOpt@fileversion{0.01}
+\def\ISOpt@filedate{2017/10/09}
+\ProvidesPackage{isopt}[2017/10/09 v 0.01 print a TeX length in ISO style]
+\message{`isopt' v\ISOpt@fileversion, \ISOpt@filedate\space (hv)}
+%
+\RequirePackage{xkeyval}
+\let\ISOpt@space\thinspace
+\DeclareOptionX{space}{\def\ISOpt@space{#1}}
+\ProcessOptionsX\relax
+%
+\newcommand*{\ISO}{\@ifnextchar\bgroup\dudenpt@arg\dudenpt@}
+\newcommand*{\dudenpt@arg}[1]{\dudenpt@#1\relax}
+\newcommand*{\dudenpt@}{\begingroup\afterassignment\@dudenpt\dimen@=}
+\newcommand*{\@dudenpt}{\expandafter\endgroup\expandafter\duden@pt\the\dimen@}
+\begingroup
+ \catcode`P=12
+ \catcode`T=12
+ \lowercase{%
+ \def\x{%
+ \def\duden@pt##1.##2PT{%
+ ##1\ifnum##2>\z@.##2\fi
+ \ifcase
+ \ifnum##2>\z@\@ne
+ \else\ifnum##1>9 \@ne
+ \else\ifnum##1<\z@ \@ne
+ \else \z@
+ \fi\fi\fi
+ \ISOpt@space
+ \else
+ \nobreakspace
+ \fi
+ pt%
+ }%
+ }%
+ }%
+\expandafter\endgroup\x
+%
+\newcommand\THE{\ISO\the}
+%
+\endinput
+
+
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index a68b55bb573..b63cd84b8c6 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -335,7 +335,7 @@ my @TLP_working = qw(
intro-scientific
inversepath invoice invoice2
ionumbers iopart-num ipaex ipaex-type1 iscram iso
- iso10303 isodate isodoc isomath isonums isorot isotope
+ iso10303 isodate isodoc isomath isonums isopt isorot isotope
issuulinks istgame itnumpar
iwhdp iwona
jablantile jacow jamtimes japanese-otf japanese-otf-uptex jfmutil
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 38e0fc7ac4d..524f09a9950 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -557,6 +557,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`);
'invoice', "&MAKEflatten",
'ipa', "die 'skipping, part of wsuipa'",
'ipaex-type1', "&MAKEflatten",
+ 'isopt', "&MAKEflatten",
'isostds', "die 'skipping, use iso or iso10303'",
'itrans', "die 'skipping, no longer maintained (maybe you want xetex-itrans?), too complex'",
'itrans-processor', "die 'skipping, no longer maintained, too complex'",
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index 64cc6acadda..b72fb989dd5 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -549,6 +549,7 @@ depend iso10303
depend isodate
depend isodoc
depend isonums
+depend isopt
depend isorot
depend isotope
depend issuulinks
diff --git a/Master/tlpkg/tlpsrc/isopt.tlpsrc b/Master/tlpkg/tlpsrc/isopt.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/isopt.tlpsrc