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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
|
%%
%% This is file 'grid.tex',
%%
%%
%% grid.sty Copyright (C) 2009 River Valley Technologies
%% URL: http://www.river-valley.com
%% Email: <latex.support@river-valley.com>
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.2
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.2 or later is part of all distributions of LaTeX
%% version 1999/12/01 or later.
%%
%% $Id: grid.tex 16 2009-06-16 07:04:50Z cvr $
%% $URL: http://lenova.river-valley.com/svn/grid/trunk/grid.tex $
%%
\documentclass[twocolumn]{article}
% \IfFileExists{txfonts.sty}
% {\usepackage{txfonts}}
% {\usepackage{times}}
\usepackage{lipsum}
\usepackage[xcolor]{rvdtx}
%\usepackage[fontsize=8pt,baseline=9.6pt,lines=50]{grid}
%\usepackage[fontsize=9pt,baseline=10.8pt]{grid}
\usepackage[fontsize=10pt,baseline=12pt,lines=53]{grid}
%\usepackage[fontsize=11pt,baseline=13.2pt]{grid}
%\usepackage[fontsize=12pt,baseline=14.4pt]{grid}
%\usepackage[fontsize=20pt,baseline=24pt,lines=20]{grid}
\newcommand{\ip}[2]{(#1, #2)}
\columnsep=20pt
\begin{document}
\title{grid.sty --- Manual and Examples}
\author{River Valley Technologies}
\contact{latex.support@river-valley.com}
\version{1.0}
\date{2009/06/16}
%\keywords{\LaTeX, grid typesetting}
\maketitle
\section{About this package}
\texttt{grid.sty} is a \LaTeX\ package which helps to enable grid
typesetting in double column documents. Grid typesetting is a
difficult task in \LaTeX, this is only a humble attempt to help users
to achieve it in a limited way. This document has been typeset making
use of \verb+grid.sty+. The package needs a lot of improvements, this
is only a beginning.
\subsection{Package options}
Three options were added in the package:
\begin{description}
\item[fontsize] sets the font size of the file. Default value is
\textit{10pt}.
\item[baseline] sets the baseline skip of the document. Default value
is \textit{12pt}.
\item[lines] sets the textheight of the document, which is calulated
by multiplying number of lines and baselineskip. The default value
is \textit{40}.
\end{description}
\subsection{Package specific coding:}
Equations should be put inside \verb+\begin{gridenv}+ ...
\verb+\end{gridenv}+ environment. For example:
\begin{gridenv}
{\footnotesize
\begin{verbatim}
\begin{gridenv}
\begin{equation}
\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}
\end{equation}
\end{gridenv}
\end{verbatim}
}
\begin{equation}
\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\label{eq1}
\end{equation}
\end{gridenv}
\subsection{Limitations of the package}
\begin{itemize}
\item Enunciations (theorem, lemma etc) were not added in the package.
\item Optional argument of floats (poisitioning of floats) are not
currently supported.
\item Footnotes are not aligned correctly.
\end{itemize}
These are some of the limitations of the package. The user manual ends here.
The following text is taken from an example of \LaTeX. This can be
considered as an example input file for our purpose. Playing with this
file by changing the options and looking at the the generated output,
you can get a grip of how to produce a simple document of your own.
\section{Ordinary Text}
The ends of words and sentences are marked by spaces. It doesn't
matter how many spaces you type; one is as good as 100. The end of a
line counts as a space.
One or more blank lines denote the end of a paragraph.
\begin{figure}
\vbox{\centering\fcolorbox{orange}{orange!20}{%
\hbox to 9.3pc{\vbox to 5pc{\hsize=9.3pc%
\vfill\centering \Huge
\color{orange!70}Grid and \LaTeX\par\vfill}}}}
\caption{Test figure.}
\end{figure}
Since any number of consecutive spaces are treated like a single one,
the formatting of the input file makes no difference to \LaTeX, but it
makes a difference to you. When you use \LaTeX, making your input file
as easy to read as possible will be a great help as you write your
document and when you change it. This sample file shows how you can
add comments to your own input file.
Because printing is different from typewriting, there are a number of
things that you have to do differently when preparing an input file
than if you were just typing the document directly. Quotation marks
like ``this'' have to be handled specially, as do quotes within
quotes: ``\,`this' is what I just wrote, not `that'\,''.
Dashes come in three sizes: an intra-word dash, a medium dash for
number ranges like 1--2, and a punctuation dash---like this.
\begin{table}%[!b]
\centering
\begin{tabular}{l|c|r}
\hline
First & Second & Third \\
\hline
Left & Center & Right \\
Start & Middle& End\\
\hline
\end{tabular}
\caption{Test table.}
\end{table}
\begin{table*}%[!b]
\tabcolsep=20pt
\centering
\begin{tabular}{l|c|r}
\hline
First & Second & Third \\
\hline
Left & Center & Right \\
Start & Middle& End\\
\hline
\end{tabular}
\caption{Test table.}
\end{table*}
A sentence-ending space should be larger than the space between words
within a sentence. You sometimes have to type special commands in
conjunction with punctuation characters to get this right, as in the
\begin{gridenv}
\begin{equation}
\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\label{eq1}
\end{equation}
\end{gridenv}
following sentence. Gnats, gnus, etc.\ all begin with G\@. You should
check the spaces after periods when reading your output to make sure
you haven't forgotten any special cases. Generating an ellipsis
\ldots\ with the right spacing around the periods requires a special
command.
\begin{gridenv}
\begin{eqnarray}
\frac{\sum^X_Y}{\prod'_C} = x'' + y^{2} + z_{i}^{n}\label{eq2}%\\
%\frac{\int^\sum}{\int_prod'} = x'' + y^{2} + z_{i}^{n}\label{eq3}\\
%\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\label{eq4}
\end{eqnarray}
\end{gridenv}
\LaTeX\ interprets some common characters as commands, so you must
type special commands to generate them. These characters include the
following: \$ \& \% \# \{ and \}.
\begin{gridenv}
\begin{equation}
\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\label{eq5}
\end{equation}
\end{gridenv}
In printing, text is usually emphasized with an \emph{italic} type
style.
\begin{em}
A long segment of text can also be emphasized in this way. Text
within such a segment can be given \emph{additional} emphasis.
\end{em}
It is sometimes necessary to prevent \LaTeX\ from breaking a line
where it might otherwise do so. This may be at a space, as between the
``Mr.'' and ``Jones'' in ``Mr.~Jones'', or within a word---especially
when the word is a symbol like \mbox{\emph{itemnum}} that makes little
sense when hyphenated across lines.
\begin{figure}
\vbox{\centering\fcolorbox{brown!90}{brown!10}{\hbox to 14.3pc{%
\vbox to 15pc{%
\hsize=14.3pc%
\vfill\centering \fontsize{30}{40}\selectfont
\color{brown!50}Grid and \LaTeX\par\vfill}}}}
\caption{Test figure.}
\end{figure}
\LaTeX\ is good at typesetting mathematical formulas like
\( x-3y + z = 7 \)
or
\( a_{1} > x^{2n} + y^{2n} > x' \)
or
\( \ip{A}{B} = \sum_{i} a_{i} b_{i} \).
The spaces you type in a formula are ignored. Remember that a letter
like $x$ is a formula when it denotes a mathematical symbol, and it
should be typed as one.
\section{Displayed Text}
Text is displayed by indenting it from the left margin. Quotations are
commonly displayed. There are short quotations
\begin{quote}
This is a short a quotation. It consists of a single paragraph of
text. See how it is formatted.
\end{quote}
and longer ones.
\begin{quotation}
This is a longer quotation. It consists of two paragraphs of text,
neither of which are particularly interesting.
This is the second paragraph of the quotation. It is just as dull as
the first paragraph.
\end{quotation}
Another frequently-displayed structure is a list. The following is an
example of an \emph{itemized} list.
\begin{itemize}
\item This is the first item of an itemized list. Each item in the
list is marked with a ``tick''. You don't have to worry about what
kind of tick mark is used.
\item This is the second item of the list. It contains another list
nested inside it. The inner list is an \emph{enumerated} list.
\begin{enumerate}
\item This is the first item of an enumerated list that is nested
within the itemized list.
\item This is the second item of the inner list. \LaTeX\ allows you
to nest lists deeper than you really should.
\end{enumerate}
This is the rest of the second item of the outer list. It is no more
interesting than any other part of the item.
\item This is the third item of the list.
\end{itemize}
You can even display poetry.
\begin{verse}
There is an environment for verse \\
Whose features some poets will curse.
For instead of making\\
Them do \emph{all} line breaking, \\
It allows them to put too many words on a line when they'd rather be
forced to be terse.
\end{verse}
Mathematical formulas may also be displayed. A displayed formula is
one-line long; multiline formulas require special formatting
instructions.
\[ \ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\]
Don't start a paragraph with a displayed equation, nor make one a
paragraph by itself.
\section{Some bizarre text}
\lipsum[1]
\begin{gridenv}
\begin{eqnarray}
\frac{\sum^X_Y}{\prod'_C} = x'' + y^{2} + z_{i}^{n}\label{eq2}\\
\frac{\int^\sum}{\int_prod'} = x'' + y^{2} + z_{i}^{n}\label{eq3}\\
\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\label{eq4}
\end{eqnarray}
\end{gridenv}
\lipsum[2]
\begin{gridenv}
\begin{equation}
\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\label{eq1}
\end{equation}
\end{gridenv}
\lipsum[3]
\begin{gridenv}
\begin{eqnarray}
\frac{\sum^X_Y}{\prod'_C} = x'' + y^{2} + z_{i}^{n}\label{eq2}\\
\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\label{eq4}
\end{eqnarray}
\end{gridenv}
\lipsum[4]
\begin{gridenv}
\begin{equation}
\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\label{eq1}
\end{equation}
\end{gridenv}
\lipsum[5]
\begin{gridenv}
\begin{eqnarray}
\frac{\sum^X_Y}{\prod'_C} = x'' + y^{2} + z_{i}^{n}\label{eq2}
%\\
%\frac{\int^\sum}{\int_prod'} = x'' + y^{2} + z_{i}^{n}\label{eq3}\\
%\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\label{eq4}\\
%\frac{\int^\sum}{\int_prod'} = x'' + y^{2} + z_{i}^{n}\label{eq3}\\
%\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\label{eq4}
\end{eqnarray}
\end{gridenv}
\lipsum[10]
\begin{gridenv}
\begin{eqnarray}
\frac{\sum^X_Y}{\prod'_C} = x'' + y^{2} + z_{i}^{n}\label{eq2}\\
\end{eqnarray}
\end{gridenv}
\lipsum[11]
\begin{gridenv}
\begin{eqnarray}
\frac{\int^\sum}{\int_prod'} = x'' + y^{2} + z_{i}^{n}\label{eq3}\\
\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\label{eq4}\\
\frac{\sum^X_Y}{\prod'_C} = x'' + y^{2} + z_{i}^{n}\label{eq2}\\
\frac{\int^\sum}{\int_prod'} = x'' + y^{2} + z_{i}^{n}\label{eq3}\\
\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\label{eq4}
\end{eqnarray}
\end{gridenv}
\lipsum[3]
\begin{gridenv}
\begin{equation}
\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\label{eq1}
\end{equation}
\end{gridenv}
\begin{figure*}
\vbox{\centering\fcolorbox{brown!90}{brown!10}{\hbox to .9\textwidth{%
\vbox to 10pc{%
\hsize=.9\textwidth%
\vfill\centering \fontsize{30}{40}\selectfont
\color{brown!50}Grid and \LaTeX\par\vfill}}}}
\caption{Test figure.}
\end{figure*}
\lipsum[8]
\begin{gridenv}
\begin{eqnarray}
\frac{\sum^X_Y}{\prod'_C} = x'' + y^{2} + z_{i}^{n}\label{eq2}\\
\frac{\int^\sum}{\int_prod'} = x'' + y^{2} + z_{i}^{n}\label{eq3}\\
\end{eqnarray}
\end{gridenv}
\lipsum[7]
\begin{gridenv}
\begin{eqnarray}
\frac{\sum^X_Y}{\prod'_C} = x'' + y^{2} + z_{i}^{n}\label{eq2}\\
\end{eqnarray}
\end{gridenv}
\begin{figure}
\vbox{\centering\fcolorbox{brown!90}{brown!10}{\hbox to 14.3pc{%
\vbox to 15pc{%
\hsize=14.3pc%
\vfill\centering \fontsize{30}{40}\selectfont
\color{brown!50}Grid and \LaTeX\par\vfill}}}}
\caption{Test figure.}
\end{figure}
\lipsum[3]
\begin{gridenv}
\begin{equation}
\ip{\Gamma}{\psi'} = x'' + y^{2} + z_{i}^{n}\label{eq1}
\end{equation}
\end{gridenv}
\lipsum[1-3]
\end{document}
% End of document.
|