diff options
14 files changed, 437 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/fonts/sansmathaccent/README b/Master/texmf-dist/doc/fonts/sansmathaccent/README new file mode 100644 index 00000000000..7829ebfaa56 --- /dev/null +++ b/Master/texmf-dist/doc/fonts/sansmathaccent/README @@ -0,0 +1,14 @@ +Sans serif math (produced by the beamer class or the sfmath package) +often has accents positioned incorrectly. + +This package fixes the positioning of math accents when the default font +(cmssi) is used for sans serif math. + +It will have no effect if used in a document that does not use the +beamer class or the sfmath package. + +This package is released under the LaTeX Project Public License. See +http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for +the details of that license. + +For more information, see the documentation file sansmathaccent.pdf.
\ No newline at end of file diff --git a/Master/texmf-dist/doc/fonts/sansmathaccent/sansmathaccent.pdf b/Master/texmf-dist/doc/fonts/sansmathaccent/sansmathaccent.pdf Binary files differnew file mode 100644 index 00000000000..69952234a71 --- /dev/null +++ b/Master/texmf-dist/doc/fonts/sansmathaccent/sansmathaccent.pdf diff --git a/Master/texmf-dist/doc/fonts/sansmathaccent/sansmathaccent.tex b/Master/texmf-dist/doc/fonts/sansmathaccent/sansmathaccent.tex new file mode 100644 index 00000000000..ab89adaac32 --- /dev/null +++ b/Master/texmf-dist/doc/fonts/sansmathaccent/sansmathaccent.tex @@ -0,0 +1,301 @@ +% !TEX TS-program = pdflatex + +% sansmathaccent.tex +% +% Provides documentation for the sansmathaccent package +% +% author: Ariel Barton +% +% Copyright Ariel Barton, 2012 +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3 of this license or (at your option) any +% later version. +% The latest version of the license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of +% LaTeX version 2003/06/01 or later. +% +% This work has the LPPL maintenance status "author-maintained". +% +% The complete list of files considered part of this work is +% later in this file. +% +% Date: 2012/04/24 + +\documentclass{amsart} + +%\usepackage{pxfonts} +\usepackage{sfmath} +\usepackage{sansmathaccent} + +\usepackage{hyperref} +\def\sectionautorefname{Section} + +\DeclareMathAlphabet{\badmath}{OT1}{cmss}{m}{sl} + +\title{The \textsf{sansmathaccent} package} + +\author{Ariel Barton} + +\begin{document} + +\maketitle + +It is sometimes desirable to typeset math in sans serif. This is +particularly true when constructing slides, and so is done by default in +the \textsf{beamer} class. + +However, the Computer Modern sans serif fonts do not contain the +information TeX needs to position accents correctly. So math accents end +up placed badly: +$$ \tilde {\badmath{M}} \quad \dot {\badmath{u}} \quad +\hat {\badmath{T}} \quad \bar {\badmath{v}} \quad +\mathring {\badmath{A}}$$ + +The \textsf{sansmathaccent} package implements Hendrik Vogt's solution as +a \LaTeX\ package: +$$ \tilde M \quad \dot u \quad \hat T \quad \bar v \quad \mathring A$$ + +\section{Usage} + +This package was uploaded to CTAN in April 2012. If you have installed +or updated your \TeX\ distribution since then, this package might have +been installed on your system. + +If not, you will need to install it. Mik\TeX\ should do this +automatically if you try to typeset a document that uses the package. +Mac\TeX\ users can install and update CTAN packages using the program +``TeX Live Utility'' in the \texttt{/Applications/TeX} folder. \TeX\ +Live users can use the command-line utility \texttt{tlmgr} (see +\href{http://tug.org/texlive/doc/tlmgr.html} +{\texttt{http://tug.org/texlive/doc/tlmgr.html}}). + +If that does not work, consult one of the following web pages for advice +on how to install a fonts package by hand:\\ +\href{http://www.tug.org/fonts/fontinstall.html} +{\texttt{http://www.tug.org/fonts/fontinstall.html}}\\ +\href{http://www.tug.org/fonts/fontinstall-personal.html} +{\texttt{http://www.tug.org/fonts/fontinstall-personal.html}}\\ +\href{http://en.wikibooks.org/wiki/LaTeX/Packages/Installing_Extra_Packages} +{\texttt{http://en.wikibooks.org/wiki/LaTeX/Packages/Installing\_Extra\_Packages}} + +To correct the accents in a \textsf{beamer} document, +say \verb|\usepackage{sansmathaccent}|: + +\begin{quote} +\verb|\documentclass{beamer}|\\ +\verb|\usepackage{sansmathaccent}|\\ +\verb|\begin{document}|\\ +\verb|\begin{frame}{}|\\ +\verb|$\tilde M$ $\dot u$ $\hat T$|\\ +\verb|\end{frame}|\\ +\verb|\end{document}| +\end{quote} + +In an article, book, letter, or other document class other than +\textsf{beamer}, first use the \textsf{sfmath} package to switch to sans +serif math, then use \textsf{sansmathaccent} to correct the accents: + + +\begin{quote} +\verb|\documentclass{article}|\\ +\verb|\usepackage{sfmath}|\\ +\verb|\usepackage{sansmathaccent}|\\ +\verb|\begin{document}|\\ +\verb|$\tilde M$ $\dot u$ $\hat T$|\\ +\verb|\end{document}| +\end{quote} + +\section{Warnings} + +\textsf{sansmathaccent} is not a standalone package; it is a package to +correct a specific problem that appears in \textsf{beamer} and +\textsf{sfmath}. If neither of those packages is used, +\textsf{sansmathaccent} will do nothing. + +Observe also that \textsf{sansmathaccent} will only work with Computer +Modern sans serif math text; if you use a package such as +\textsf{helvet} or \textsf{pxfonts} to change the sans serif math font +away from the default, \textsf{sansmathaccent} will not help you. + +Feedback is appreciated and may be sent to \texttt{origamist@gmail.com}. + + +\section{License} + +This work (the \textsf{sansmathaccent} package) consists of the +following files: +\begin{itemize} +\item \texttt{sansmathaccent.map} +\item \texttt{sansmathaccent.pdf} +\item \texttt{sansmathaccent.sty} +\item \texttt{sansmathaccent.tex} +\item \texttt{mathkerncmssi8.tfm} +\item \texttt{mathkerncmssi9.tfm} +\item \texttt{mathkerncmssi10.tfm} +\item \texttt{mathkerncmssi12.tfm} +\item \texttt{mathkerncmssi17.tfm} +\item \texttt{ot1mathkerncmss.fd} +\end{itemize} + +This work may be distributed and/or modified under the +conditions of the \LaTeX\ Project Public License, either +version 1.3 of this license or (at your option) any +later version. + +The latest version of the license is in +\begin{quote} +\href {http://www.latex-project.org/lppl.txt} +{\texttt{http://www.latex-project.org/lppl.txt}} +\end{quote} +and version 1.3 or later is part of all distributions of +\LaTeX\ version 2003/06/01 or later. + +This work has the LPPL maintenance status ``author-maintained''. + +\subsection{Derived Works included in this package} + +The files +\begin{itemize} +\item \texttt{mathkerncmssi8.tfm} +\item \texttt{mathkerncmssi9.tfm} +\item \texttt{mathkerncmssi10.tfm} +\item \texttt{mathkerncmssi12.tfm} +\item \texttt{mathkerncmssi17.tfm} +\item \texttt{ot1mathkerncmss.fd} +\end{itemize} +were derived from the files +\begin{itemize} +\item \texttt{cmssi8.tfm} +\item \texttt{cmssi9.tfm} +\item \texttt{cmssi10.tfm} +\item \texttt{cmssi12.tfm} +\item \texttt{cmssi17.tfm} +\item \texttt{ot1cmss.fd} +\end{itemize} +all of which are part of the \LaTeX\ base distribution and can be found +at \href{ctan.org}{\texttt{ctan.org}}. + +The Font Description file \texttt{ot1mathkerncmss.fd} was edited (by +hand) to use the \texttt{mathkerncmssi} fonts rather than the +\texttt{cmssi} fonts. + +The edited \TeX\ Font Metric (\texttt{.tfm}) files were generated using +the utilities \texttt{tftopl} and \texttt{pltotf} and using Hendrik +Vogt's patch (included in the documentation as \autoref{sec:patch}). + +\section{Patch file}\label{sec:patch} + +The following is the patch file used to generate the corrected TFM +files. It is included for reference; you don't need to read this section +to use the package. The patch file was written by Hendrik Vogt and used +with permission. +\begin{quote} +\begin{verbatim} +17a18,61 +> (LABEL C E) +> (LABEL C H) +> (LABEL C M) +> (LABEL C N) +> (LABEL C Q) +> (LABEL C i) +> (LABEL C j) +> (KRN O 177 R 0.1) +> (STOP) +> (LABEL C J) +> (KRN O 177 R 0.22) +> (STOP) +> (LABEL C e) +> (LABEL C m) +> (LABEL C n) +> (LABEL C r) +> (LABEL C B) +> (LABEL C R) +> (LABEL C S) +> (LABEL C Z) +> (KRN O 177 R 0.08) +> (STOP) +> (LABEL C c) +> (LABEL C q) +> (LABEL C s) +> (LABEL C z) +> (KRN O 177 R 0.06) +> (STOP) +> (LABEL C v) +> (LABEL C x) +> (KRN O 177 R 0.04) +> (STOP) +> (LABEL C h) +> (KRN O 177 R 0.02) +> (STOP) +> (LABEL C l) +> (LABEL C U) +> (KRN O 177 R 0.11) +> (STOP) +> (LABEL C d) +> (LABEL C C) +> (LABEL C G) +> (KRN O 177 R 0.12) +> (STOP) +25a70 +> (KRN O 177 R 0.1) +61a107 +> (KRN O 177 R 0.04) +62a109 +> (KRN O 177 R 0.03) +68a116 +> (KRN O 177 R 0.08) +70a119 +> (KRN O 177 R 0.04) +77a127 +> (KRN O 177 R 0.1) +79a130 +> (KRN O 177 R 0.07) +86a138 +> (KRN O 177 R 0.08) +87a140 +> (KRN O 177 R 0.06) +93a147 +> (KRN O 177 R 0.09) +95a150 +> (KRN O 177 R 0.06) +103a159 +> (KRN O 177 R 0.08) +104a161 +> (KRN O 177 R 0.1) +111a169 +> (KRN O 177 R 0.05) +112a171 +> (KRN O 177 R 0.06) +120a180 +> (KRN O 177 R 0.08) +122a183 +> (KRN O 177 R 0.07) +124a186 +> (KRN O 177 R 0.08) +127a190 +> (KRN O 177 R 0.14) +134a198 +> (KRN O 177 R 0.05) +140a205 +> (KRN O 177 R 0.01) +143a209 +> (KRN O 177 R 0.1) +\end{verbatim} +\end{quote} +The above was saved as a file \texttt{sansmathaccent.patch}. Then the +following commands were executed: +\begin{quote} +\begin{verbatim} +for i in 8 9 10 12 17 +do tftopl $(kpsewhich cmssi$i.tfm) > mathkerncmssi$i.pl +patch mathkerncmssi$i.pl sansmathaccent.patch +pltotf mathkerncmssi$i.pl +done +\end{verbatim} +\end{quote} +This generated the desired TFM files. + +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/fonts/map/dvips/sansmathaccent/sansmathaccent.map b/Master/texmf-dist/fonts/map/dvips/sansmathaccent/sansmathaccent.map new file mode 100644 index 00000000000..89b0159cc16 --- /dev/null +++ b/Master/texmf-dist/fonts/map/dvips/sansmathaccent/sansmathaccent.map @@ -0,0 +1,5 @@ +mathkerncmssi8 CMSSI8 <cmssi8.pfb +mathkerncmssi9 CMSSI9 <cmssi9.pfb +mathkerncmssi10 CMSSI10 <cmssi10.pfb +mathkerncmssi12 CMSSI12 <cmssi12.pfb +mathkerncmssi17 CMSSI17 <cmssi17.pfb diff --git a/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi10.tfm b/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi10.tfm Binary files differnew file mode 100644 index 00000000000..0f650a9be0a --- /dev/null +++ b/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi10.tfm diff --git a/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi12.tfm b/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi12.tfm Binary files differnew file mode 100644 index 00000000000..05763d27262 --- /dev/null +++ b/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi12.tfm diff --git a/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi17.tfm b/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi17.tfm Binary files differnew file mode 100644 index 00000000000..8883b54c270 --- /dev/null +++ b/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi17.tfm diff --git a/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi8.tfm b/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi8.tfm Binary files differnew file mode 100644 index 00000000000..da9ce6beb82 --- /dev/null +++ b/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi8.tfm diff --git a/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi9.tfm b/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi9.tfm Binary files differnew file mode 100644 index 00000000000..390f72917e2 --- /dev/null +++ b/Master/texmf-dist/fonts/tfm/public/sansmathaccent/mathkerncmssi9.tfm diff --git a/Master/texmf-dist/tex/latex/sansmathaccent/ot1mathkerncmss.fd b/Master/texmf-dist/tex/latex/sansmathaccent/ot1mathkerncmss.fd new file mode 100644 index 00000000000..deb242a3fb7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/sansmathaccent/ot1mathkerncmss.fd @@ -0,0 +1,64 @@ +%% +%% This is file `ot1mathkerncmss.fd', +%% based on the file `ot1cmss.fd' +%% which is part of the LaTeX base distribution. +%% +%% It has been edited by replacing the family name `cmss' by `mathkerncmss' +%% and by replacing some of the fonts `cmssi<size>' by `mathkerncmssi<size>' +%% +%% This file is part of the sansmathaccent package. +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +\ProvidesFile{ot1mathkerncmss.fd} + [2012/04/26] +\DeclareFontFamily{OT1}{mathkerncmss}{\skewchar\font127 } +\DeclareFontShape{OT1}{mathkerncmss}{m}{n} + {% + <5><6><7><8>cmss8% + <9>cmss9% + <10><10.95>cmss10% + <12><14.4>cmss12% + <17.28><20.74><24.88>cmss17% + }{} +% Font undefined, therefore substituted +\DeclareFontShape{OT1}{mathkerncmss}{m}{it} + {<->sub*mathkerncmss/m/sl}{} +\DeclareFontShape{OT1}{mathkerncmss}{m}{sl} + {% + <5><6><7><8>mathkerncmssi8<9>mathkerncmssi9% + <10><10.95>mathkerncmssi10% + <12><14.4>mathkerncmssi12% + <17.28><20.74><24.88>mathkerncmssi17% + }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{OT1}{mathkerncmss}{m}{sc} + {<->sub*cmr/m/sc}{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{OT1}{mathkerncmss}{m}{ui} + {<->sub*cmr/m/ui}{} +%%%%%%%% semibold condensed series +\DeclareFontShape{OT1}{mathkerncmss}{sbc}{n} + {% + <5><6><7><8><9>cmssdc10% + <10><10.95><12><14.4><17.28><20.74><24.88>cmssdc10% + }{} + +%%%%%%%%% bold extended series +\DeclareFontShape{OT1}{mathkerncmss}{bx}{n} + {% + <5><6><7><8><9>cmssbx10% + <10><10.95><12><14.4><17.28><20.74><24.88>cmssbx10% + }{} +%%%%%%% Font/shape undefined, therefore substituted +\DeclareFontShape{OT1}{mathkerncmss}{bx}{ui} + {<->sub*cmr/bx/ui}{} +\endinput +%% +%% End of file `ot1mathkerncmss.fd'. diff --git a/Master/texmf-dist/tex/latex/sansmathaccent/sansmathaccent.sty b/Master/texmf-dist/tex/latex/sansmathaccent/sansmathaccent.sty new file mode 100644 index 00000000000..c0e8ff60909 --- /dev/null +++ b/Master/texmf-dist/tex/latex/sansmathaccent/sansmathaccent.sty @@ -0,0 +1,50 @@ +% sansmathaccent.sty +% +% Fixes a problem with accent placement in beamer and sfmath +% +% author: Ariel Barton +% +% Copyright Ariel Barton, 2012 +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3 of this license or (at your option) any +% later version. +% The latest version of the license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of +% LaTeX version 2003/06/01 or later. +% +% This work has the LPPL maintenance status "author-maintained". +% +% The complete list of files considered part of this work is in +% the file `sansmathaccent.pdf' and its source code `sansmathaccent.tex'. +% +\ProvidesPackage{sansmathaccent}[2012/04/26] + +\def\sansmathaccent@warning{sansmathaccent is not a standalone package; it should be used with beamer or sfmath.} + +% Check to see if we are a Beamer document +\@ifpackageloaded{beamerbasefont}{% + \def\sansmathaccent@warning{} + \AtBeginDocument{ + \def\sansmathaccent@cmss{cmss} + \ifx\beamer@fmdef\sansmathaccent@cmss % Check to see if we are using cmss for math + \DeclareSymbolFont{pureletters}{OT1}{mathkerncmss}{m}{sl} + \fi +} +}{} + +% Check to see if we are a sfmath document +\@ifpackageloaded{sfmath}{% + \def\sansmathaccent@warning{} + \edef\tmp@sfdefault{\math@sfdefault} + \def\tmp@compare{cmss} + \ifx\tmp@sfdefault\tmp@compare % Check to see if we are using cmss for math + \DeclareSymbolFont{SFMath}{OT1}{mathkerncmss}{m}{sl} + \SetSymbolFont{SFMath}{normal}{OT1}{mathkerncmss}{m}{sl} + \fi +}{} + + +\ifx \sansmathaccent@warning\empty \else \typeout{\sansmathaccent@warning} \fi
\ No newline at end of file diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 0a492fbcb49..1005f74db23 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -349,7 +349,7 @@ my @TLP_working = qw( rotating rotfloat rotpages roundbox rsc rsfs rsfso rtkinenc rtklage russ rviewport rvwrite ryethesis - sageep sansmath sapthesis sasnrdisplay sauerj sauterfonts + sageep sansmath sansmathaccent sapthesis sasnrdisplay sauerj sauterfonts savefnmark savesym savetrees scale scalebar schemabloc schwalbe-chess sciposter screenplay sdrt diff --git a/Master/tlpkg/tlpsrc/collection-fontsextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-fontsextra.tlpsrc index f5e5c15aebf..67fbd5ebf52 100644 --- a/Master/tlpkg/tlpsrc/collection-fontsextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-fontsextra.tlpsrc @@ -148,6 +148,7 @@ depend punknova depend recycle depend romande depend rsfso +depend sansmathaccent depend sauter depend sauterfonts depend semaphor diff --git a/Master/tlpkg/tlpsrc/sansmathaccent.tlpsrc b/Master/tlpkg/tlpsrc/sansmathaccent.tlpsrc new file mode 100644 index 00000000000..3b5c1a4ed9f --- /dev/null +++ b/Master/tlpkg/tlpsrc/sansmathaccent.tlpsrc @@ -0,0 +1 @@ +execute addMap sansmathaccent.map |