diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/expl3/l3doc.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3doc.dtx | 80 |
1 files changed, 57 insertions, 23 deletions
diff --git a/Master/texmf-dist/source/latex/expl3/l3doc.dtx b/Master/texmf-dist/source/latex/expl3/l3doc.dtx index 197a6703a98..e4238752c4d 100644 --- a/Master/texmf-dist/source/latex/expl3/l3doc.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3doc.dtx @@ -77,7 +77,7 @@ Do not distribute a modified version of this file. % \end{macrocode} % %<*driver|class> -\GetIdInfo$Id: l3doc.dtx 1538 2009-09-17 05:14:09Z will $ +\GetIdInfo$Id: l3doc.dtx 1733 2009-11-08 06:24:26Z will $ {L3 Experimental documentation class} %</driver|class> % @@ -216,6 +216,22 @@ Do not distribute a modified version of this file. % % \section{Documentation} % +% \subsection{Configuration} +% +% Before class options are processed, \pkg{l3doc} loads a configuration +% file "l3doc.cfg" if it exists, allowing you to customise the behaviour of +% the class without having to change the documentation source files. +% +% For example, to produce documentation on letter-sized paper instead of the +% default A4 size, create |l3doc.cfg| and include the line +% \begin{verbatim} +% \PassOptionsToClass{letterpaper}{l3doc} +% \end{verbatim} +% +% By default, \pkg{l3doc} selects the |T1| font encoding and loads the +% Latin Modern fonts. +% To prevent this, use the class option |cm-default|. +% % \subsection{Partitioning documentation and implementation} % % \pkg{doc} uses the "\OnlyDocumentation"/"\AlsoImplementation" macros @@ -398,7 +414,7 @@ Do not distribute a modified version of this file. Javier~Bezos,~Will~Robertson,~Joseph~Wright}} % \end{macrocode} % -% \subsection{Options} +% \subsection{Options and configuration} % % \begin{macrocode} \DeclareOption{a5paper}{\@latexerr{Option not supported}{}} @@ -406,21 +422,43 @@ Do not distribute a modified version of this file. % % \begin{macrocode} \bool_new:N \g_doc_full_bool -\bool_set_false:N \g_doc_full_bool +\bool_new:N \g_doc_lmodern_bool +\bool_new:N \g_doc_checkfunc_bool +% \end{macrocode} +% +% \begin{macrocode} \DeclareOption{full}{ \bool_set_true:N \g_doc_full_bool } \DeclareOption{onlydoc}{ \bool_set_false:N \g_doc_full_bool } % \end{macrocode} % % \begin{macrocode} -\bool_new:N \g_doc_checkfunc_bool -\bool_set_true:N \g_doc_checkfunc_bool \DeclareOption{check}{ \bool_set_true:N \g_doc_checkfunc_bool } \DeclareOption{nocheck}{ \bool_set_false:N \g_doc_checkfunc_bool } % \end{macrocode} % % \begin{macrocode} +\DeclareOption{cm-default}{ \bool_set_false:N \g_doc_lmodern_bool } +\DeclareOption{lm-default}{ \bool_set_true:N \g_doc_lmodern_bool } +% \end{macrocode} +% +% \begin{macrocode} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} -\ExecuteOptions{full} +\ExecuteOptions{full,a4paper,nocheck,lm-default} +% \end{macrocode} +% +% Input a local configuration file, if it exists. +% +% \begin{macrocode} +\InputIfFileExists{l3doc.cfg} + { + \typeout{*************************************^^J + *~Local~config~file~l3doc.cfg~used ^^J + *************************************} + } + { \@input{l3doc.ltx} } +% \end{macrocode} +% +% \begin{macrocode} \ProcessOptions % \end{macrocode} % @@ -428,14 +466,19 @@ Do not distribute a modified version of this file. % \subsection{Class and package loading} % % \begin{macrocode} -\LoadClass[a4paper]{article} +\LoadClass{article} \RequirePackage{doc} -\RequirePackage{array,alphalph,color,fixltx2e,enumitem,trace,underscore} +\RequirePackage{array,alphalph,color,fixltx2e,enumitem,textcomp,trace,underscore} % \end{macrocode} -% +% +% \begin{macrocode} +\bool_if:NT \g_doc_lmodern_bool { + \RequirePackage[T1]{fontenc} + \RequirePackage{lmodern} +} +% \end{macrocode} +% % \begin{macrocode} -\RequirePackage[T1]{fontenc} -\RequirePackage{lmodern,textcomp} \RequirePackage{hypdoc} % \end{macrocode} % Just want the "comment" environment from \pkg{verbatim}: @@ -988,7 +1031,7 @@ Do not distribute a modified version of this file. \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage} } \index{ - #1\actualchar{\protect\ttfamily#1} (option) + #1\actualchar{\protect\ttfamily#1}~(option) \encapchar usage } \index{ @@ -1057,7 +1100,7 @@ Do not distribute a modified version of this file. % % \begin{macrocode} \newenvironment{TemplateInterfaceDescription}[1] - {\subsection{The~template~type~`#1'}% + {\subsection{The~object~type~`#1'}% \begingroup \@beginparpenalty\@M \description @@ -1070,7 +1113,7 @@ Do not distribute a modified version of this file. % % \begin{macrocode} \newenvironment{TemplateDescription}[2] - {\subsection{The~template~`#2'~(type~#1)}% + {\subsection{The~template~`#2'~(object~type~#1)}% \subsubsection*{Attributes:}% \begingroup \@beginparpenalty\@M @@ -1346,7 +1389,6 @@ Do not distribute a modified version of this file. % \begin{macrocode} \g@addto@macro\theindex{\MakePrivateLetters} \cs_set:Npn \verbatimchar {&} -\cs_set:Npx \levelchar {\string#} % \end{macrocode} % % \begin{macrocode} @@ -1508,14 +1550,6 @@ Do not distribute a modified version of this file. } % \end{macrocode} % -% Input a local configuration file, if it exists. -% \begin{macrocode} -\InputIfFileExists{l3doc.cfg}{ - \typeout{*************************************^^J - *~Local~config~file~l3doc.cfg~used ^^J - *************************************} -}{} -% \end{macrocode} % % \begin{macrocode} %</class> |