texlive[46544] Master: pst-calculate (4feb18)
commits+karl at tug.org
commits+karl at tug.org
Sun Feb 4 22:39:47 CET 2018
Revision: 46544
http://tug.org/svn/texlive?view=revision&revision=46544
Author: karl
Date: 2018-02-04 22:39:47 +0100 (Sun, 04 Feb 2018)
Log Message:
-----------
pst-calculate (4feb18)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/libexec/ctan2tds
trunk/Master/tlpkg/tlpsrc/collection-pstricks.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/generic/pst-calculate/
trunk/Master/texmf-dist/doc/generic/pst-calculate/Changes
trunk/Master/texmf-dist/doc/generic/pst-calculate/README.md
trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.bib
trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.pdf
trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.tex
trunk/Master/texmf-dist/tex/latex/pst-calculate/
trunk/Master/texmf-dist/tex/latex/pst-calculate/pst-calculate.sty
trunk/Master/tlpkg/tlpsrc/pst-calculate.tlpsrc
Added: trunk/Master/texmf-dist/doc/generic/pst-calculate/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-calculate/Changes (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/pst-calculate/Changes 2018-02-04 21:39:47 UTC (rev 46544)
@@ -0,0 +1 @@
+0.01 2018-02-04 - first CTAN version
Added: trunk/Master/texmf-dist/doc/generic/pst-calculate/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-calculate/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/pst-calculate/README.md 2018-02-04 21:39:47 UTC (rev 46544)
@@ -0,0 +1,12 @@
+# README #
+Package pst-calculate defines two macros
+which uses the capabilities
+from LaTeX3 for calculating the values of
+functions. It works only for LaTeX and not
+for real TeX documents.
+
+%% This file is distributed under the terms of the LaTeX Project Public
+%% License from CTAN archives in directory macros/latex/base/lppl.txt.
+%% Either version 1.3 or, at your option, any later version.
+
+Herbert Voß
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/generic/pst-calculate/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.bib
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.bib (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.bib 2018-02-04 21:39:47 UTC (rev 46544)
@@ -0,0 +1,15 @@
+ at ctan{l3,
+author = {{The \LaTeX3\ project}},
+ title = {The \texttt{expl3} package and \LaTeX3\ programming},
+ date = {2017-12-16},
+ urldate = {2018-02-04},
+ url = {/latex/macros/contrib/l3kernel/expl3.pdf}
+}
+ at ctan{xfp,
+author = {{The \LaTeX3\ project}},
+title = {The \texttt{xfp} package -- Floating Point Unit},
+Organisation = {CTAN},
+url = {/pkg/xfp},
+ urldate = {2018-02-04},
+}
+
Property changes on: trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.bib
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.pdf 2018-02-04 21:38:49 UTC (rev 46543)
+++ trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.pdf 2018-02-04 21:39:47 UTC (rev 46544)
Property changes on: trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.tex 2018-02-04 21:39:47 UTC (rev 46544)
@@ -0,0 +1,109 @@
+%% $Id: pst-calculate-doc.tex 724 2018-02-04 13:01:03Z herbert $
+%
+\listfiles
+\documentclass[fontsize=11pt,DIV=14,parskip=half-]{scrartcl}
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+
+\usepackage{graphicx}
+\usepackage{multido}
+\usepackage{libertine}
+\usepackage[scaled=0.88]{beramono}
+\usepackage{pst-calculate} % support opentype spark fonts
+\makeatletter
+\let\Version\pstcalculate at version
+\makeatother
+
+\usepackage{showexpl,xltabular,booktabs,xurl,xcolor,ragged2e}
+\lstset{%
+ language=[LaTeX]TeX,%
+ float=hbp,%
+ basicstyle=\ttfamily\small, %
+ keywordstyle=\bfseries, %
+ columns=flexible, %
+ tabsize=4, %
+% frame=single, %
+ extendedchars=true, %
+ showspaces=false, %
+ showstringspaces=false, %
+% numbers=left,
+% numbersep=0.8em,
+% numberstyle=\tiny, %
+ breaklines=true, %
+ breakautoindent=true,
+ captionpos=b,
+ xleftmargin=1em
+}
+
+\usepackage[style=dtk]{biblatex}
+\addbibresource{\jobname.bib}
+
+\usepackage{dtk-logos} % for Wikipedia W
+
+\pagestyle{headings}
+
+\usepackage[colorlinks,hyperfootnotes=false]{hyperref}
+% define \code for url-like breaking of typewriter fragments.
+\ifx\nolinkurl\undefined \let\code\url \else \let\code\nolinkurl \fi
+
+% Define \cs to prepend a backslash, and be unbreakable:
+\DeclareRobustCommand\cs[1]{\mbox{\texttt{\char`\\#1}}}
+
+
+\title{Support for floating point operations on \LaTeX-Level \\--\\ v.~\Version}
+\author{Herbert Voß}
+\begin{document}
+\maketitle
+\tableofcontents
+
+\section{Introduction}
+
+The upcoming \LaTeX3 can already be used. It is more or less stable and
+macros will change only if really needed.
+
+
+\section{Package options}
+The package knows two optional arguments which, of course, have a corresponding
+name in package \texttt{siunitx}. One can also use that one.
+
+\begin{tabularx}{\linewidth}{@{}llX@{}}\toprule
+\emph{name} & \emph{\texttt{siunitx}} & \emph{description}\\\midrule
+\texttt{useComma} & \texttt{output-decimal-marker=\{,\}} & Output always a comma instead of the default dot.\\
+\texttt{roundDigit}& \texttt{round-mode=places,round-precision=<value>} & round the given digit number.\\
+\bottomrule
+\end{tabularx}
+
+\section{Using the macros}
+
+\begin{LTXexample}[pos=t]
+\psCalculate{3.14126*314^2}\\ % Uses \num from siunitx
+\pscalculate{3.14126*314^2} % doesn't use \num
+\end{LTXexample}
+
+Without using any additional argument all available digits are printed.
+
+\section{Optional arguments}
+
+All optional arguments of package \texttt{siunitx} can be used:
+
+\begin{LTXexample}[pos=t]
+\psCalculate[group-digits=false]{3.14126*314^2}\\
+\psCalculate[output-decimal-marker={,}]{3.14126*314^2/sin(3)}\\
+\psCalculate[exponent-product=\cdot,scientific-notation=true]{3.14126*314^2/sin(3)}\\
+\psCalculate[scientific-notation=engineering]{3.14126*314^2/sin(3)}\\
+\psCalculate[fixed-exponent=2,scientific-notation=fixed]{3.14126*314^2/sin(3)}\\
+\psCalculate[round-precision=3]{3.14126*314^2/sin(3)}\\
+\psCalculate[round-mode=places,round-precision=3]{3.14126*314^2/sin(3)}
+\end{LTXexample}
+
+For more optional argument to format the output have a look at the documentation of \texttt{siunitx}.
+
+
+\RaggedRight
+\nocite{*}
+\printbibliography
+
+
+\end{document}
+
+y
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/generic/pst-calculate/pst-calculate-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/pst-calculate/pst-calculate.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pst-calculate/pst-calculate.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/pst-calculate/pst-calculate.sty 2018-02-04 21:39:47 UTC (rev 46544)
@@ -0,0 +1,57 @@
+%% $Id: pst-calculate.sty 723 2018-02-04 12:45:52Z herbert $
+%%
+%% This file is distributed under the terms of the LaTeX Project Public
+%% License from CTAN archives in directory macros/latex/base/lppl.txt.
+%% Either version 1.3 or, at your option, any later version.
+%%
+% Copyright 2018 Herbert Voss hvoss at tug.org
+%%
+\def\pstcalculate at version{0.01}
+\ProvidesPackage{pst-calculate}[%
+ 2018/02/04 v. \pstcalculate at version~(Herbert Voss) Support for
+ caculations with floating point numbers.]
+%
+\RequirePackage{xkeyval}
+
+\newif\ifcalc at useComma \calc at useCommafalse
+\DeclareOptionX{useComma}[true]{\@nameuse{calc at useComma#1}}
+%
+\let\calc at roundDigit\relax
+\DeclareOptionX{roundDigit}{\def\calc at roundDigit{#1}}
+
+\DeclareOptionX*{\PassOptionsToPackage\CurrentOption{siunitx}}
+
+\ProcessOptionsX\relax
+
+\RequirePackage{xparse,siunitx}
+
+\ifx\relax\calc at roundDigit \else
+ \sisetup{round-mode=places,round-precision=\calc at roundDigit}%
+\fi
+\ifcalc at useComma
+ \sisetup{output-decimal-marker={,}}
+\fi
+
+\ExplSyntaxOn
+\DeclareExpandableDocumentCommand\ps at Calculate{m}{\fp_to_decimal:n{#1}}%
+%\DeclareExpandableDocumentCommand\ps@@Calculate{m}{\fp_to_int:n{#1}}%
+%\DeclareExpandableDocumentCommand\ps@@@Calculate{m}{\fp_to_scientific:n{#1}}%
+\ExplSyntaxOff
+
+\def\pst at calculateType{0}
+
+\def\psCalculate{\@ifnextchar[\psCalculate at i{\psCalculate at i[]}}
+
+\def\psCalculate at i[#1]#2{%
+ \begingroup
+ \ifx\relax#1\relax\else\sisetup{#1}\fi
+ \num{\ps at Calculate{#2}}
+ \endgroup
+ \ignorespaces
+}
+
+\let\pscalculate\ps at Calculate
+
+%%
+\endinput
+
Property changes on: trunk/Master/texmf-dist/tex/latex/pst-calculate/pst-calculate.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 2018-02-04 21:38:49 UTC (rev 46543)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2018-02-04 21:39:47 UTC (rev 46544)
@@ -508,7 +508,7 @@
psgo psizzl pslatex psnfss pspicture
pst-2dplot pst-3d pst-3dplot pst-abspos pst-am pst-arrow pst-asr pst-bar
pst-barcode pst-bezier pst-blur pst-bspline
- pst-calendar pst-cie pst-circ pst-coil pst-cox
+ pst-calculate pst-calendar pst-cie pst-circ pst-coil pst-cox
pst-dart pst-dbicons pst-diffraction
pst-electricfield pst-eps pst-eucl pst-eucl-translation-bg pst-exa
pst-fill pst-fit pst-fr3d pst-fractal pst-fun pst-func
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2018-02-04 21:38:49 UTC (rev 46543)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2018-02-04 21:39:47 UTC (rev 46544)
@@ -902,6 +902,7 @@
'pst-bezier', "&MAKEpst",
'pst-blur', "&MAKEpst",
'pst-bspline', "&MAKEpst",
+ 'pst-calculate', "&MAKEpst",
'pst-cie', "&MAKEpst",
'pst-circ', "&MAKEpst",
'pst-coil', "&MAKEpst",
Modified: trunk/Master/tlpkg/tlpsrc/collection-pstricks.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-pstricks.tlpsrc 2018-02-04 21:38:49 UTC (rev 46543)
+++ trunk/Master/tlpkg/tlpsrc/collection-pstricks.tlpsrc 2018-02-04 21:39:47 UTC (rev 46544)
@@ -25,6 +25,7 @@
depend pst-bezier
depend pst-blur
depend pst-bspline
+depend pst-calculate
depend pst-calendar
depend pst-cie
depend pst-circ
Added: trunk/Master/tlpkg/tlpsrc/pst-calculate.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list