Swarmlab docs

Application development in a distributed system

Development of Distributed Systems from Design to Application


You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

195 lines
4.2 KiB

3 years ago
= examples
3 years ago
3 years ago
== Bold, italics and underlining
3 years ago
3 years ago
set of examples
3 years ago
3 years ago
[source,latex]
3 years ago
----
3 years ago
The following example collects the various code fragments contained in this article so that you can open them all together in Overleaf.
3 years ago
3 years ago
First example, bold, italics and underline:
3 years ago
3 years ago
Some of the \textbf{greatest} discoveries in \underline{science} were made by \textbf{\emph{accident}}.
3 years ago
3 years ago
\vspace{1.5cm}
3 years ago
3 years ago
Example of italicized text:
3 years ago
3 years ago
Some of the greatest discoveries in science were made by \emph{accident}.
3 years ago
3 years ago
\vspace{1.5cm}
3 years ago
3 years ago
Example of boldface text:
3 years ago
3 years ago
Some of the \textbf{greatest} discoveries in science were made by accident.
3 years ago
3 years ago
\vspace{1.5cm}
3 years ago
3 years ago
Example of underlined text:
3 years ago
3 years ago
Some of the greatest discoveries in \underline{science} were made by accident.
3 years ago
3 years ago
\vspace{1.5cm}
3 years ago
3 years ago
Example of emphasized text in different contexts:
3 years ago
3 years ago
Some of the greatest \emph{discoveries} in science were made by accident.
3 years ago
3 years ago
\textit{Some of the greatest \emph{discoveries} in science were made by accident.}
3 years ago
3 years ago
\textbf{Some of the greatest \emph{discoveries} in science were made by accident.}
3 years ago
----
3 years ago
== Font sizes, families, and styles
3 years ago
3 years ago
set of examples
[source,latex]
3 years ago
----
3 years ago
\documentclass{article}
\begin{document}
%Example of different font sizes and types
This is a simple example, {\tiny this will show different font sizes} and also \textsc{different font styles}.
3 years ago
3 years ago
\vspace{1cm}
3 years ago
3 years ago
%Example of different font sizes and types
In this example the {\huge huge font size} is set and the {\footnotesize Foot note size also}. There's a fairly large set of font sizes.
3 years ago
3 years ago
\vspace{1cm}
3 years ago
3 years ago
%Example of different font sizes and types
In this example, a command and a switch are used. \texttt{A command is used to change the style of a sentence}.
3 years ago
3 years ago
\sffamily
A switch changes the style from this point to the end of the document unless another switch is used.
\rmfamily
3 years ago
3 years ago
\vspace{1cm}
3 years ago
3 years ago
%Example of different font sizes and types
Part of this text is written \textsl{in different font style} to highlight it.
\end{document}
----
3 years ago
3 years ago
== Font typefaces
3 years ago
3 years ago
set of examples
[source,latex]
3 years ago
----
3 years ago
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tgbonum}
3 years ago
3 years ago
\begin{document}
This document is a sample document to
test font families and font typefaces.
3 years ago
3 years ago
{\fontfamily{qcr}\selectfont
This text uses a different font typeface
}
\end{document}
----
3 years ago
3 years ago
== Paragraph formatting
3 years ago
3 years ago
set of examples
[source,latex]
3 years ago
----
3 years ago
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
3 years ago
3 years ago
\setlength{\parindent}{4em}
\setlength{\parskip}{1em}
\renewcommand{\baselinestretch}{2.0}
3 years ago
3 years ago
\begin{document}
This is the first paragraph, contains some text to test the paragraph
interlining, paragraph indentation and some other features. Also, is
easy to see how new paragraphs are defined by simply entering a double
blank space.
3 years ago
3 years ago
Hello, here is some text without a meaning. This text should
show what a printed text will look like at this...
3 years ago
3 years ago
\end{document}
3 years ago
----
3 years ago
== Line breaks and blank spaces
3 years ago
3 years ago
set of examples
[source,latex]
3 years ago
----
3 years ago
\begin{document}
Something in this document. This paragraph contains no information and
its purposes is to provide an example on how to insert white spaces
and lines breaks.\\
When a line break is inserted, the text is not indented, there are a
couple of extra commands do line breaks. \newline
This paragraph provides no information whatsoever. We are exploring
line breaks. \hfill \break
And combining two commands
...
...
3 years ago
3 years ago
\begin{figure}
\centering
\includegraphics[width=3cm]{overleaf-logo}
\caption{Overleaf logo}
\end{figure}
3 years ago
----
3 years ago
== Text alignment
3 years ago
3 years ago
set of examples
[source,latex]
3 years ago
----
3 years ago
\begin{document}
\setlength{\hsize}{0.9\hsize}% emphasize effects
3 years ago
3 years ago
\subsection*{Left-aligned example with
\texttt{\string\raggedright}\\ (standard \LaTeX{} command)}
\raggedright\blindtext[2]\par
3 years ago
3 years ago
\subsection*{Left-aligned example with \texttt{\string\RaggedRight}\\ (\texttt{ragged2e} command)}
\RaggedRight\blindtext[2]\par
\end{document}
----
3 years ago
3 years ago
== Multiple columns
3 years ago
3 years ago
set of examples
[source,latex]
3 years ago
----
3 years ago
\begin{document}
\maketitle
3 years ago
3 years ago
\begin{multicols}{3}
[
\section{First Section}
All human things are subject to decay. And when fate summons, Monarchs must obey.
]
\blindtext\blindtext
\end{multicols}
3 years ago
----
3 years ago
== fonts
3 years ago
3 years ago
https://fonts.google.com/[fonts^]
3 years ago
3 years ago
set of examples
[source,latex]
3 years ago
----
----
3 years ago
https://www.overleaf.com/learn/latex/XeLaTeX#Further_reading[origin^]