summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/ms
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-11-02 22:55:02 +0000
committerKarl Berry <karl@freefriends.org>2011-11-02 22:55:02 +0000
commit8f8142eeb6b103d466ca6e76c88c5474477e9b6a (patch)
tree3ef6037991338f3c2418ccd3eb35a9d474e7df4a /Master/texmf-dist/source/latex/ms
parenta5797bfe0d38a27b9e5a2cbf4f118eb09232fad0 (diff)
everysel (29oct11)
git-svn-id: svn://tug.org/texlive/trunk@24467 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/ms')
-rw-r--r--Master/texmf-dist/source/latex/ms/everysel.drv17
-rw-r--r--Master/texmf-dist/source/latex/ms/everysel.dtx83
2 files changed, 49 insertions, 51 deletions
diff --git a/Master/texmf-dist/source/latex/ms/everysel.drv b/Master/texmf-dist/source/latex/ms/everysel.drv
index 762c7127291..ffe715702d1 100644
--- a/Master/texmf-dist/source/latex/ms/everysel.drv
+++ b/Master/texmf-dist/source/latex/ms/everysel.drv
@@ -64,23 +64,6 @@
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
-%%
-%% ====================================================================
-%% @LaTeX-style-file{
-%% author = {Martin Schr\"oder},
-%% version = "1.1",
-%% date = "30 May 2009",
-%% filename = "everysel.sty",
-%% address = {Martin Schr\"oder
-%% Barmer Stra\"se 14
-%% 44137 Dortmund
-%% Germany},
-%% telephone = "+49-231-1206574",
-%% email = "martin@oneiros.de",
-%% docstring = "LaTeX package which provides hooks into
-%% \cs{selectfont}."
-%% }
-%% ====================================================================
\endinput
%%
%% End of file `everysel.drv'.
diff --git a/Master/texmf-dist/source/latex/ms/everysel.dtx b/Master/texmf-dist/source/latex/ms/everysel.dtx
index d5d72322484..7e415dfa40d 100644
--- a/Master/texmf-dist/source/latex/ms/everysel.dtx
+++ b/Master/texmf-dist/source/latex/ms/everysel.dtx
@@ -1,7 +1,7 @@
% \iffalse
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
%<package>\ProvidesPackage{everysel}
-%<package> [2009/05/30 v1.1 EverySelectfont Package (MS)]
+%<package> [2011/10/28 v1.2 EverySelectfont Package (MS)]
%
%<*driver>
\ProvidesFile{everysel.drv}
@@ -43,7 +43,7 @@
\end{document}
%</driver>
%
-% Copyright (C) 1996..2009 by Martin Schr\"oder.
+% Copyright (C) [1996..2011] by Martin Schr\"oder.
%
% 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
@@ -62,7 +62,7 @@
%
% \fi
%
-% \CheckSum{105}
+% \CheckSum{156}
%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -79,31 +79,9 @@
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
-%%
-% \iffalse meta-comment
-%% ====================================================================
-%% @LaTeX-style-file{
-%% author = {Martin Schr\"oder},
-%% version = "1.1",
-%% date = "30 May 2009",
-%% filename = "everysel.sty",
-%% address = {Martin Schr\"oder
-%% Barmer Stra\"se 14
-%% 44137 Dortmund
-%% Germany},
-%% telephone = "+49-231-1206574",
-%% email = "martin@oneiros.de",
-% codetable = "ISO/ASCII",
-% keywords = "LaTeX, NFSS",
-% supported = "yes",
-%% docstring = "LaTeX package which provides hooks into
-%% \cs{selectfont}."
-%% }
-%% ====================================================================
-%\fi
-%
-% \SVN $Rev: 1373 $
-% \SVNdate $Date: 2009-05-30 22:22:19 +0200 (Sa, 30. Mai 2009) $
+%
+% \SVN $Rev: 1712 $
+% \SVNdate $Date: 2011-10-28 23:10:13 +0200 (Fr, 28. Okt 2011) $
%
% \changes{v1.00}{1996-05-24}{New}
% \changes{v1.02}{1998-04-11}{Minor documentation enhancements}
@@ -134,8 +112,8 @@
% strictly speaking it should be \textsf{EverySelectfont}.}^^A
% }
% \author{Martin Schr\"oder\\[0.5ex]
-% \normalsize Barmer Stra\ss{}e 14\\
-% \normalsize 44137 Dortmund\\
+% \normalsize Unterstra\ss{}e 31\\
+% \normalsize 47051 Duisburg\\
% \normalsize Germany\\
% \normalsize \href{mailto:martin@oneiros.de}{\texttt{martin@oneiros.de}}}
% \maketitle
@@ -299,7 +277,9 @@
% Unfortunately for us there are \emph{two} versions of
% \cs{selectfont} in normal \LaTeX: One is defined in the kernel and
% the other by the package \package{tracefnt}\cite{package:tracefnt}.
-% So we have to check for two versions.
+% The \package{CJK} also redefines \cs{selectfont}.
+%
+% So we have to check for three versions.
% \begin{macro}{\@EverySelectfont@Init}
% We do this in the macro \cs{@EverySelectfont@Init}, which is
% executed just after \cs{begin\{document\}} (with the aid of
@@ -307,9 +287,10 @@
% \cs{selectfont} we have to overload.
% \begin{macrocode}
\newcommand*{\@EverySelectfont@Init}{%
+ \message{ABD: EverySelectfont initializing macros}%
% \end{macrocode}
-% We have to distinguish two cases: \package{tracefnt} and
-% no \package{tracefnt}.
+% We have to distinguish three cases: \package{tracefnt},
+% \package{CJK} and everything else.
% \begin{macrocode}
\@ifpackageloaded{tracefnt}{%
% \end{macrocode}
@@ -333,7 +314,27 @@
}%
}{%
% \end{macrocode}
-% Now the case without \package{tracefnt}.
+% The case with \package{CJK}
+% \changes{v1.2}{2011-10-27}{Check for \package{CJK}.}
+% \begin{macrocode}
+ \@ifpackageloaded{CJK}{%
+ \expandafter\CheckCommand\csname selectfont \endcsname{%
+ \ifx\f@linespread\baselinestretch \else
+ \set@fontsize\baselinestretch\f@size\f@baselineskip \fi
+ \xdef\font@name{%
+ \csname\curr@fontshape/\f@size\endcsname}%
+ \pickup@font
+ \font@name
+ \expandafter\ifx\csname CJK@\curr@fontshape\endcsname \relax
+ \else
+ \CJK@bold@false
+ \csname CJK@\curr@fontshape\endcsname
+ \fi
+ \size@update
+ \enc@update}%
+ }{%
+% \end{macrocode}
+% Now the default (no \package{tracefnt} and no \package{CJK}).
% \begin{macrocode}
\expandafter\CheckCommand\csname selectfont \endcsname{%
\ifx\f@linespread\baselinestretch \else
@@ -346,6 +347,7 @@
\enc@update
}%
}%
+ }%
% \end{macrocode}
% After the checks we can be sure we have the correct version of
% \cs{selectfont}, so we redefine it with our hooks.
@@ -377,6 +379,19 @@
\@font@info{Switching to \font@name}\fi}%
}{}%
% \end{macrocode}
+% The additions of \package{CJK} to \cs{selectfont} can be
+% implemented using \cs{EverySelectfont}.
+% \changes{v1.2}{2011-10-27}{Check for \package{CJK}.}
+% \begin{macrocode}
+ \@ifpackageloaded{CJK}{%
+ \EverySelectfont{%
+ \expandafter\ifx\csname CJK@\curr@fontshape\endcsname \relax
+ \else
+ \CJK@bold@false
+ \csname CJK@\curr@fontshape\endcsname
+ \fi}%
+ }{}%
+% \end{macrocode}
% Since \cs{@EverySelectfont@Init} should only be used once it is
% self-destructing.
% \begin{macrocode}