summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/toptesi/topcoman.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-08-12 23:05:40 +0000
committerKarl Berry <karl@freefriends.org>2011-08-12 23:05:40 +0000
commit8a79b2a0b87e6b3ffa8d01fac1730ed74c3cd75b (patch)
treef8c0a7903886200a14470084f8eb3a209fb13628 /Master/texmf-dist/tex/latex/toptesi/topcoman.sty
parent7b90a8aacceb4fdb1bfd9d67a541880603099624 (diff)
toptesi (12aug11)
git-svn-id: svn://tug.org/texlive/trunk@23518 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/toptesi/topcoman.sty')
-rw-r--r--Master/texmf-dist/tex/latex/toptesi/topcoman.sty46
1 files changed, 27 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/toptesi/topcoman.sty b/Master/texmf-dist/tex/latex/toptesi/topcoman.sty
index 8ec87eacc84..2b5b26f325c 100644
--- a/Master/texmf-dist/tex/latex/toptesi/topcoman.sty
+++ b/Master/texmf-dist/tex/latex/toptesi/topcoman.sty
@@ -7,7 +7,7 @@
%% toptesi.dtx (with options: `topcmn')
%% ______________________________________________________
%% The TOPtesi package
-%% Copyright (C) 2010 Claudio Beccari
+%% Copyright (C) 2011 Claudio Beccari
%% All rights reserved
%%
%% License information appended
@@ -27,10 +27,11 @@
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
-
\NeedsTeXFormat{LaTeX2e} % lavora solo con LaTeX 2e
\ProvidesPackage{topcoman}%
- [2011/05/25 v.5.50 Additional commands for the TOPtesi bundle]
+ [2011/08/09 v.5.59 Additional commands for the TOPtesi bundle]
+\RequirePackage{ifxetex}
+\ifxetex\else
\newcommand*\DeclareSlantedCapitalGreekLetters{%
\mathchardef\Gamma="7100
\mathchardef\Delta="7101
@@ -43,25 +44,34 @@
\mathchardef\Phi="7108
\mathchardef\Psi="7109
\mathchardef\Omega="710A
-}
+}\fi
\providecommand{\ensuremath}[1]{\ifmmode#1\else$#1$\fi}%
-\providecommand{\ohm}{\ensuremath{{\mathrm{\Omega}}}}
-\providecommand{\ped}[1]{\ensuremath{_{\mathrm{#1}}}}
-\providecommand{\ap}[1]{\ensuremath{^{\mathrm{#1}}}}
+\providecommand{\textormath}{\ifmmode\expandafter\@secondoftwo\else
+ \expandafter\@firstoftwo\fi}
+\providecommand*\textsubscript{\raisebox{-0.5ex}}
+\ifxetex\else
+\RequirePackage{textcomp}
+\fi
+\providecommand{\ohm}{\textormath{\textohm}{\mathrm{\Omega}}}
+\providecommand{\ped}[1]{\textormath{\textsubscript{#1}}{_{\mathrm{#1}}}}
+\providecommand{\ap}[1]{\textormath{\textsuperscript{#1}}{^{\mathrm{#1}}}}
\providecommand{\unit}[1]{\ensuremath{{\mathrm{\,#1}}}}
\providecommand{\gei}{\ensuremath{{\mathop{\mathrm{j}}\nolimits}}}
\providecommand{\eu}{\ensuremath{{\mathop{\mathrm{e}}\nolimits}}}
-\providecommand{\micro}{\ensuremath{\ifx\muup\undefined\mu\else\muup\fi}}
-\providecommand{\gradi}{\ensuremath{^\circ}}
+\providecommand{\micro}{\textormath{\textmu}{\ifxetex\mathup{μ}\else
+ \ifx\muup\undefined\mu\else\muup\fi\fi}}
+\providecommand{\gradi}{\textormath{\textdegree}{^\circ}}
\def\listing#1{\par\begingroup
\programma \input #1 \endgroup}
\def\uncatcodespecials{\def\do##1{\catcode`##1=12}\dospecials}
-\def\programma{\footnotesize\tt \parindent 0pt
+\def\programma{\ttfamily\footnotesize \parindent 0pt
\def\par{\leavevmode\egroup\box0\endgraf}
\catcode`\`=\active \catcode`\^^I=\active \catcode`\^^L=\active
\obeylines \uncatcodespecials \obeyspaces
\everypar{\startbox}}
-\newdimen\tabwidth \setbox0=\hbox{\footnotesize\tt\space} \tabwidth=8\wd0
+\newdimen\tabwidth
+\setbox0=\hbox{\ttfamily\footnotesize\space}
+\tabwidth=8\wd0
\def\startbox{\setbox0=\hbox\bgroup}
{\obeyspaces\global\let =\ }
{\catcode`\`=\active \gdef`{\relax\lq}}
@@ -71,9 +81,7 @@
\multiply\dimen0 by\tabwidth
\advance\dimen0 by\tabwidth
\wd0=\dimen0 \box0 \startbox}}
-{\catcode`\^^L=\active \gdef^^L{\par\penalty-10000}}
-\mathcode`\,="013B
-\catcode`\^^Z=10
+{\catcode`\^^L=\active \global\let^^L\newpage}
\DeclareRobustCommand*{\simulatedSC}[1]{%
{\check@mathfonts\fontsize{\sf@size}{\f@baselineskip}\selectfont#1}}%
\def\ft@figure{\iflanguage{italian}{\MakeLowercase{\figurename}}%
@@ -98,10 +106,10 @@
%% and the derived files:
%%
%% toptesi.cls, toptesi.sty, topfront.sty, topcommand.sty,
-%% toptesi.cfg, and the English documentation toptesi.pdf;
+%% toptesi.cfg, and the English documentation toptesi.pdf.
%%
-%% Furthermore the bundle contains the documentation source file toptesi-doc.tex
-%% and the derived file toptesi-doc.pdf.
+%% Furthermore the bundle contains the documentation source file toptesi-doc-xetex.tex
+%% and the derived file toptesi-doc-xetex.pdf.
%%
%% The toptesi-example.tex source file is just an example that shows how
%% to use the various commands; by commenting or uncommenting certain
@@ -111,10 +119,10 @@
%% The toptesi.cfg file is a sample of a local configuration file that can be
%% freely edited and modified.
%%
-%% By running pdflatex on toptesi.dtx the user gets the cls, sty and cfg files
+%% By running pdflatex on toptesi.dtx the user gets the class, sty and cfg files
%% and the English documentation file in pdf format.
%%
-%% The documentation file toptesi-doc.pdf is in Italian; its source file is
+%% The documentation file toptesi-doc-xetex.pdf is in Italian; its source file is
%% another example of how to use toptesi.
%%
%% End of file `topcoman.sty'.