diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/koma-script/doc/english/scrlfile.tex')
-rw-r--r-- | Master/texmf-dist/source/latex/koma-script/doc/english/scrlfile.tex | 110 |
1 files changed, 94 insertions, 16 deletions
diff --git a/Master/texmf-dist/source/latex/koma-script/doc/english/scrlfile.tex b/Master/texmf-dist/source/latex/koma-script/doc/english/scrlfile.tex index a3bfa1aab2e..a01d445a1cf 100644 --- a/Master/texmf-dist/source/latex/koma-script/doc/english/scrlfile.tex +++ b/Master/texmf-dist/source/latex/koma-script/doc/english/scrlfile.tex @@ -1,6 +1,6 @@ % ====================================================================== % scrlfile.tex -% Copyright (c) Markus Kohm, 2001-2012 +% Copyright (c) Markus Kohm, 2001-2013 % % This file is part of the LaTeX2e KOMA-Script bundle. % @@ -18,7 +18,7 @@ % This work consists of all files listed in manifest.txt. % ---------------------------------------------------------------------- % scrlfile.tex -% Copyright (c) Markus Kohm, 2001-2012 +% Copyright (c) Markus Kohm, 2001-2013 % % Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz, % Version 1.3c, verteilt und/oder veraendert werden. @@ -45,10 +45,12 @@ % % ============================================================================ -\ProvidesFile{scrlfile.tex}[2012/02/24 KOMA-Script guide (chapter: scrlfile)] +\KOMAProvidesFile{scrlfile.tex} + [$Date: 2013-12-13 12:11:01 +0100 (Fr, 13. Dez 2013) $ + KOMA-Script guide (chapter: scrlfile)] \translator{Gernot Hassenpflug\and Markus Kohm} -% Date of translated german file: 2012/02/25 +% Date of translated german file: 2013/11/24 \chapter{Control Package Dependencies with \Package{scrlfile}} \labelbase{scrlfile} @@ -210,10 +212,10 @@ The\important[i]{\Macro{AfterClass+}\\\Macro{AfterPackage+}} plussed\ChangedAt{v3.09}{\Package{scrlfile}} version executes the \PName{instructions} after loading of the class or package has been finished. The difference to the starred version is only valid, if loading of -the class or package already started but hasn't been finished +the class or package already started but has not been finished yet. Nevertheless, \PName{instructions} will be executed before the instructions of \Macro{AtEndOfClass} or \Macro{AtEndOfPackage} when loading of -the class or package hasn't been finished already. +the class or package has not been finished already. If\important[i]{\Macro{AfterClass!}\\\Macro{AfterPackage!}} a class uses \Macro{AtEndOfClass} or a package uses \Macro{AtEndOfPackage} to execute @@ -355,7 +357,7 @@ page of the document already have been shipped out before \Macro{end}\PParameter{document}, the code above will not result in any writing into the \File{aux}-file. If someone would try to fix this new problem using \Macro{immediate} just before \Macro{write}, the inverse problem would -occur: If the last page wasn't shipped out before +occur: If the last page was not shipped out before \Macro{end}\PParameter{document} the \Macro{writethistoaux} would be written into \File{aux}-file before ship-out the last page. Another often seen suggestion for this problem therefore is: @@ -377,7 +379,7 @@ been enforced by the \Macro{clearpage}. After that, instructions like Note at the end of the document.\par } \end{lstcode} -wouldn't any longer output the note at the end of the last page of the +would not any longer output the note at the end of the last page of the document but at the end of one more page. Additionally \Macro{writethistoaux} would be written one page to early into the \File{aux}-file again. @@ -395,7 +397,7 @@ immediately after the final \Macro{clearpage}, that is part of } \end{lstcode} This would be successful even if the final \Macro{clearpage} inside of -\Macro{end}\PParameter{document} wouldn't really ship-out any page or if +\Macro{end}\PParameter{document} would not really ship-out any page or if someone have had used \Macro{clearpage} in the argument of \Macro{AtEndDocument}. @@ -517,7 +519,7 @@ Please\textnote{Attention!} note, that the \PName{replacement class} or the \PName{replacement package} will be loaded with the same options, the \PName{source class} or \PName{replacement class} would until it has been replaced. Replacement of a class or package by a class or package, that -doesn't support a requested option, would result in a warning or even an error +does not support a requested option, would result in a warning or even an error message. But you may declare such missing options using \Macro{BeforeClass} or \Macro{BeforePackage}. @@ -528,7 +530,7 @@ message. But you may declare such missing options using \Macro{BeforeClass} or \ReplacePackage{oldfoo}{newfoo} \end{lstcode} Assumed the old package provides an option \Option{oldopt}, but the new - package doesn't. Using + package does not. Using \begin{lstcode} \BeforePackage{newfoo}{% \DeclareOption{oldopt}{% @@ -578,6 +580,23 @@ class using \Macro{RequirePackage} instead of \Macro{usepackage}. \EndIndex{Cmd}{ReplacePackage}% \EndIndex{Cmd}{ReplaceClass}% +\begin{Declaration} + \Macro{UnReplaceInput}\Parameter{file name}\\ + \Macro{UnReplacePackage}\Parameter{package}\\ + \Macro{UnReplaceClass}\Parameter{class}% +\end{Declaration} +\BeginIndex{Cmd}{UnReplaceInput}% +\BeginIndex{Cmd}{UnReplacePackage}% +\BeginIndex{Cmd}{UnReplaceClass}% +A\ChangedAt{v3.12}{\Package{scrlfile}} replacement definition can be removed +using one of these commands. The replacement definition of a input file should +be removed using \Macro{UnReplaceInput}, the replacement definition of a +package should be removed using \Macro{UnReplacePackage}, and the replacement +definition of a class should be removed using \Macro{UnReplaceClass}.% +\EndIndex{Cmd}{UnReplaceClass}% +\EndIndex{Cmd}{UnReplacePackage}% +\EndIndex{Cmd}{UnReplaceInput}% + \section{Prevent File Loading} \label{sec:scrlfile.prevent} @@ -590,9 +609,13 @@ of that package has to prevented. For this purpose \Package{scrlfile} again provides a solution. \begin{Declaration} - \Macro{PreventPackageFromLoading}\Parameter{package list} + \Macro{PreventPackageFromLoading}\OParameter{instead code}% + \Parameter{package list}\\ + \Macro{PreventPackageFromLoading*}\OParameter{instead code}% + \Parameter{package list} \end{Declaration} \BeginIndex{Cmd}{PreventPackageFromLoading}% +\BeginIndex{Cmd}{PreventPackageFromLoading*}% Calling this command\ChangedAt{v3.08}{\Package{scrlfile}} before loading a package using \Macro{usepackage}\IndexCmd{usepackage}, \Macro{RequirePackage}\IndexCmd{RequirePackage}, or @@ -610,7 +633,7 @@ the \PName{package list}. \end{lstcode} But now, you want to use X\kern-.125em\lower.5ex\hbox{\reflectbox{E}}\LaTeX{} oder Lua\LaTeX{} the - first time. In this case loading of \Package{fontenc} wouldn't be a good + first time. In this case loading of \Package{fontenc} would not be a good suggestion and Latin-Modern would be the default font of the recommended package \Package{fontspec}. Because of this you want to prevent both packages from being loaded. This may be done, loading the class like this: @@ -623,8 +646,21 @@ the \PName{package list}. The example above also shows, that package \Package{scrlfile} may be loaded before the class. In this case \Macro{RequirePackage}\IndexCmd{RequirePackage} has to be used, because \Macro{usepackage} before \Macro{documentclass} is not -permitted.% -% +permitted. + +If \PName{package list} is empty or contains a package, that already has been +loaded, \Macro{PreventPackageFromLoading} will warn. If you'd prefer an +info\ChangedAt{v3.12}{\Package{scrlfile}} at the log-file only, you may use +\Macro{PreventPackageFromLoading*} instead. + +The optional argument\ChangedAt{v3.12}{\Package{scrlfile}} may be used to +execute code instead of loading the package. But you must not load another +packages or files inside \PName{instead code}. See \Macro{ReplacePackage} in +\autoref{sec:scrlfile.macros} on +\autopageref{desc:scrlfile.cmd.ReplacePackage} for information about replacing +a package by another one. Note also, that the \PName{instead code} will be +executed several times, if you try to load the package more than once!% +\EndIndex{Cmd}{PreventPackageFromLoading*}% \EndIndex{Cmd}{PreventPackageFromLoading} \begin{Declaration} @@ -670,9 +706,51 @@ been stored using \Macro{StorePreventPackageFromLoading} is responsible for the correct restorability. For example the list elements must be separated by comma, must not contain white space or group braces, and must be fully expandable. -% + +Please note\textnote{Attention!}, that \Macro{ResetPreventPackageFromLoading} +does not clean the \PName{instead code} of a package. Only the execution is not +done as long as the prevention is not reactivated.% \EndIndex{Cmd}{ResetPreventPackageFromLoading}% \EndIndex{Cmd}{StorePreventPackageFromLoading}% + +\begin{Declaration} + \Macro{UnPreventPackageFromLoading}\Parameter{package list}\\ + \Macro{UnPreventPackageFromLoading*}\Parameter{package list} +\end{Declaration} +\BeginIndex{Cmd}{UnPreventPackageFromLoading}% +\BeginIndex{Cmd}{UnPreventPackageFromLoading*}% +Instead\ChangedAt{v3.12}{\Package{scrlfile}} of resetting the whole list of +packages, that should prevented from being loaded, you may also remove some +packages from that list. The star version of the command does also clean the +\PName{instead code}. So reactivation of the prevent package list, e.\,g., +from a stored one, will not reactivate the \PName{instead code} of the +packages.% +% +\begin{Example} + Assuming, you want to prevent a package \Package{foo} from being loaded, but + you do not want an already stored \PName{instead code} to be + executed. Instead of that code, you're own \PName{instead code} should be + executed. You can do this: +\begin{lstcode} + \UnPreventPackageFromLoading*{foo} + \PreventPackageFromLoading[\typeout{Stattdessencode}]{foo} +\end{lstcode} + For \Macro{UnPreventPackageFromLoading} it does not matter whether or not + the package has been prevented from being loaded before. + + Surely you can use the command also to remove only the \PName{instead code} + of all packages: +\begin{lstcode} + \StorePreventPackageFromLoading\TheWholePreventList + \UnPreventPackageFromLoading*{\TheWholePreventList} + \PreventPackageFromLoading{\TheWholePreventList} +\end{lstcode} + In this case the packages, that has been prevented from being loaded, are + still prevented from being loaded, but their \PName{instead code} has been + cleaned and will not be executed any longer.% +\end{Example}% +\EndIndex{Cmd}{UnPreventPackageFromLoading*}% +\EndIndex{Cmd}{UnPreventPackageFromLoading}% % \EndIndex{Package}{scrlfile} |