summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/fonttable/README5
-rw-r--r--Master/texmf-dist/doc/latex/fonttable/fonttable.pdfbin346033 -> 310132 bytes
-rw-r--r--Master/texmf-dist/source/latex/fonttable/fonttable.dtx106
-rw-r--r--Master/texmf-dist/tex/latex/fonttable/fonttable.sty48
4 files changed, 109 insertions, 50 deletions
diff --git a/Master/texmf-dist/doc/latex/fonttable/README b/Master/texmf-dist/doc/latex/fonttable/README
index c106070c4ea..8adbe85f393 100644
--- a/Master/texmf-dist/doc/latex/fonttable/README
+++ b/Master/texmf-dist/doc/latex/fonttable/README
@@ -11,7 +11,8 @@ testfont.tex.
------------------------------------------------------------------
Change History
-1.6 (2009/10/15)
+1.6b (2011/02/13) - Fix bug with Spanish babel
+1.6 (2009/10/15)
- New spacing behaviour of the decimal numbers, courtesy Peter Wilson
1.5d (2009/09/22) - Fix the bug for real, this time
@@ -38,7 +39,7 @@ Change History
Author: Peter Wilson (Herries Press)
Maintainer: Will Robertson (will dot robertson at latex-project dot org)
Copyright 2005--2009 Peter R. Wilson
- Copyright 2009 Will Robertson
+ Copyright 2009--2011 Will Robertson
This work may be distributed and/or modified under the
conditions of the Latex Project Public License, either
diff --git a/Master/texmf-dist/doc/latex/fonttable/fonttable.pdf b/Master/texmf-dist/doc/latex/fonttable/fonttable.pdf
index 659ddcec77c..c6a07cdfd2e 100644
--- a/Master/texmf-dist/doc/latex/fonttable/fonttable.pdf
+++ b/Master/texmf-dist/doc/latex/fonttable/fonttable.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/fonttable/fonttable.dtx b/Master/texmf-dist/source/latex/fonttable/fonttable.dtx
index 8c4b6018cde..735668fe291 100644
--- a/Master/texmf-dist/source/latex/fonttable/fonttable.dtx
+++ b/Master/texmf-dist/source/latex/fonttable/fonttable.dtx
@@ -5,6 +5,7 @@
% Author: Peter Wilson (Herries Press)
% Maintainer: Will Robertson (will dot robertson at latex-project dot org)
% Copyright 2005--2009 Peter R. Wilson
+% 2009--2011 Will Robertson
%
% This work may be distributed and/or modified under the
% conditions of the Latex Project Public License, either
@@ -16,6 +17,14 @@
%
% This work consists of the files listed in the README file.
%
+%<pack>\NeedsTeXFormat{LaTeX2e}
+%<pack>\ProvidesPackage{fonttable}
+%<*driver>
+\ProvidesFile{fonttable.dtx}
+%</driver>
+%<*driver|pack>
+ [2011/02/13 v1.6b displays a font]
+%</driver|pack>
%
%<*driver>
\documentclass[twoside]{ltxdoc}
@@ -54,7 +63,7 @@
%
% \fi
%
-% \CheckSum{911}
+% \CheckSum{945}
%
% \DoNotIndex{\',\.,\@M,\@@input,\@addtoreset,\@arabic,\@badmath}
% \DoNotIndex{\@centercr,\@cite}
@@ -107,19 +116,8 @@
% \changes{v1.51}{2009/05/14}{Eliminated a clash with babel package}
% \changes{v1.5b}{2009/09/02}{New maintainer (Will Robertson)}
% \changes{v1.6}{2009/10/15}{New spacing of the decimals from Peter Wilson}
+% \changes{v1.6b}{2011/02/13}{Fix bug with Spanish babel}
%
-% \def\fileversion{v1.0} \def\filedate{2005/11/27}
-% \def\fileversion{v1.0a} \def\filedate{2005/12/06}
-% \def\fileversion{v1.1} \def\filedate{2006/10/02}
-% \def\fileversion{v1.2} \def\filedate{2008/05/08}
-% \def\fileversion{v1.3} \def\filedate{2009/04/30}
-% \def\fileversion{v1.4} \def\filedate{2009/05/06}
-% \def\fileversion{v1.5} \def\filedate{2009/05/12}
-% \def\fileversion{v1.51} \def\filedate{2009/05/14}
-% \def\fileversion{v1.5b} \def\filedate{2009/09/02}
-% \def\fileversion{v1.5c} \def\filedate{2009/09/20}
-% \def\fileversion{v1.5d} \def\filedate{2009/09/22}
-% \def\fileversion{v1.6} \def\filedate{2009/10/15}
% \newcommand*{\Lpack}[1]{\textsf {#1}} ^^A typeset a package
% \newcommand*{\Lopt}[1]{\textsf {#1}} ^^A typeset an option
% \newcommand*{\file}[1]{\texttt {#1}} ^^A typeset a file
@@ -129,16 +127,15 @@
% \newcommand*{\AD}{\textsc{ad}}
% \newcommand*{\thisfont}{OandS}
%
-% \title{The \Lpack{fonttable} package\thanks{This
-% file has version number \fileversion, last revised
-% \filedate.}}
+% \GetFileInfo{fonttable.dtx}
+% \title{The \Lpack{fonttable} package}
%
% \author{%
% Author: Peter Wilson, Herries Press\\
% Maintainer: Will Robertson\\
% \texttt{will dot robertson at latex-project dot org}%
% }
-% \date{\filedate}
+% \date{\fileversion\qquad \filedate}
% \maketitle
% \begin{abstract}
% The package lets you typeset the characters in a font in tabular and/or
@@ -436,9 +433,6 @@
%
% \begin{macrocode}
%<*pack>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fonttable}[2009/10/15 v1.6 displays a font]
-
% \end{macrocode}
%
% \subsection{Table and texts}
@@ -501,27 +495,73 @@
% The original code for the macro was supplied by Enrico Gregorio.
% \changes{v1.4}{2009/05/06}{Added \cs{xfonttable}}
% \begin{macrocode}
-\newcommand*{\xfonttable}[4]{\bgroup
- \pikfont{#1}{#2}{#3}{#4}%
- \edef\f@tfontname{\fontname\font}\normalfont
- \f@tstartfont
- \ftable
- \egroup}
-
+\newcommand*{\xfonttable}[4]{%
+ \begingroup
+ \pikfont{#1}{#2}{#3}{#4}%
+ \edef\f@tfontname{\fontname\font}%
+% \end{macrocode}
+% New: strip any size information from the fontname (which could be, e.g.,
+% either `\verb*|cmr10|' or `\verb*|cmr10 at 10pt|'.)
+% This wasn't necessary before because we didn't explicitly choose the font
+% size; it was inferred automatically.
+% \begin{macrocode}
+ \edef\@tempa{\string a\string t}%
+ \edef\@tempb{\noexpand\in@{\@tempa}{\f@tfontname}}%
+ \@tempb
+ \ifin@
+ \edef\f@tfontname{\expandafter\f@tstripsize\f@tfontname}%
+ \fi
+% \end{macrocode}
+% End new code, and finish as before:
+% \begin{macrocode}
+ \normalfont
+ \f@tstartfont
+ \ftable
+ \endgroup
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\f@tstripsize}
+% Needed above.
+% \begin{macrocode}
+\edef\@tempa{%
+ \def\noexpand\f@tstripsize
+ ##1\string a\string t##2\string p\string t{##1}%
+}
+\@tempa
% \end{macrocode}
% \end{macro}
%
+%
% \begin{macro}{\f@tstartfont}
% Sets up for a font table.
% \begin{macrocode}
-\newcommand*{\f@tstartfont}{\font\f@ttestfont=\f@tfontname
+\newcommand*{\f@tstartfont}{%
+% \end{macrocode}
+% New: scale the font by 0.01\% to (attempt to) avoid TeX's font optimisation.
+% This becomes a problem in Spanish babel, say, when \verb|\textfont\fam|
+% changes when \verb|cmr10| has been loaded under a different name, here.
+% (And the \verb|\textfont| can no longer be parsed correctly. See:
+% \url{http://latex-alive.tumblr.com/post/3229118083/texs-font-loading-optimisation}
+% )
+% \begin{macrocode}
+ \@tempdima=\f@size pt
+ \font\f@ttestfont=\f@tfontname\space at 0.9999\@tempdima\relax
+% \end{macrocode}
+% Continue as before:
+% \begin{macrocode}
\f@ttestfont \f@tsetbaselineskip
- \ifdim\fontdimen6\f@ttestfont<10pt \rightskip=0pt plus 20pt
- \else\rightskip=0pt plus 2em \fi
+ \ifdim\fontdimen6\f@ttestfont<10pt\relax
+ \rightskip=0pt plus 20pt\relax
+ \else
+ \rightskip=0pt plus 2em\relax
+ \fi
\spaceskip=\fontdimen2\f@ttestfont % space between words (\raggedright)
- \xspaceskip=\fontdimen2\f@ttestfont \advance\xspaceskip
- by\fontdimen7\f@ttestfont}
-
+ \xspaceskip=\fontdimen2\f@ttestfont
+ \advance\xspaceskip by\fontdimen7\f@ttestfont
+}
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/tex/latex/fonttable/fonttable.sty b/Master/texmf-dist/tex/latex/fonttable/fonttable.sty
index e1e5cd8a85b..6c2ede06a20 100644
--- a/Master/texmf-dist/tex/latex/fonttable/fonttable.sty
+++ b/Master/texmf-dist/tex/latex/fonttable/fonttable.sty
@@ -21,8 +21,8 @@
%% This work consists of the files listed in the README file.
%% ------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{fonttable}[2009/10/15 v1.6 displays a font]
-
+\ProvidesPackage{fonttable}
+ [2011/02/13 v1.6b displays a font]
\providecommand*{\sevenrm}{\fontsize{7}{9pt}\rmfamily}
\newcount\f@tm \newcount\f@tn \newcount\f@tp \newdimen\f@tdim
@@ -36,21 +36,39 @@
\DeclareRobustCommand{\pikfont}[4]{%
\fontencoding{#1}\fontfamily{#2}\fontseries{#3}\fontshape{#4}\selectfont}
-\newcommand*{\xfonttable}[4]{\bgroup
- \pikfont{#1}{#2}{#3}{#4}%
- \edef\f@tfontname{\fontname\font}\normalfont
- \f@tstartfont
- \ftable
- \egroup}
-
-\newcommand*{\f@tstartfont}{\font\f@ttestfont=\f@tfontname
+\newcommand*{\xfonttable}[4]{%
+ \begingroup
+ \pikfont{#1}{#2}{#3}{#4}%
+ \edef\f@tfontname{\fontname\font}%
+ \edef\@tempa{\string a\string t}%
+ \edef\@tempb{\noexpand\in@{\@tempa}{\f@tfontname}}%
+ \@tempb
+ \ifin@
+ \edef\f@tfontname{\expandafter\f@tstripsize\f@tfontname}%
+ \fi
+ \normalfont
+ \f@tstartfont
+ \ftable
+ \endgroup
+}
+\edef\@tempa{%
+ \def\noexpand\f@tstripsize
+ ##1\string a\string t##2\string p\string t{##1}%
+}
+\@tempa
+\newcommand*{\f@tstartfont}{%
+ \@tempdima=\f@size pt
+ \font\f@ttestfont=\f@tfontname\space at 0.9999\@tempdima\relax
\f@ttestfont \f@tsetbaselineskip
- \ifdim\fontdimen6\f@ttestfont<10pt \rightskip=0pt plus 20pt
- \else\rightskip=0pt plus 2em \fi
+ \ifdim\fontdimen6\f@ttestfont<10pt\relax
+ \rightskip=0pt plus 20pt\relax
+ \else
+ \rightskip=0pt plus 2em\relax
+ \fi
\spaceskip=\fontdimen2\f@ttestfont % space between words (\raggedright)
- \xspaceskip=\fontdimen2\f@ttestfont \advance\xspaceskip
- by\fontdimen7\f@ttestfont}
-
+ \xspaceskip=\fontdimen2\f@ttestfont
+ \advance\xspaceskip by\fontdimen7\f@ttestfont
+}
\newcommand*{\f@tsetbaselineskip}{\setbox0=\hbox{\f@tn=0
\loop\char\f@tn \ifnum \f@tn<255 \advance\f@tn 1 \repeat}
\baselineskip=6pt \advance\baselineskip\ht0 \advance\baselineskip\dp0 }