PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 1ms

/samples/sample.tex

http://txt2tags.googlecode.com/
LaTeX | 228 lines | 163 code | 63 blank | 2 comment | 0 complexity | 716b119494f41ba4e0fa95d1980ad6fb MD5 | raw file
  1\documentclass{article}
  2\usepackage{graphicx}
  3\usepackage{paralist} % needed for compact lists
  4\usepackage[normalem]{ulem} % needed by strike
  5\usepackage[urlcolor=blue,colorlinks=true]{hyperref}
  6\usepackage[utf8]{inputenc}  % char encoding
  7
  8\title{TXT2TAGS SAMPLE}
  9\author{Aurelio Jargas}
 10\begin{document}
 11\date{02/28/2011}
 12\maketitle
 13\clearpage
 14
 15
 16\section*{Introduction}
 17
 18Welcome to the txt2tags sample file.
 19
 20Here you have examples and a brief explanation of all
 21marks.
 22
 23The first 3 lines of the this file are used as headers,
 24on the following format:
 25
 26\begin{verbatim}
 27line1: document title
 28line2: author name, email
 29line3: date, version
 30\end{verbatim}
 31
 32Lines with balanced equal signs = around are titles.
 33
 34\section*{Fonts and Beautifiers}
 35
 36We have two sets of fonts:
 37
 38The NORMAL type that can be improved with beautifiers.
 39
 40The TYPEWRITER type that uses monospaced font for
 41pre-formatted text.
 42
 43We will now enter on a subtitle...
 44
 45\subsection*{Beautifiers}
 46
 47The text marks for beautifiers are simple, just as you
 48type on a plain text email message.
 49
 50We use double *, /, - and \_ to represent \textbf{bold},
 51\textit{italic}, \sout{strike} and \underline{underline}.
 52
 53The \textbf{\textit{bold italic}} style is also supported as a
 54combination.
 55
 56\subsection*{Pre-Formatted Text}
 57
 58We can put a code sample or other pre-formatted text:
 59
 60\begin{verbatim}
 61  here    is     pre-formatted
 62//marks// are  **not**  ``interpreted``
 63\end{verbatim}
 64
 65And also, it's easy to put a one line pre-formatted
 66text:
 67
 68\begin{verbatim}
 69prompt$ ls /etc
 70\end{verbatim}
 71
 72Or use \texttt{pre-formatted} inside sentences.
 73
 74\subsection*{More Cosmetics}
 75
 76Special entities like email (\htmladdnormallink{duh@somewhere.com}{mailto:duh@somewhere.com}) and
 77URL (\htmladdnormallink{http://www.duh.com}{http://www.duh.com}) are detected automagically,
 78as long as the horizontal line:
 79
 80\hrulefill{}
 81
 82\^{} thin or large v
 83
 84\clearpage
 85
 86You can also specify an \htmladdnormallink{explicit link}{http://duh.org}
 87or an \htmladdnormallink{explicit email}{mailto:duh@somewhere.com} with label.
 88
 89And remember,
 90
 91	\begin{quotation}
 92A TAB in front of the line does a quotation.
 93		\begin{quotation}
 94More TABs, more depth (if allowed).
 95		\end{quotation}
 96	\end{quotation}
 97
 98Nice.
 99
100\section*{Lists}
101
102A list of items is natural, just putting a \textbf{dash} or
103a \textbf{plus} at the beginning of the line.
104
105\subsection*{Plain List}
106
107The dash is the default list identifier. For sublists,
108just add \textbf{spaces} at the beginning of the line. More
109spaces, more sublists.
110
111\begin{compactitem}
112\item Earth
113  \begin{compactitem}
114  \item America
115    \begin{compactitem}
116    \item South America
117      \begin{compactitem}
118      \item Brazil
119      \item How deep can I go?
120      \end{compactitem}
121    \end{compactitem}
122  \item Europe
123    \begin{compactitem}
124    \item Lots of countries
125    \end{compactitem}
126  \end{compactitem}
127\item Mars
128  \begin{compactitem}
129  \item Who knows?
130  \end{compactitem}
131\end{compactitem}
132
133The list ends with \textbf{two} consecutive blank lines.
134
135\subsection*{Numbered List}
136
137The same rules as the plain list, just a different
138identifier (plus).
139
140\begin{compactenum}
141\item one
142\item two
143\item three
144  \begin{compactitem}
145  \item mixed lists!
146  \item what a mess
147    \begin{compactenum}
148    \item counting again
149    \item ...
150    \end{compactenum}
151  \end{compactitem}
152\item four
153\end{compactenum}
154
155\subsection*{Definition List}
156
157The definition list identifier is a colon, followed by
158the term. The term contents is placed on the next line.
159
160\begin{compactdesc}
161\item[orange]
162  a yellow fruit
163\item[apple]
164  a green or red fruit
165\item[other fruits]
166  \begin{compactitem}
167  \item wee!
168  \item mixing lists
169    \begin{compactenum}
170    \item again!
171    \item and again!
172    \end{compactenum}
173  \end{compactitem}
174\end{compactdesc}
175
176\section*{Tables}
177
178Use pipes to compose table rows and cells.
179Double pipe at the line beginning starts a heading row.
180Natural spaces specify each cell alignment.
181
182\begin{center}\begin{tabular}{|l|c|r|}
183\hline \textbf{heading 1} & \textbf{heading 2} & \textbf{heading 3} \\
184\hline cell 1.1 & cell 1.2 & cell 1.3 \\
185\hline cell 2.1 & cell 2.2 & cell 2.3 \\
186\hline \end{tabular}\end{center}
187
188Without the last pipe, no border:
189
190\begin{center}\begin{tabular}{lcr}
191\textbf{heading 1} & \textbf{heading 2} & \textbf{heading 3} \\
192cell 1.1 & cell 1.2 & cell 1.3 \\
193cell 2.1 & cell 2.2 & cell 2.3 \\
194\end{tabular}\end{center}
195
196\section*{Special Entities}
197
198Because things were too simple.
199
200\subsection*{Images}
201
202The image mark is as simple as it can be: \texttt{[filename]}.
203
204                      \includegraphics{img/photo.jpg}  
205
206\begin{compactitem}
207\item The filename must end in PNG, JPG, GIF, or similar.
208\item No spaces inside the brackets!
209\end{compactitem}
210
211\subsection*{Other}
212
213The handy \texttt{\%\%date} macro expands to the current date.
214
215So today is 20110602 on the ISO \texttt{YYYYMMDD} format.
216
217You can also specify the date format with the \%? flags,
218as \texttt{\%\%date(\%m-\%d-\%Y)} which gives: 06-02-2011.
219
220That's all for now.
221
222\hrulefill{}
223
224\includegraphics{img/t2tpowered.png} (\htmladdnormallink{sample.t2t}{sample.t2t})
225
226% LaTeX2e code generated by txt2tags 2.6.668 (http://txt2tags.org)
227% cmdline: txt2tags --no-rc -t tex -i ../../samples/sample.t2t -o sample.tex
228\end{document}