\documentclass[10pt,a4paper,english]{article}
\usepackage{babel}
\usepackage{ae}
\usepackage{aeguill}
\usepackage{shortvrb}
\usepackage[latin1]{inputenc}
\usepackage{tabularx}
\usepackage{longtable}
\setlength{\extrarowheight}{2pt}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{color}
\usepackage{multirow}
\usepackage{ifthen}
\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
\usepackage[DIV12]{typearea}
%% generator Docutils: http://docutils.sourceforge.net/
\newlength{\admonitionwidth}
\setlength{\admonitionwidth}{0.9\textwidth}
\newlength{\docinfowidth}
\setlength{\docinfowidth}{0.9\textwidth}
\newlength{\locallinewidth}
\newcommand{\optionlistlabel}[1]{\bf #1 \hfill}
\newenvironment{optionlist}[1]
{\begin{list}{}
{\setlength{\labelwidth}{#1}
\setlength{\rightmargin}{1cm}
\setlength{\leftmargin}{\rightmargin}
\addtolength{\leftmargin}{\labelwidth}
\addtolength{\leftmargin}{\labelsep}
\renewcommand{\makelabel}{\optionlistlabel}}
}{\end{list}}
\newlength{\lineblockindentation}
\setlength{\lineblockindentation}{2.5em}
\newenvironment{lineblock}[1]
{\begin{list}{}
{\setlength{\partopsep}{\parskip}
\addtolength{\partopsep}{\baselineskip}
\topsep0pt\itemsep0.15\baselineskip\parsep0pt
\leftmargin#1}
\raggedright}
{\end{list}}
% begin: floats for footnotes tweaking.
\setlength{\floatsep}{0.5em}
\setlength{\textfloatsep}{\fill}
\addtolength{\textfloatsep}{3em}
\renewcommand{\textfraction}{0.5}
\renewcommand{\topfraction}{0.5}
\renewcommand{\bottomfraction}{0.5}
\setcounter{totalnumber}{50}
\setcounter{topnumber}{50}
\setcounter{bottomnumber}{50}
% end floats for footnotes
% some commands, that could be overwritten in the style file.
\newcommand{\rubric}[1]{\subsection*{~\hfill {\it #1} \hfill ~}}
\newcommand{\titlereference}[1]{\textsl{#1}}
% end of "some commands"
\title{ReStructuredText (rst): plain text markup}
\author{}
\date{}
\hypersetup{
pdftitle={ReStructuredText (rst): plain text markup}
}
\raggedbottom
\begin{document}
\maketitle
\setlength{\locallinewidth}{\linewidth}
\hypertarget{the-tiny-table-of-contents}{}
\pdfbookmark[0]{The tiny table of contents}{the-tiny-table-of-contents}
\subsubsection*{~\hfill The tiny table of contents\hfill ~}
\begin{list}{}{}
\item {} \href{\#what-is-restructuredtext}{1~~~What is reStructuredText?}
\item {} \href{\#what-is-it-good-for}{2~~~What is it good for?}
\item {} \href{\#show-me-some-formatting-examples}{3~~~Show me some formatting examples}
\item {} \href{\#where-can-i-learn-more}{4~~~Where can I learn more?}
\item {} \href{\#show-me-some-more-stuff-please}{5~~~Show me some more stuff, please}
\end{list}
%___________________________________________________________________________
\hypertarget{what-is-restructuredtext}{}
\pdfbookmark[0]{1~~~What is reStructuredText?}{what-is-restructuredtext}
\section*{1~~~What is reStructuredText?}
An easy-to-read, what-you-see-is-what-you-get plaintext markup syntax
and parser system, abbreviated \emph{rst}. In other words, using a simple
text editor, documents can be created which
\begin{itemize}
\item {}
are easy to read in text editor and
\item {}
can be \emph{automatically} converted to
\begin{itemize}
\item {}
html and
\item {}
latex (and therefore pdf)
\end{itemize}
\end{itemize}
%___________________________________________________________________________
\hypertarget{what-is-it-good-for}{}
\pdfbookmark[0]{2~~~What is it good for?}{what-is-it-good-for}
\section*{2~~~What is it good for?}
reStructuredText can be used, for example, to
\begin{itemize}
\item {}
write technical documentation (so that it can easily be offered as a
pdf file or a web page)
\item {}
create html webpages without knowing html
\item {}
to document source code
\end{itemize}
%___________________________________________________________________________
\hypertarget{show-me-some-formatting-examples}{}
\pdfbookmark[0]{3~~~Show me some formatting examples}{show-me-some-formatting-examples}
\section*{3~~~Show me some formatting examples}
You can highlight text in \emph{italics} or, to provide even more emphasis
in \textbf{bold}. Often, when describing computer code, we like to use a
\texttt{fixed space font} to quote code snippets.
We can also include footnotes\raisebox{.5em}[0em]{\scriptsize\hyperlink{id3}{1}}. We could include source code files
(by specifying their name) which is useful when documenting code. We
can also copy source code verbatim (i.e. include it in the rst
document) like this:
\begin{quote}{\ttfamily \raggedright \noindent
int~main~(~int~argc,~char~*argv{[}{]}~)~{\{}~\\
~~~~printf("Hello~World{\textbackslash}n");~\\
~~~~return~0;~\\
{\}}
}\end{quote}
We have already seen at itemised list in section \href{\#what-is-it-good-for}{What is it good
for?}. Enumerated list and descriptive lists are supported as
well. It provides very good support for including html-links in a
variety of ways. Any section and subsections defined can be linked to,
as well.
%___________________________________________________________________________
\hypertarget{where-can-i-learn-more}{}
\pdfbookmark[0]{4~~~Where can I learn more?}{where-can-i-learn-more}
\section*{4~~~Where can I learn more?}
reStructuredText is described at
\href{http://docutils.sourceforge.net/rst.html}{http://docutils.sourceforge.net/rst.html}. We provide some geeky small
print in this footnote\raisebox{.5em}[0em]{\scriptsize\hyperlink{id4}{2}}.
%___________________________________________________________________________
\hypertarget{show-me-some-more-stuff-please}{}
\pdfbookmark[0]{5~~~Show me some more stuff, please}{show-me-some-more-stuff-please}
\section*{5~~~Show me some more stuff, please}
We can also include figures:
\begin{figure}[htbp]\begin{center}
\includegraphics[width=300pt]{image.png}
\caption{The magnetisation in a small ferromagnetic disk. The diametre is of the order of 120 nanometers and the material is Ni20Fe80. Png is a file format that is both acceptable for html pages as well as for (pdf)latex.}\end{center}\end{figure}
%___________________________________________________________________________
\hspace*{\fill}\hrulefill\hspace*{\fill}
\begin{figure}[b]\hypertarget{id3}$^{1}$
although there isn't much point of using a footnote here.
\end{figure}
\begin{figure}[b]\hypertarget{id4}$^{2}$
Random facts:
\begin{itemize}
\item {}
Emacs provides an rst mode
\item {}
when converting rst to html, a style sheet can be provided (there is a similar feature for latex)
\item {}
rst can also be converted into XML
\item {}
the recommended file extension for rst is \texttt{.txt}
\end{itemize}
\end{figure}
\end{document}