texlive[59038] Master/texmf-dist: pm-isomath (1may21)
commits+karl at tug.org
commits+karl at tug.org
Sat May 1 22:16:31 CEST 2021
Revision: 59038
http://tug.org/svn/texlive?view=revision&revision=59038
Author: karl
Date: 2021-05-01 22:16:31 +0200 (Sat, 01 May 2021)
Log Message:
-----------
pm-isomath (1may21)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/pm-isomath/README.txt
trunk/Master/texmf-dist/doc/latex/pm-isomath/pm-isomath.pdf
trunk/Master/texmf-dist/source/latex/pm-isomath/pm-isomath.dtx
trunk/Master/texmf-dist/tex/latex/pm-isomath/pm-isomath.sty
Modified: trunk/Master/texmf-dist/doc/latex/pm-isomath/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pm-isomath/README.txt 2021-05-01 20:16:12 UTC (rev 59037)
+++ trunk/Master/texmf-dist/doc/latex/pm-isomath/README.txt 2021-05-01 20:16:31 UTC (rev 59038)
@@ -1,6 +1,4 @@
-\ProvidesFile{README.txt}[%
- 2020/11/06 v.1.0.07
- README file for pm-isomath.sty]
+ README.txt file for pm-isomath.sty 2021/05/01 v.1.1.00
Distributable under the LaTeX Project Public License,
@@ -10,6 +8,6 @@
This work is "maintained"
This work consists of this file pm-isomath.dtx, a README.txt file
- and the derived files:
+ and the derived files:
pm-isomath.sty, pm-isomath.pdf.
Modified: trunk/Master/texmf-dist/doc/latex/pm-isomath/pm-isomath.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/pm-isomath/pm-isomath.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pm-isomath/pm-isomath.dtx 2021-05-01 20:16:12 UTC (rev 59037)
+++ trunk/Master/texmf-dist/source/latex/pm-isomath/pm-isomath.dtx 2021-05-01 20:16:31 UTC (rev 59038)
@@ -57,7 +57,7 @@
%<style>\ProvidesPackage{pm-isomath}[%
%<txt>\ProvidesFile{README.txt}[%
%<*driver,style,txt>
- 2020/11/06 v.1.0.07
+ 2021/05/01 v.1.1.00
%<txt> README file for pm-isomath.sty]
%<style>Poor man package for typesetting ISO compliant math when using pdfLaTeX]
%</driver,style,txt>
@@ -103,7 +103,7 @@
%</driver>
% \fi
%
-% \CheckSum{436}%
+% \CheckSum{459}%
% \begin{abstract}
% The ISO regulations for typesetting math in the field of physics
% and technology are pretty stringent and imply legal questions
@@ -651,6 +651,30 @@
%\end{tabular}\end{lrbox}
%\noindent\resizebox{\textwidth}{!}{\usebox{0}}\egroup
%
+% \subparagraph{ISO upright partial differential}
+% Among the fonts used to typeset math when using \prog{pdflatex},
+% only the LibertinusT1math font contains the upright partial
+% differential symbol that conforms the ISO regulations. All other
+% fonts at the moment available to typeset mathematics do not
+% contain an upright symbol, but they contain the original slanted
+% symbol as used with the CM fonts. With a poor-man trick it is
+% possible ti have available an upright symbol so as to describe
+% the Electrical field as the opposite of the electric potential
+% gradient. Compare the following formulas, where the second one
+% is ISO compliant:
+%\begin{align}
+%E =-\nabla V = -\left(
+%\frac{\partial V}{\partial x}\MathLatin{e}[b](it)_x +
+%\frac{\partial V}{\partial y}\MathLatin{e}[b](it)_y +
+%\frac{\partial V}{\partial z}\MathLatin{e}[b](it)_z +
+%\right)\\[\baselineskip]
+%E =-\nabla V = -\left(
+%\frac{\uppartial V}{\uppartial x}\MathLatin{e}[b](it)_x +
+%\frac{\uppartial V}{\uppartial y}\MathLatin{e}[b](it)_y +
+%\frac{\uppartial V}{\uppartial z}\MathLatin{e}[b](it)_z +
+%\right)\\[\baselineskip]
+%\end{align}
+%
%\section{Final remarks}
% This package |pm-isomath| is far from perfect, and its results are
% questionable; of course poor man solutions are just patches;
@@ -665,6 +689,7 @@
% by Günter Milde, but tackles the problem of insufficient maximum
% number of math font groups so as to avoid any problem with such
% group limitation, and therefore all the caveats in Milde's package.
+%
% That package is much more comfortable to use than this one; but
% it is subject to a number of conditions that, depending on the
% user environment, may even result in a complete failure. This
@@ -694,11 +719,11 @@
%\iffalse
%<*style>
%\fi
-% \begin{macrocode}
% Then we verify if the document is being typeset with \pdfLaTeX;
% if it is not, an error flag is raised and reading of this
% package is immediately interrupted. For this purpose we need
% an engine-detecting package, and we generally use the |iftex| one.
+% \begin{macrocode}
\@ifpackageloaded{iftex}{}{\RequirePackage{iftex}}
\unless\ifPDFTeX
\PackageError{pm-isomath}{%
@@ -705,7 +730,7 @@
******************************************\MessageBreak
This package should be used only when \MessageBreak
typesetting with pdfLaTeX. \MessageBreak
- Skipping loading the package \MessageBreak
+ Loading this package is skipped \MessageBreak
******************************************\MessageBreak
}{%
******************************************\MessageBreak
@@ -728,12 +753,13 @@
% option is for deciding if the imaginary unit should be
% defined as ‘i’ or ‘j’. As we have remarked in the previous
% documentation, engineers, especially those who deal with
-% electricity and electrical quantities, but also electronics, control
+% electricity and electrical quantities, but also electronics, control,
% and telecommunications engineers, use ‘j’; all these
% varieties of engineers could not do anything in their profession
% if they don't use complex numbers and quantities (the latter
% called phasors). Possibly they are the applied scientists
-% who use complex numbers more than any other scientist.
+% who use complex numbers more often than any other scientist.
+%
% Note: this option has \emph{not} been used to prepare this
% very document.
% \begin{macrocode}
@@ -741,12 +767,26 @@
\DeclareOption{engineer}{\engineertrue}
\ProcessOptions*\relax
% \end{macrocode}
-% Are the necessary packages already loaded?
+% Are the necessary packages already loaded? Notice that in previous
+% versions we just loaded |xparse| unless it was already loaded;
+% since 2020 the main functionalities of this package are already
+% contained into the \LaTeX\ kernel, But we are going to use one
+% of those “deprecated” functionalities that did not make their way
+% to the \LaTeX\ kernel. We also use the |xfp| floating point
+% computations available with the \LaTeX3 language.
% \begin{macrocode}
\@ifpackageloaded{amsmath}{}{\RequirePackage{amsmath}}
\@ifpackageloaded{etoolbox}{}{\RequirePackage{etoolbox}}
-\@ifpackageloaded{xparse}{}{\RequirePackage{xparse}}
+\RequirePackage{xparse,xfp}
% \end{macrocode}
+%
+% Since a trick on the ISO compliant upright partial differential
+% symbol requires the functionalities of the |rotate| and |scale|
+% functionalities, we load also the |graphicx| package if it has not
+% been already loaded.
+% \begin{macrocode}
+\@ifpackageloaded{graphicx}{}{\RequirePackage{graphicx}}
+% \end{macrocode}
% Now we have almost all software instruments available. We
% define a macro to switch the definitions of certain math
% Greek symbols; some of these are defined in the \LaTeX\
@@ -860,7 +900,7 @@
% commands are constructed in such a way as to have a default
% family, series and shape common to both Latin and Greek fonts;
% therefore with three optional arguments that the user can
-% specify with different delimiters but respecting their order,
+% specify with different delimiters, but respecting their order,
% the user can get eight different choice combinations that
% allow the selection of a large number of different looks.
%
@@ -869,9 +909,9 @@
% mostly differ in the encoding choice for Latin or Greek letters.
%
% The user macros are defined by means of the defining commands
-% provided by the |xparse| package, while the service macros use
-% normal \LaTeX\ commands. The user commands follow this special
-% syntax:
+% provided by the |xparse| package functionalities, while the service
+% macros use normal \LaTeX\ commands. The user commands follow this
+% special syntax:
%\begin{ttsintassi}
%\cs{MathLatin}\marg{Latin letter}\marg{family}\oarg{series}\parg{shape}
%\cs{MathGreek}\marg{Greek letter}\marg{family}\oarg{series}\parg{shape}
@@ -968,9 +1008,9 @@
\csname M at OT1\endcsname{9}}
% \end{macrocode}
% Imitating the |ISOmath| package we define also the macros
-% for selecting the bold italics (produces results similar
-% to those obtained with package |bm|, but it does not require
-% any math group), and sans serif in both normal and bold
+% for selecting the bold italics math fonts (with results similar
+% to those obtained with package |bm|,without requiring
+% any math group), and sans serif in both normal and bold
% slanted shape.
% \begin{macrocode}
\AtBeginDocument{%
@@ -1030,6 +1070,34 @@
% the thin space |\,| is absolute and does not change depending
% on the preceding math atom.
%
+% The ISO regulations require that any letter-like symbol that
+% does not refer to a measurable quantity be set in upright shape;
+% we already applied the regulation to the regular differential
+% symbol, that may appear in both the derivative fractions and
+% in the differential integrators. With partial derivatives the
+% default symbol is slanted since the very beginning of \TeX, when the
+% OMS Computer Modern Symbol font was defined; according to the
+% ISO regulations such symbol should be upright. For use with
+% \pdfLaTeX the only font distributed with any \TeX system that
+% contains such an upright symbol is the LibertinusT1math one;
+% all other OMS encoded fonts do no contain it. The defined
+% command |\uppartial| name is identical to the one used by the
+% LibertinusT1math font; therefore it is easy to check if this
+% symbol has already been defined
+%
+% On \texttt{tex.stachexchange.com} some questions were asked on
+% how to produce a suitable upright partial differential symbol,
+% when fonts did not have one available. The solutions we found
+% there are based on rotating and scaling the available slanted
+% partial differential symbol. We follow a similar approach,
+% although a shearing process would be a better solution;
+% we avoid to redefine this symbol if it is already available.
+% The default counterclockwise rotation is fixed to 22°, but may
+% be changed by means of an optional argument. Of course this
+% solution is a patch; we tested it at several sizes but only
+% with the Latin Modern Type~1 fonts. May be with other fonts
+% the results might need some adjustments.
+%
% The command |\unit| for appending the units of measure to
% the numerical value of the measure is added if no packages
% have already defined it; package |siunitx| is a particularly
@@ -1068,6 +1136,15 @@
\providecommand*\diff{}
\renewcommand*\diff{\ensuremath{\mathop{}\!\MathLatin{d}(n)}}
%
+\newbox{\PMpartial}
+\AtBeginDocument{%
+\@ifdefinable{\uppartial}%
+ {\NewDocumentCommand\uppartial{O{22}}{\setbox\PMpartial\hbox{$\partial$}%
+ \setbox\PMpartial=\hbox{%
+ \scalebox{1}[\fpeval{cosd #1}]{\rotatebox[origin=br]{#1}{\box\PMpartial}}%
+ }\raisebox{0.35ex}{\box\PMpartial}\mkern-1.25mu}}%
+}
+%
\providecommand*\micro{}
\AtBeginDocument{\@ifpackageloaded{textcomp}%
{\renewcommand*\micro{\textormath{\textmu}{\ISOmu(rs)}}}%
Modified: trunk/Master/texmf-dist/tex/latex/pm-isomath/pm-isomath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pm-isomath/pm-isomath.sty 2021-05-01 20:16:12 UTC (rev 59037)
+++ trunk/Master/texmf-dist/tex/latex/pm-isomath/pm-isomath.sty 2021-05-01 20:16:31 UTC (rev 59038)
@@ -14,7 +14,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2017/01/01]
\ProvidesPackage{pm-isomath}[%
- 2020/11/06 v.1.0.07
+ 2021/05/01 v.1.1.00
Poor man package for typesetting ISO compliant math when using pdfLaTeX]
@@ -24,7 +24,7 @@
******************************************\MessageBreak
This package should be used only when \MessageBreak
typesetting with pdfLaTeX. \MessageBreak
- Skipping loading the package \MessageBreak
+ Loading this package is skipped \MessageBreak
******************************************\MessageBreak
}{%
******************************************\MessageBreak
@@ -47,7 +47,8 @@
\ProcessOptions*\relax
\@ifpackageloaded{amsmath}{}{\RequirePackage{amsmath}}
\@ifpackageloaded{etoolbox}{}{\RequirePackage{etoolbox}}
-\@ifpackageloaded{xparse}{}{\RequirePackage{xparse}}
+\RequirePackage{xparse,xfp}
+\@ifpackageloaded{graphicx}{}{\RequirePackage{graphicx}}
\newcommand\switchvarsymbols[1]{%
\letcs{\tempA}{#1}\csletcs{#1}{var#1}\cslet{var#1}{\tempA}}
%%%%
@@ -159,6 +160,14 @@
\renewcommand\uppi{\ISOpi(n)}
\providecommand*\diff{}
\renewcommand*\diff{\ensuremath{\mathop{}\!\MathLatin{d}(n)}}
+\newbox{\PMpartial}
+\AtBeginDocument{%
+\@ifdefinable{\uppartial}%
+ {\NewDocumentCommand\uppartial{O{22}}{\setbox\PMpartial\hbox{$\partial$}%
+ \setbox\PMpartial=\hbox{%
+ \scalebox{1}[\fpeval{cosd #1}]{\rotatebox[origin=br]{#1}{\box\PMpartial}}%
+ }\raisebox{0.35ex}{\box\PMpartial}\mkern-1.25mu}}%
+}
\providecommand*\micro{}
\AtBeginDocument{\@ifpackageloaded{textcomp}%
{\renewcommand*\micro{\textormath{\textmu}{\ISOmu(rs)}}}%
More information about the tex-live-commits
mailing list.