diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/clock/clockdoc.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/clock/clockdoc.tex | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/clock/clockdoc.tex b/Master/texmf-dist/doc/latex/clock/clockdoc.tex new file mode 100644 index 00000000000..88945bf63a7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/clock/clockdoc.tex @@ -0,0 +1,160 @@ +\documentclass[12pt]{ltxdoc} +\usepackage{clock} + +\newcommand\exa{\nopagebreak \begin{flushleft}\smallskip \nopagebreak + \begin{minipage}[t]{6cm}\sloppy} +\newcommand\exb{\end{minipage}\kern 1cm\begin{minipage}[t]{8cm}\sloppy } +\newcommand\exc{\end{minipage}\kern -3cm \smallskip\end{flushleft}} + +\ClockFramefalse +\title{{\bigclockfont\clock{10}{10}}\\[0.5cm] + The \TeX\ Clock 0.3} +\author{Oliver Corff} +\date{October 01, 2001} +\begin{document} +\maketitle + + +\section{Graphical Clocks} + +The \TeX\ clock is a small hack\footnote{% + The \TeX\ clock was inspired by a discussion on + \texttt{comp.text.tex} somewhen in spring 2001; + special thanks to Daniel Luecking for the detection + of spurious spaces.} +for those who desire to show the time +in a graphical fashion. The basic command available is +\verb-\clock{..}{..}- which takes two arguments: hours and minutes. It +does not matter whether the hours are given in a 12h or a 24h range; +the \TeX\ clock understands both. + +When saying \verb-\clocktime- (without any argument) then the \TeX\ clock +will output the current system time at time of compilation in graphical +manner: + + +\exa + A random time: \clock{13}{47}\\ + The compilation time: \clocktime +\exb + \begin{verbatim} + A random time: \clock{13}{47}\\ + The compilation time: \clocktime + \end{verbatim} +\exc + + +\section{Installation} + +Before, however, we go into the details of the \TeX\ clock, some notes +on the installation of this software package. +The installation procedure depends on the nature of the actual +\TeX\ system. The directory tree of e.\,g., teTeX is different +from the emtex tree; hence the source archive \texttt{clock.zip} +features the following subdirectories the contents of which has to be +placed into appropriate branches of the \TeX\ installation: +\begin{sloppypar} +\begin{itemize} + \item \texttt{mfinput} holds the Metafont source file + for the clock. The suggested path for emtex + users is \verb"\emtex\mfinput\clock"; for teTeX users + \verb"$TEXMF/fonts/source/public/clock" is a suitable + choice. + \item \texttt{tfm} holds the font metrics file. + The suggested path for emtex users is \verb"\emtex\tfm\clock"; + for teTeX users \verb"$TEXMF/fonts/tfm/public/clock" + is a suitable choice. + \item \texttt{texinput} holds the style files which are read + by \TeX\ and \LaTeXe. + The suggested path for emtex users is + \verb"\emtex\texinput\clock"; for teTeX users + \verb"$TEXMF/tex/latex/clock" is a suitable choice. + \item \texttt{doc} contains the documentation (the document + which you are reading right now). It can be placed + in \verb"\emtex\doc\clock" (for emtex users) or + \verb"$TEXMF/doc/latex/clock" (for teTeX users). +\end{itemize} +\end{sloppypar} + +It may become necessary to rehash the directory database of the +\TeX\ system. When in doubt, consult your system administrator or +local \TeX\ wizard. +On teTeX systems, the command \texttt{texhash} will perform this service. + + +\section{Activating the \TeX\ clock} + +\begin{sloppypar} +In order to access the features of this little clock, \TeX\ users +put \verb*-\input clock- near the beginning of their document, while +\LaTeXe\ users say \verb-\usepackage{clock}- in the preamble of +their document. There are no options for the \TeX\ clock. + + +\section{Clock Styles} + +The appearance of the clock is controlled by two style parameters. +\verb-\ClockFrame- is a Boolean parameter and can be \verb-true- or +\verb-false-. Saying \verb-\ClockFramefalse- lets the border +disappear, saying \verb-\ClockFrametrue- lets the border appear. +\end{sloppypar} + +The parameter \verb-ClockStyle- takes a number between $0$ and $3$ +where $0$ stands for a clock with invisible dial: +\begin{center} +\begin{tabular}{ccc} +\texttt{\char92 Clockstyle=}\textit{n} & With Border & Without Border\\ +0 & \clockfont\ClockStyle=0 \ClockFrametrue\clock{10}{10} + & \clockfont\ClockStyle=0 \ClockFramefalse\clock{10}{10}\\ +1 & \clockfont\ClockStyle=1 \ClockFrametrue\clock{10}{10} + & \clockfont\ClockStyle=1 \ClockFramefalse\clock{10}{10}\\ +2 & \clockfont\ClockStyle=2 \ClockFrametrue\clock{10}{10} + & \clockfont\ClockStyle=2 \ClockFramefalse\clock{10}{10}\\ +3 & \clockfont\ClockStyle=3 \ClockFrametrue\clock{10}{10} + & \clockfont\ClockStyle=3 \ClockFramefalse\clock{10}{10} +\end{tabular} +\end{center} + +When used with \LaTeX2e, the size of the clock will automatically +adapt to the text environment, but if the user so desires, deviating +sizes can be selected with the usual font size commands. + +\section{The Text Clock} + +A graphical clock is not always ideal, sometimes a simple four-digit +digital display is more useful. For this purpose, the \TeX\ clock +provides a text-style clock. +Saying \verb-\texttime- shows the system time at the time of +compilation in a colon-separated 24 hour format. +Of course, the hours of the day are available as \verb-\texthours-, +and the minutes can be accessed by saying \verb-\textminutes- + +\exa + The compilation time is: \texttime\\ + Minute \textminutes\ of the hour\\ + Hour \texthours\ of the day\\ +\exb + \begin{verbatim} + The compilation time is: \texttime\\ + Minute \textminutes\ of the hour\\ + Hour \texthours\ of the day\\ + \end{verbatim} +\exc + +\section{The \TeX\ clockwork} + +\begin{sloppypar} +The inner workings of the \TeX\ clock are of astonishing simplicity. +Sixty different minute hands and the same number of hour hands are +stored as characters, and for any given minute \verb-\minute- the appopriate +minute hand is selected like \verb-\char\minute-. While the time +of minutes translates directly into the minute hand escapement, +the escapement of the hour hand has to be augmented by tiny steps +calculated from the minutes in order to create a natural, clock-like +look as the hour hand stands more often than not between full hours. +The border and the +various dials are stored as individual characters which then can be +added to the display of the clock as desired. +\end{sloppypar} + +\end{document} |