diff options
Diffstat (limited to 'macros/latex/contrib/koma-script/doc/scrtime-en.tex')
-rw-r--r-- | macros/latex/contrib/koma-script/doc/scrtime-en.tex | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/macros/latex/contrib/koma-script/doc/scrtime-en.tex b/macros/latex/contrib/koma-script/doc/scrtime-en.tex new file mode 100644 index 0000000000..baaae1bc9c --- /dev/null +++ b/macros/latex/contrib/koma-script/doc/scrtime-en.tex @@ -0,0 +1,133 @@ +% ====================================================================== +% scrtime-en.tex +% Copyright (c) Markus Kohm, 2001-2022 +% +% This file is part of the LaTeX2e KOMA-Script bundle. +% +% This work may be distributed and/or modified under the conditions of +% the LaTeX Project Public License, version 1.3c of the license. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 or later and of this work. +% +% This work has the LPPL maintenance status "author-maintained". +% +% The Current Maintainer and author of this work is Markus Kohm. +% +% This work consists of all files listed in MANIFEST.md. +% ====================================================================== +% +% Chapter about scrtime of the KOMA-Script guide +% Maintained by Markus Kohm +% +% ============================================================================ + +\KOMAProvidesFile{scrtime-en.tex} + [$Date: 2022-06-05 12:40:11 +0200 (So, 05. Jun 2022) $ + KOMA-Script guide (chapter: scrtime)] +\translator{Markus Kohm\and Gernot Hassenpflug\and Karl Hagen} + +\chapter{The Current Time with \Package{scrtime}} +\labelbase{scrtime} +\BeginIndexGroup +\BeginIndex{Package}{scrtime} + +This package lets you find the current time. Starting with version~3.05, the +package also supports the option interface already familiar from the +\KOMAScript{} classes and various other \KOMAScript{} packages. See, for +example, \autoref{sec:typearea.options} for more information. + +\begin{Declaration}% + \Macro{thistime}\OParameter{delimiter}% + \Macro{thistime*}\OParameter{delimiter} +\end{Declaration}% +\Macro{thistime} returns the current time\Index{time} in hours and minutes. +The delimiter between the values of hour, minutes and seconds can be given in +the optional argument. The default is the character ``\PValue{:}''. + +\Macro{thistime*} works in almost the same way as \Macro{thistime}. The only +difference is that, unlike \Macro{thistime}, \Macro{thistime*} does not add a +leading zero to the minute field when its value is less than 10. Thus, with +\Macro{thistime} the minute field has always two places. +\begin{Example} + The line +\begin{lstlisting} + Your train departs at \thistime. +\end{lstlisting} + results, for example, in: + \begin{ShowOutput} + Your train departs at \thistime. + \end{ShowOutput} + or: + \begin{ShowOutput} + Your train departs at 23:09. + \end{ShowOutput} + \bigskip + In contrast to the previous example a line like: +\begin{lstlisting} + This day is already \thistime*[\ hours and\ ] minutes old. +\end{lstlisting} + results in: + \begin{ShowOutput} + This day is already \thistime*[\ hours and\ ] minutes old. + \end{ShowOutput} + or: + \begin{ShowOutput} + This day is already 12 hours and 25 minutes old. + \end{ShowOutput} +\end{Example} +\EndIndexGroup + + +\begin{Declaration}% + \Macro{settime}\Parameter{time} +\end{Declaration}% +\Macro{settime} sets the output of \DescRef{scrtime.cmd.thistime} and +\DescRef{scrtime.cmd.thistime*} to a fixed value. In this case, the optional +parameter of \DescRef{scrtime.cmd.thistime} or \DescRef{scrtime.cmd.thistime*} +is ignored, since the complete string returned by +\DescRef{scrtime.cmd.thistime} or \DescRef{scrtime.cmd.thistime*} has been +explicitly defined. \Macro{settime}.% +\EndIndexGroup + + +\begin{Declaration} + \OptionVName{12h}{simple switch}% +\end{Declaration}% +\BeginIndex{Option}{24h}% +With the \Option{12h}\ChangedAt{v3.05a}{\Package{scrtime}} option, you can +select whether to print the time given by \DescRef{scrtime.cmd.thistime} and +\DescRef{scrtime.cmd.thistime*} in 12- or 24-hour format. The option accepts +the values for simple switches listed in \autoref{tab:truefalseswitch}, +\autopageref{tab:truefalseswitch}. Using the option without a value is +equivalent to \OptionValue{12h}{true}, and therefore activates the +12-hour-format. The default, however, is \Option{24h}. + +You can set this option globally in the optional argument of +\DescRef{typearea.cmd.documentclass}, as a package option in the optional +argument of \DescRef{typearea.cmd.usepackage}, or even after loading the +package using \DescRef{typearea.cmd.KOMAoptions} or +\DescRef{typearea.cmd.KOMAoption} (see, e.\,g. \autoref{sec:typearea.options}, +\DescPageRef{typearea.cmd.KOMAoptions}). However the option no longer has any +effect on the if you call \DescRef{scrtime.cmd.settime}. After invoking this +command, the time is output only with the value and in the format specified +there. + +For\textnote{Attention!} the sake of compatibility with earlier versions of +\Package{scrtime}, the option \Option{24h} will switch to 24-hour format if +used in the optional argument of \Macro{documentclass} or \Macro{usepackage}. +However, you should not use this option any longer.% +\EndIndexGroup +% +\EndIndexGroup + +\endinput + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "scrguide-en.tex" +%%% coding: utf-8 +%%% ispell-local-dictionary: "en_GB" +%%% eval: (flyspell-mode 1) +%%% End: |