diff options
author | Karl Berry <karl@freefriends.org> | 2017-10-09 22:07:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-10-09 22:07:51 +0000 |
commit | ab470e9d889b5624187d9c30bb9ff093348039de (patch) | |
tree | 8ad791ed60d32b3f970da0069ffa5fe45232e21e /Master/texmf-dist/tex/latex/isopt | |
parent | 46088a3268571a362dd9a36835c27eb3c4cfe42a (diff) |
isopt (9oct17)
git-svn-id: svn://tug.org/texlive/trunk@45509 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/isopt')
-rw-r--r-- | Master/texmf-dist/tex/latex/isopt/isopt.sty | 57 |
1 files changed, 57 insertions, 0 deletions
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 + + |