diff options
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/generic/pdfmsym/README.md | 21 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pdfmsym/pdfmsym-doc.pdf | bin | 190599 -> 219777 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pdfmsym/pdfmsym-doc.tex | 170 |
3 files changed, 157 insertions, 34 deletions
diff --git a/Master/texmf-dist/doc/generic/pdfmsym/README.md b/Master/texmf-dist/doc/generic/pdfmsym/README.md index 5954add2ed1..f79a98d1cbd 100644 --- a/Master/texmf-dist/doc/generic/pdfmsym/README.md +++ b/Master/texmf-dist/doc/generic/pdfmsym/README.md @@ -1,10 +1,25 @@ # PDF Math Symbols - pdfMsym -## version 1.0.2 +## version 1.1.0 + The pdfMsym package provides mathematical symbols for PDF-dependent TeX compilers. -Read the documentation (documentation.pdf) for more details. +pdfMsym requires the font size in order to properly scale its symbols, so the following two lines must be added to your document in order to properly load it: + + \input pdfmsym + \pdfmsymsetscalefactor{10} + +assuming you want to load the package at a 10pt font, you can change the 10 to whatever suits your needs. +If you do not add the `\pdfmsymsetscalefactor` line, all of the macros which require pdf drawing won't work, as well as possibly some other macros. + +The pdfMsym package also provides a relatively easy-to-use interface for creating new symbols. +Read the documentation (pdfmsym-doc.pdf) for more details. + The pdfMsym package is provided under the MIT license. -Compile the documentation via `pdftex pdfsym-doc.tex`. +Compile the documentation via `pdftex pdfmsym-doc.tex`. The pdfMsym package was created and is maintained by Slurp who can be reached via email: slurper04@gmail.com Please report any bugs or issues with the package, doing so would be greatly appreciated. +Suggestions for features to add to the package will also be greatly appreciated. + +Thank you for using pdfMsym, + - Slurp diff --git a/Master/texmf-dist/doc/generic/pdfmsym/pdfmsym-doc.pdf b/Master/texmf-dist/doc/generic/pdfmsym/pdfmsym-doc.pdf Binary files differindex 6e0305bb561..bd2dab960b6 100644 --- a/Master/texmf-dist/doc/generic/pdfmsym/pdfmsym-doc.pdf +++ b/Master/texmf-dist/doc/generic/pdfmsym/pdfmsym-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pdfmsym/pdfmsym-doc.tex b/Master/texmf-dist/doc/generic/pdfmsym/pdfmsym-doc.tex index f7e84d1bb40..9c621958323 100644 --- a/Master/texmf-dist/doc/generic/pdfmsym/pdfmsym-doc.tex +++ b/Master/texmf-dist/doc/generic/pdfmsym/pdfmsym-doc.tex @@ -48,6 +48,7 @@ \catcode`\/=0% \catcode`\$=12% \catcode`\\=12% + \catcode`\#=12% \catcode`\%=12 \setbox1=\hbox\bgroup}} \def\endcode{% \egroup\egroup% @@ -98,15 +99,17 @@ }} \def\showcasevecc#1#2#3{\hbox to\hsize{\hss\vbox{\tabskip=5pt\openup3\jot% -\halign{\tt\hskip 1cm\string##\tabskip=0pt\hfil&\quad##\hfil&\quad\hfil##\tabskip=5pt\cr +\halign{\tt\hskip 1cm\string##\tabskip=0pt\hfil&&\quad##\hfil&\quad\hfil##\tabskip=5pt\cr \omit\tt\string#1: & \tt\string#1 & \tt\expandafter\string\csname short\m@strip#1\endcsname% \cr\noalign{\kern3pt\hrule\kern3pt} - \displaystyle & $\displaystyle #2$ & $\displaystyle #3$\cr - \textstyle & $\textstyle #2$ & $\textstyle #3$\cr - \scriptstyle & $\scriptstyle #2$ & $\scriptstyle #3$\cr - \scriptscriptstyle & $\scriptscriptstyle #2$ & $\scriptscriptstyle #3$\cr} + \displaystyle & $\displaystyle #1{#2}$ & $\displaystyle \csname short\m@strip#1\endcsname{#3}$ \cr + \textstyle & $\textstyle #1{#2}$ & $\textstyle \csname short\m@strip#1\endcsname{#3}$ \cr + \scriptstyle & $\scriptstyle #1{#2}$ & $\scriptstyle \csname short\m@strip#1\endcsname{#3}$ \cr + \scriptscriptstyle & $\scriptscriptstyle #1{#2}$ & $\scriptscriptstyle \csname short\m@strip#1\endcsname{#3}$ \cr} }\hss}\bigskip} +\def\showcaseveccs#1#2#3#4{\showcasevecc{#1}{#3}{#4}\showcasevecc{#2}{#3}{#4}} + \def\showcasearrow#1#2#3#4{\hbox to\hsize{\hss\vbox{\tabskip=0pt\openup3\jot \halign{\tt\hskip 1cm\string##\tabskip=0pt\hfil&\quad##\hfil&\quad\hfil##\hfil\quad&\quad\hfil##\tabskip=5pt\cr \omit\tt\string#1: & \tt\string#1 & \tt\expandafter\string\csname long\m@strip#1\endcsname & @@ -138,7 +141,7 @@ {\setbox0=\hbox{\fakebold{\pdfMsym}}\centerline{\hbox to8\wd0{\hfil\it version \pdfMsymversion}}} \centerline{\it S. Lurp} \centerline{\tt slurper04@gmail.com} -\centerline{\it December 15, 2022} +\centerline{\it December 21, 2022} \bigskip \hbox to \hsize{\hfil\vbox{\hsize=.7\hsize @@ -156,20 +159,20 @@ Unfortunately, some macros are not supported by \xetex. \hrule }\hfil} -\vfill\break +\vfill\eject \footline={\hfil\folio\hfil} \section{An Introduction to \scalebox[2]{\fakebold\pdfMsym}} The main motivator for creating \pdfMsym{} was \TeX's poor implementation of the \macroname\overrightarrow{} macro which many times yields unsavory results. -For example \icode \overrightarrow{\hbox{ABC}}/eicode{} yields: +For example \icode \overrightarrow{\rm ABC}/eicode{} yields: -$$ \overrightarrow{\hbox{ABC}} $$ +$$ \overrightarrow{\rm ABC} $$ As you can see, the arrow overlaps with the {\tt ABC} which is undesirable. -This can be fixed by altering the \macroname\rightarrow{} macro, but I decided to make a more versatile alternative. -The \pdfMsym{} alternative, \macroname\vecc{}, on the other hand yields: +This can be fixed by altering the \macroname\rightarrow{} macro, but I decided to make a more versatile alternative: +the \pdfMsym{} alternative \macroname\vecc{}: $$ \vecc{\hbox{ABC}} $$ @@ -195,11 +198,21 @@ This section will simply be an exhaustive list of all the predefined symbols \pd \subsection{Math Symbols} {\tabskip=10pt plus 5pt minus 5pt\openup3\jot\halign to \hsize{{\hsize=.45\hsize#}\hfil&\hfil{\hsize=.45\hsize#}\cr -\vbox{\showcase\dwedge{A\dwedge B}} & \vbox{\showcase\dcup{A\dcup B}}\cr -\vbox{\showcase\bigdwedge{A\dwedge\bigdwedge_{n=1}^N B_n}} & \vbox{\showcase\bigdcup{A\dcup\bigdcup_{n=1}^N B_n}}\cr -\noalign{\vfil\eject} +\vbox{\showcase\dwedge{A\dwedge B}} & \vbox{\showcase\bigdwedge{A\dwedge\bigdwedge_{n=1}^N B_n}}\cr +\vbox{\showcase\circwedge{A\circwedge B}} & \vbox{\showcase\bigcircwedge{A\circwedge\bigcircwedge_{k=1}^n A_k}}\cr +\noalign{\vfill\eject} +\vbox{\showcase\dcup{A\dcup B}} & \vbox{\showcase\bigdcup{A\dcup\bigdcup_{n=1}^N B_n}}\cr \vbox{\showcase\aint{f(x) + \aint_a^b g(x)\, dx}} & \vbox{\showcase\divs{n\divs m}}\cr -\vbox{\showcase\ndivs{n\ndivs m}} & \cr}} +\vbox{\showcase\ndivs{n\ndivs m}} & \vbox{\showcase\bigforall{P: \bigforall_{x\in X}Q(x)}}\cr +\vbox{\showcase\bigexists{P: \bigexists_{x\in X}Q(x)}} & \cr}} + +\bigskip +\pdfMsym{} also provides arbitrary length closed loop integrals via +\macrousage \oiNint{<N>} /emacrousage +which creates an $N$ dimensional closed loop integral. +Similarly \macroname\biNint{} creates a similar integral sign but rectangular instead of elliptical. + +\line{\hfil$\displaystyle{\textstyle\oiNint{3}_A^B}\quad\oiNint{3}_A^B\hfil\biNint{3}_{A}^{B}\quad{\textstyle\biNint{3}_A^B}$\hfil} Additionally, \macroname\lightning{} is provided as a textmode command and renders \lightning. @@ -209,16 +222,17 @@ Each vector comes as a pair: the normal form and the short form. The normal form is meant to cover longer material while the short form covers shorter material. \bigskip -\showcasevecc\vecc{\vecc{\hbox{ABC}}}{\shortvecc{a}} -\showcasevecc\lvecc{\lvecc{\hbox{ABC}}}{\shortlvecc{a}} -\showcasevecc\overrightharp{\overrightharp{\hbox{ABC}}}{\shortoverrightharp{a}} +\showcaseveccs\vecc\undervecc{\rm ABC}a +\showcasevecc\lvecc{\rm ABC}a +\showcasevecc\underlvecc{\rm ABC}a +\showcaseveccs\straightvecc\understraightvecc{\rm ABC}a \vfill\eject -\showcasevecc\overleftharp{\overleftharp{\hbox{ABC}}}{\shortoverleftharp{a}} -\showcasevecc\oveleftrrightvecc{\overleftrightvecc{\hbox{ABC}}}{\shortoverleftrightvecc{a}} -\showcasevecc\oveleftrrightharp{\overleftrightharp{\hbox{ABC}}}{\shortoverleftrightharp{a}} -\showcasevecc\overrightleftharp{\overrightleftharp{\hbox{ABC}}}{\shortoverrightleftharp{a}} -\showcasevecc\straightvecc{\straightvecc{\hbox{ABC}}}{\shortstraightvecc{a}} -\showcasevecc\straightlvecc{\straightlvecc{\hbox{ABC}}}{\shortstraightlvecc{a}} +\showcaseveccs\straightlvecc\understraightlvecc{\rm ABC}a +\showcaseveccs\overrightharp\underrightharp{\rm ABC}a +\showcaseveccs\overleftharp\underleftharp{\rm ABC}a +\showcaseveccs\overleftrightvecc\underleftrightvecc{\rm ABC}a +\showcaseveccs\overleftrightharp\underleftrightharp{\rm ABC}a +\showcaseveccs\overrightleftharp\underrightleftharp{\rm ABC}a \unless\ifx\pdfxform\undefined The \macroname\constvec{} macro has the following usage: @@ -241,7 +255,6 @@ And creates an extended arrow to fit both the top and bottom material. \showcasearrow\varrightharp{A\varrightharp B}{A\longvarrightharp B}{A\xvarrightharp{ABC}[abc] B} \showcasearrow\varleftharp{A\varleftharp B}{A\longvarleftharp B}{A\xvarleftharp{ABC}[abc] B} \showcasearrow\varleftrightarrow{A\varleftrightarrow B}{A\longvarleftrightarrow B}{A\xvarleftrightarrow{ABC}[abc] B} -\vfill\eject \showcasearrow\varleftrightharp{A\varleftrightharp B}{A\longvarleftrightharp B}{A\xvarleftrightharp{ABC}[abc] B} \showcasearrow\varrightleftharp{A\varrightleftharp B}{A\longvarrightleftharp B}{A\xvarrightleftharp{ABC}[abc] B} \showcasearrow\varmapsto{A\varmapsto B}{A\longvarmapsto B}{A\xvarmapsto{ABC}[abc] B} @@ -252,6 +265,22 @@ And creates an extended arrow to fit both the top and bottom material. \showcasearrow\varcirclerightarrow{A\varcirclerightarrow B}{A\longvarcirclerightarrow B}{A\xvarcirclerightarrow{ABC}[abc] B} \showcasearrow\varcircleleftarrow{A\varcircleleftarrow B}{A\longvarcircleleftarrow B}{A\xvarcircleleftarrow{ABC}[abc] B} +As well as single-stroke arrows, \pdfMsym{} provides double stroke arrows which are analogous to single stroke arrows and have +an identical usage. + +\bigskip +\showcasearrow\varRightarrow{A\varRightarrow B}{A\longvarRightarrow B}{A\xvarRightarrow{ABC}[abc] B} +\showcasearrow\varLeftarrow{A\varLeftarrow B}{A\longvarLeftarrow B}{A\xvarLeftarrow{ABC}[abc] B} +\showcasearrow\varCirclerightarrow{A\varCirclerightarrow B}{A\longvarCirclerightarrow B}{A\xvarCirclerightarrow{ABC}[abc] B} +\showcasearrow\varCircleleftarrow{A\varCircleleftarrow B}{A\longvarCircleleftarrow B}{A\xvarCircleleftarrow{ABC}[abc] B} +\showcasearrow\varSquarerightarrow{A\varSquarerightarrow B}{A\longvarSquarerightarrow B}{A\xvarSquarerightarrow{ABC}[abc] B} +\showcasearrow\varSquareleftarrow{A\varSquareleftarrow B}{A\longvarSquareleftarrow B}{A\xvarSquareleftarrow{ABC}[abc] B} +\showcasearrow\varRibbonrightarrow{A\varRibbonrightarrow B}{A\longvarRibbonrightarrow B}{A\xvarRibbonrightarrow{ABC}[abc] B} +\showcasearrow\varRibbonleftarrow{A\varRibbonleftarrow B}{A\longvarRibbonleftarrow B}{A\xvarRibbonleftarrow{ABC}[abc] B} +\showcasearrow\squaredarrow{A\squaredarrow B}{A\longsquaredarrow B}{A\xsquaredarrow{ABC}[abc] B} +\showcasearrow\roundedarrow{A\roundedarrow B}{A\longroundedarrow B}{A\xroundedarrow{ABC}[abc] B} + +\vfill\eject \subsection{Wide Accents} Wide accents provide variants to the commonly used accents like \macroname\widehat{} and \macroname\widetilde. Unlike these accents, \pdfMsym's wide accents can grow arbitrarily large. @@ -273,11 +302,13 @@ $$ \suum_{\hbox{abcdef}}^{\hbox{ABCDEF}} \qquad \prood_{\hbox{abcdef}}^{\hbox{AB These are not available in \xetex. \fi -\vfill\eject \section{Defining Your Own Symbols} -\pdfMsym{} provides an interface for creating your own mathematical symbols through the use of \macroname\pdfliteral s. -This interface requires prior knowledege of drawing with PDFs. +The following section outlines the interface which \pdfMsym{} utilizes to create its symbols. +Some of the macros require knowledge of {\scten pdf}'s native graphics operators, which is not explained here. +For resources on that, consult Adobe's {\scten pdf} Reference, chapter $4$ (Graphics). + +\subsection{The Macros} \macroexp{\@linehead@type{<pdf code>}{<width>}} This creates a ``linehead'' which is used to cap lines, like \macroname\@rarrow{} ($\@rarrow{.4}{2.5}$). @@ -293,8 +324,11 @@ For example, the definition of \macroname\@rarrow{} is: \def\@rarrow {\@linehead@type{0 0 m 2 0 l 1 0 0 1 0 1.5 c 2 0 m 1 0 0 -1 0 -1.5 c S}{2}} /endcode -The predefine lineheads are +The predefined lineheads are \icode \@rarrow, \@larrow, \@rharp, \@lharp, \@rdharp, \@rlharp, \@mapcap, \@rsarrow, \@lsarrow, \@backhook, \@fronthook, \@doublerarrow, \@doublelarrow, /hfil/break\@circlecap/eicode. +And the predefined double-stroked/wide lineheads are +\icode \@Rarrow, \@Larrow, \@Linecap, \@Rightcirclecap, \@Leftcirclecap, \@Rightsquarecap, \@Leftsquarecap, \@Rightribboncap, +/hfil/break\@Leftribboncap/eicode. \emacroexp \macroexp{\@vecc@def{<vector name>}<left cap><right cap>} This creates a vector macro, like \macroname\vecc. @@ -305,6 +339,14 @@ For example, the definition of the {\tt vecc} vectors is: /endcode \emacroexp +\macroexp{\@undervecc@def{<vector name>}<left cap><right cap>} This creates an under-vector macro, like \macroname\undervecc. +This creates both the normal and short variations of the vector. +For example, the definition of the {\tt undervecc} vectors is: +\begincode +\@undervecc@def{undervecc}\@linecap\@rarrow +/endcode +\emacroexp + \macroexp{\@arrow@def{<arrow name>}<left cap><right cap>} This creates an arrow macro, like \macroname\varrightarrow. This creates the normal, long, and extendable versions of the arrow. For example, the definition of the {\it varrightarrow} vectors is: @@ -313,6 +355,18 @@ For example, the definition of the {\it varrightarrow} vectors is: /endcode \emacroexp +\macroexp{\@Arrow@def{<arrow name>}<left cap><right cap><height displacement>} This creates a double-stroked arrow, like +\macroname\varRightarrow. +This macro creates the normal, long, and extendable versions of the arrow. +{\it height displacement} is half the difference in height between the two strokes (the difference of height between one stroke +and the center). +For the default double stroke linecaps \pdfMsym{} defines, this should be $1$. +For example, the definition of {\it varRightarrow} is: +\begincode +\@Arrow@def{varRightarrow}\@Linecap\@Rarrow{1} +/endcode +\emacroexp + \macroexp{\@wide@accent{<pdf code>}} This creates a wide accent, like \macroname\varwidecheck. The width of the drawing by the {\it pdf code} should be $1$, and it should be filled not stroked (since the accent is transformed to stretch over the material beneath it). @@ -323,7 +377,7 @@ For example, the definition of \macroname\varwidecheck{} is: /endcode \emacroexp -\macroexp{\pdf@drawing@macro{<name>}{<pdf code>}{<width>}{<height>}{<horizontal skew>}{<depth>}} This creates a text mode +\macroexp{\pdf@drawing@macro{<name>}{<pdf code>}{<width>}{<height>}{<depth>}{<horizontal skew>}} This creates a text mode symbol like \macroname\lightning. It is important that the {\it pdf code} fits inside the box created by {\it width, height,\/} and {\it depth} since the drawing is placed inside of an XForm and so anything outside the box will be cropped. @@ -338,7 +392,7 @@ For example, the definition of \macroname\lightning{} is: /endcode \emacroexp -\macroexp{\pdf@drawing@math@macro{<name>}{<pdf code>}{<width>}{<height>}{<skew>}{<depth>}<style scaling>} This creates a math +\macroexp{\pdf@drawing@math@macro{<name>}{<pdf code>}{<width>}{<height>}{<depth>}{<skew>}<style scaling>} This creates a math mode symbol like \macroname\divs. The first few parameters are identical in use as \macroname\pdf@drawing@macro's, and {\it style scaling} is used to set the scaling for the symbol in different math styles. @@ -378,6 +432,34 @@ Another example, this time the definition of \macroname\bigdcup{} is: /endcode \emacroexp +\macroexp{\@skewedlim@op{<operator>}{<sup1>}{<sub1>}{<sup2>}{<sub2>}{<sup3>}{<sub3>}{<default limit>}} +This creates a large math operator with skewed limits, like \macroname\int. +{\it operator} should be a math operator, {\it sup1} and {\it sub1} are the skews of the superscript and subscript of the +operator, respectively under \macroname\nolimits. +Similarly {\it sup2} and {\it sub2} are the skews for \macroname\limits, and {\it sup3} and {\it sub3} are the +skews for the default limit (if this is not followed by \macroname\limits{} or \macroname\nolimits) which is given by +{\it default limit}. + +For example, \macroname\@oiNint{} is defined to be a macro which creates the shape of \macroname\oiNint{} (see below), and +\macroname\oiNint{} is defined as +\begincode +\def\oiNint#1{\@skewedlim@op{\mathop{\@oiNint{#1}}}{-4}{6}{-10}{10}{-4}{6}\nolimits} +/endcode +\emacroexp + +\macroexp{\putexsym{<symbol>}<left cap><right cap>{<height displacement>}{<skew>}} This draws a double stroked drawing on top of +{\it symbol} whose caps are {\it left cap} and {\it right cap} with a height displacement (the half the space between strokes) of +{\it height displacement}. +{\it skew} alters the space between the end of {\it symbol} and where the double stroked drawing is drawn. +For example, \macroname\@oiNint, which gives the shape of \macroname\oiNint, is defined as +\begincode +\def\@oiNint#1{\putexsym{\iNint{#1}}\@BigLeftcirclecap\@BigRightcirclecap{2.5}{4}} +/endcode +\macroname\iNint{} is a macro +\macrousage \iNint{<N>} /emacrousage +which prints {\it N} integrals with a kern \macroname\iNint@kern@{} between each one. +\emacroexp + \unless\ifx\pdfxform\undefined \macroexp{\@wide@operator{<name>}<operator>{<first cut>}{<second cut>}} This creates an extendable operator of {\it operator} whose name is {\it name}, like \macroname\suum. @@ -397,4 +479,30 @@ $$ \@show@slices{suum} $$ These macros are not available for \xetex. \emacroexp \fi + +\subsection{The Dimensions} +For fine-tuning of symbols, it may be useful to familiarize oneself with the various dimensions \pdfMsym{} utilizes for various +purposes throught its symbol definitions. +Dimensions are all defined as macros, and are all dimensionless. +If a dimension is defined as $1$ then it corresponds to $1$ in $10$pt font. + +{\everycr{\noalign{\kern10pt}}\halign{\tt\vtop{\hsize=.2\hsize#}\hfil\tabskip=.05\hsize&\hfil\vtop{\hsize=.75\hsize#}\tabskip=0pt\cr +\string\@font@scale & The amount of scaling relative to $10$pt, this is defined via \macroname\pdfmsymsetscalefactor.\cr +\string\vecc@w & The height of the arrows, similarly there is \macroname\vecc@hw{} which must be equal to half of \macroname\vecc@w.\cr +\string\vecc@skew & \pdfMsym{} leaves a space of \macroname\vecc@skew{} between the ends of material and the endpoints of +the vector on top or below the material.\cr +\string\vecc@X@s\par\string\vecc@X@sf & \macroname\vecc@X@s{} is the ratio of the scaling factor (as a decimal) of the +$X$ math style ($X$ can be {\tt displaystyle}, {\tt textstyle}, etc.). +Similarly \macroname\vecc@X@sf{} should be numerically equivalent to \macroname\vecc@X@s{} but written as a fraction. +\pdfMsym{} scales (many, but not all, see \macroname\exsym@X@s{} and \macroname\exsym@X@sf) math macros according to these values.\cr +\string\vecc@skip & The amount of space between material and the vector symbol above or below it.\cr +\string\arrow@skip & The math kerning to be used around an arrow. +\macroname\arrow@skip{} must be defined as glue, eg \icode \mkern1mu/eicode.\cr +\string\xarrow@buffer & The amount of extra arrow to add between the caps of an extendable arrow and when the above/below material begins.\cr +\string\accent@skew & Analogous to \macroname\vecc@skew{} but for extendable accents.\cr +\string\accent@raise & Analogous to \macroname\vecc@skip{} but for extendable accents.\cr +\string\exsym@X@s\par\string\exsym@X@sf & Analogous to \macroname\vecc@X@s{} and \macroname\vecc@X@sf but used by \macroname\putexsym.\cr +\string\iNint@kern@ & The amount of kerning to put between integral signs in \macroname\iNint. +This must be given as glue, eg. \icode \mkern-10mu\mathchoice{\mkern-5mu}{}{}{}/eicode.\cr +}} \end |