1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
|
\ProvidesFile{monofill.tex}[2012/10/30 documenting monofill.sty]
\title{\textsf{\huge monofill.sty}\\---\\Alignment with Plain Text\\
or Monospaced Characters\thanks{This
document describes version
\textcolor{blue}{\UseVersionOf{\jobname.sty}}
of \textsf{\jobname.sty} as of \UseDateOf{\jobname.sty}.}}
% \listfiles
{ \RequirePackage{makedoc} \ProcessLineMessage{}
\MakeJobDoc{17}%% 2011/11/23
{\SectionLevelTwoParseInput} }
\documentclass[fleqn]{article}%% TODO paper dimensions!?
\input{makedoc.cfg}
% \ReadPackageInfos{monofill}
% \usepackage{monofill}
\usepackage[fake-undefined]{monofill}
% \expandafter\show\csname MF@field@undeclared\endcsname
\sloppy
\begin{document}
\maketitle
\begin{abstract}\noindent
'monofill.sty' addresses horizontal alignment with plain text
as in the result of \LaTeX's `\listfiles'.
%% 2012/10/30:
In the first instance, it has been developed as the shared
tool to adjust each column with the \ctanpkgref{nicefilelist} package.
%% /2012/10/30
It may also be useful for alignment in typesetting monospaced
characters as in figure tables, for simulating a typewriter,
or for code listings.
v0.2 in fact provides a tool for use with the %% 2012/10/30
\ctanpkgref{hardwrap} package that in turn has been made for console output.
The implementation also has ``philosophical aspects"
in avoiding use of a counter register.
\end{abstract}
\tableofcontents
% \newpage
\section{Features and Usage}
\subsection{Summary of Features}
A command |\MFfieldtemplate| sets the maximum width of a ``field"
using a template,
with an optional argument for the ``filler" token.
Then |\MFleftinfield| and |\MFrightinfield| types given
(one-line) text and adds ``filler" tokens to the left or right,
until the entire number of tokens es the number of characters
in the associated template. So this is a kind of analogue to
`\settowidth{\mylength}{<template>}',
`\makebox[\mylength][l]{<text>}', and
`\makebox[\mylength][r]{<text>}'
intended for plain text output, without typesetting.
See Sec.~\ref{sec:user} for details.
\subsection{``Philosophical aspects"}
The package also has ``philosophical" aspects: \
1.\enspace Apart from the declaration of the width of a ``field",
everything is \strong{expandable} (thinking of application with 'blog.sty'
of the \ctanpkgref{morehype} bundle) and thus is a kind of
\Wikienref{functional programming}. \
2.\enspace Actually, \strong{no counter} is used,
and we seem to \emph{count without} using the \emph{concept of ``number."}
\
Rather, we \ (a)\enspace just generate a new list from a given one such
that both have the same length and \
(b)\enspace compare the lengths of two lists---both (a) and (b)
without \emph{determining} the length (which would be a \emph{number})
of any list.
\subsection{Installing and Calling}
The file 'monofill.sty' is provided ready, installation only requires
putting it somewhere where \TeX\ finds it
(which may need updating the filename data
base).\urlfoot{ukfaqref}{inst-wlcf} %% corr. 2011/02/08
%% extended 2011/01/14:
Below the `\documentclass' line(s) and above `\begin{document}',
you load 'monofill.sty' (as usually) by
\begin{verbatim}
\usepackage{monofill}
\end{verbatim}
For certain uses such as with \ctanpkgref{fileinfo},
the package is better loaded by
\begin{verbatim}
\RequirePackage{monofill}
\end{verbatim}
\subsection{Examples}
\subsubsection{Typewriter}
% \MFfieldtemplate{tt}{leftright}
% \MFfieldtemplate[\ ]{tt}{leftright}
% \MFfieldtemplate[~]{tt}{leftright}
% \MFfieldtemplate[X]{tt}{leftright}
With both \[`\MFfieldtemplate[\MFspace]{tt}{leftright}' \]
and \[`\MFfieldtemplate[\MFenspace]{tt}{leftright}'\]
followed by
\begin{verbatim}
\begin{quotation}\tt\noindent
!leftright!\\
!\MFleftinfield{left}{tt}!\\
!\MFrightinfield{right}{tt}!\\
!\MFrightinfield{rightleft}{tt}!
\end{quotation}
\end{verbatim}
I get
% \MFfieldtemplate[\MFspace]{tt}{leftright}
\MFfieldtemplate[\MFenspace]{tt}{leftright}
% \MFfieldtemplate[\MFotherspace]{tt}{leftright}
%% <- works to
% \MFfieldtemplate[\enspace]{tt}{leftright}
% \MFfieldtemplate[\kern.5em ]{tt}{leftright}
% \renewcommand*{\MFfillelement}{\kern.5em }
% \renewcommand*{\MFfillelement}{\hphantom\enspace}
\begin{quotation}\tt\noindent
% \enspace leftright\\
!leftright!\\
!\MFleftinfield{left}{tt}!\\
!\MFrightinfield{right}{tt}!\\
!\MFrightinfield{rightleft}{tt}!
% \enspace \MFrightinfield{rightleft}{tt}
\end{quotation}
\subsubsection{Figures}
Similarly, with
`\MFfieldtemplate[\MFenspace]{figs}{0000}'
and
\begin{verbatim}
\begin{quote}\noindent
\MFrightinfield{1}{figs} is one,\\
\MFrightinfield{10}{figs} is ten,\\
\MFrightinfield{100}{figs} is hundred,\\
\MFrightinfield{1000}{figs} is thousand.
\end{quote}
\end{verbatim}
I get
\MFfieldtemplate[\MFenspace]{figs}{0000}
\begin{quote}\noindent
\MFrightinfield{1}{figs} is one,\\
\MFrightinfield{10}{figs} is ten,\\
\MFrightinfield{100}{figs} is hundred,\\
\MFrightinfield{1000}{figs} is thousand.
\end{quote}
\subsubsection{Screen Output}
Finally, try
\begin{verbatim}
\MFfieldtemplate{screen}{0000}
\typeout{\MFrightinfield{1}{screen} is one,}
\typeout{\MFrightinfield{10}{screen} is ten,}
\typeout{\MFrightinfield{100}{screen} is hundred,}
\typeout{\MFrightinfield{1000}{screen} is thousand.}
\typein{OK?}
\end{verbatim}
It works, believe me.
% \MFfieldtemplate{screen}{0000}
% \typeout{\MFrightinfield{1}{screen} is one,}
% \typeout{\MFrightinfield{10}{screen} is ten,}
% \typeout{\MFrightinfield{100}{screen} is hundred,}
% \typeout{\MFrightinfield{1000}{screen} is thousand.}
% \typein{OK?}
% \pagebreak
% \section{Implementation}
\section{Package File Header (Legalese)} %% was ize 2012/09/30
\input{monofill.doc}
\section{Credit}
The package actually is motivated by good ideas of
\ctanpkgauref{muench-hm}{Martin M\"unch}'s about
extending the \ctanpkgref{longnamefilelist} package.
\end{document}
VERSION HISTORY
2012/03/18 for v0.1 started
2012/03/19 completed
2012/03/19 for v0.1a enlargened first title line
2012/09/30 for v0.1b ize -> ese
2012/10/29 for v0.2 just used example to try \MFotherspace,
typing M\"unch
2012/10/30 mention nicefilelist
|