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