summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/faq.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/faq.sty')
-rw-r--r--Master/texmf-dist/doc/generic/FAQ-en/faq.sty60
1 files changed, 52 insertions, 8 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/faq.sty b/Master/texmf-dist/doc/generic/FAQ-en/faq.sty
index 8e8e47fb805..838abce5e10 100644
--- a/Master/texmf-dist/doc/generic/FAQ-en/faq.sty
+++ b/Master/texmf-dist/doc/generic/FAQ-en/faq.sty
@@ -1,4 +1,7 @@
-% This is a LaTeX2e package for the UKTUG FAQ document.
+% $Id: faq.sty,v 1.124 2010/08/07 11:23:14 rf10 Exp rf10 $
+%
+% This is the LaTeX package that deals with the eccentricities of mark
+% up of the UK TeX FAQ.
%
% uses production LaTeX 2e commands
\NeedsTeXFormat{LaTeX2e}[1994/06/01]% at least!
@@ -24,15 +27,23 @@
\InputIfFileExists{faqfont.cfg}% must set \ifboldmathavail if necessary
{\typeout{FAQ -- loading font configuration file faqfont.cfg}}
{%
+ \RequirePackage[T1]{fontenc}%
\RequirePackage{lmodern}% for sans fonts
\RequirePackage{mathptmx}
- \RequirePackage[T1]{fontenc}%
\RequirePackage{textcomp}%
+ \AtBeginDocument{%
+ \let\save@textcurrency\textcurrency
+ \def\textcurrency{%
+ {%
+ \fontfamily{lmr}\selectfont
+ \save@textcurrency
+ }%
+ }%
+ }
\boldmathavailfalse
\IfFileExists{luximono.sty}%
{\RequirePackage[scaled=0.85]{luximono}}% not using cmtt-alike
{\RequirePackage{sub-luximono}}% load whatever
- \RequirePackage{textcomp}%
\DeclareRobustCommand{\$}{\char`\$}% otherwise tries to load tctt....
\@ifundefined{Dings}{\RequirePackage{pifont}%
\def\Dings{\nopagebreak{\footnotesize
@@ -191,10 +202,14 @@
\ifpdf
\let\narrowonly\@gobble
\let\wideonly\@firstofone
+ \let\hyperflat\@firstoftwo
\else
\let\narrowonly\@firstofone
\let\wideonly\@gobble
+ \let\hyperflat\@secondoftwo
\fi
+\let\hyperonly\wideonly
+\let\flatonly\narrowonly
%
% the little bit(s) of code that's(re) going to be ignored when the
% html is generated are enclosed by the following two commands
@@ -214,6 +229,9 @@
\providecommand\texshop{\ProgName{TeXshop}}
\providecommand\texworks{\ProgName{TeXworks}}
\providecommand\xetex{XeTeX}
+\newcommand\tex{\TeX{}}
+%
+\newcommand\macosx{Mac \acro{OS}/X}
%
%% \providecommand\TeXXeT{\TeX-{}-X\lower.5ex\hbox{E}\kern-.1667emT\@}
%\providecommand\MLTeX{ML-\TeX}
@@ -307,19 +325,27 @@
% non-silly names...
\renewcommand\TeX{TeX}
\newcommand\Eplain{Eplain}
-\newcommand\eTeX{e-\TeX}
+\newcommand\etex{e-\TeX}
+\let\eTeX\etex % some day all the old format will have gone...
\newcommand\ExTeX{Ex\TeX}
\newcommand\NTS{NTS}
\newcommand\PDFTeX{PDF\TeX}
+\newcommand\pdftex{PDF\TeX}
\newcommand\LuaTeX{Lua\TeX}
+\newcommand\luatex{Lua\TeX}
%\newcommand\TeXXeT{TeX-{}-XeT}
\newcommand\AllTeX{(La)\TeX}
+\newcommand\alltex{(La)\TeX}
\newcommand\CONTeXT{Con\TeX{}t}
+\newcommand\context{Con\tex{}t}
\newcommand\PDFLaTeX{PDF\LaTeX}
+\newcommand\pdflatex{PDF\latex}
\renewcommand\LaTeX{La\TeX}
+\newcommand\latex{La\TeX}
\newcommand\twee{2e}
\renewcommand\LaTeXe{\LaTeX\twee}
+\newcommand\latexe{\LaTeX\twee}
%
% Other odds and ends (appear differently in TeX and http or plain
% text
@@ -632,13 +658,31 @@
\newcounter{CTAN@replabs}%
%
% the command itself
-\newcommand{\CTANref}[1]{\@ifundefined{ctan-#1}{%
+\newcommand{\CTANref}[1]{%
+ \@ifundefined{ctan-#1}{%
\PackageWarning{CTAN}{Undefined reference: #1}%
\stepcounter{CTAN@unrefs}%
-}{%
+ \futurelet\@let@token\faq@zap@trailing@opt
+ }{%
\csname ctan-#1\endcsname
-}\futurelet\@let@token\faq@check@trailing@opt}
-\newcommand\faq@check@trailing@opt{\ifx\@let@token[%
+ \expandafter\let
+ \expandafter\faq@cat@ref\csname ctan-catref-#1\endcsname
+ }%
+ \futurelet\@let@token\faq@check@trailing@opt
+}
+\newcommand\faq@check@trailing@opt{%
+ \ifx\@let@token[%
+ \expandafter\faq@collect@catref
+ \else
+ \let\faq@catref\@empty%
+ \fi
+}
+\def\faq@collect@catref[#1]{\edef\faq@catref{\noexpand
+ \url{\faq@fixed@cataddr#1.html}%
+ }%
+}%
+\def\faq@fixed@cataddr{ help/Catalogue/}%
+\newcommand\faq@zap@trailing@opt{\ifx\@let@token[%
\expandafter\@gobble@opt\fi
}
\def\@gobble@opt[#1]{}