Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Projects
Groups
Snippets
Sign up now
Login
Sign in
Toggle navigation
Menu
Open sidebar
osak
talks
Commits
809a0965
Commit
809a0965
authored
Jun 04, 2019
by
Valentin Bruch
Browse files
latex: added slides with example document (in a fancy macro)
parent
6d73ca96
Changes
2
Hide whitespace changes
Inline
Side-by-side
workshops/latex/handout.tex
View file @
809a0965
...
...
@@ -357,7 +357,7 @@ Alternativ: \verb|margin=2cm| oder \verb|left=2cm, right=2.5cm|
%header, footer
%
\subsection
{
Sonstiges
}
% TODO: Beamer oder Polyglossia?
% TODO: Beamer oder Polyglossia?
Legacy oder lualatex/xelatex?
%\verb|\usepackage[utf8]{inputenc}| (wenn man \texttt{pdflatex} verwendet)\\
%\verb|\usepackage[T1]{fontenc} |vermeidet Umlautprobleme\\
%\verb|\usepackage{lmodern} |schönere Standard-\LaTeX-Schrift\\
...
...
workshops/latex/latex.tex
View file @
809a0965
...
...
@@ -55,20 +55,40 @@
und der Aachener Linux User Group
}
\newlength\marginwidth
\newcommand\marginbox
[3][2pt]
{
% USAGE: \marginbox[margin width]{width}{content}
\setlength\marginwidth
{
#1
}
\begin{tikzpicture}
[even odd rule, scale=1]
\node
[anchor=north west]
(text)
{
%
\begin{minipage}
{
#2-2
\marginwidth
-10pt
}
%
#3
%
\end{minipage}
%
}
;
\begin{pgfonlayer}
{
background
}
\node
[draw opacity=.5, draw=blue, line width=#1, inner sep=2pt, fit = (text)]
{}
;
\end{pgfonlayer}
\end{tikzpicture}
%Copied from
%https://tex.stackexchange.com/questions/198091/get-number-of-pages-of-external-pdf
\newcommand*
{
\pdfnumberofpages
}
[1]
{
%
\directlua
{
%
local doc = epdf.open("
\luaescapestring
{
#1
}
")
local pages
if (doc) then
pages = doc:getCatalog():getNumPages()
else
pages = 0
end
tex.write(pages)
}
%
}
\newcommand\insertexample
[2][]
{
%
{
\setbeamercolor
{
background canvas
}{
bg=gray!10!white
}
\begin{frame}
\def\tmp
{
#1
}
\ifx\tmp\empty
%
\frametitle
{
Beispiel
}
%
\else
%
\frametitle
{
Beispiel: #1
}
%
\fi
%
\vspace*
{
-3.8pt
}
%
\ifnum\pdfnumberofpages
{
#2
}
<2
%
\centering
%
\colorbox
{
white
}{
\includegraphics
[width=.67\textwidth]
{
#2
}}
%
\else
%
\colorbox
{
white
}{
\includegraphics
[width=.48\textwidth, page=1]
{
#2
}}
%
\hfill
%
\colorbox
{
white
}{
\includegraphics
[width=.48\textwidth, page=2]
{
#2
}}
%
\fi
%
\end{frame}
}
}
\begin{document}
...
...
@@ -225,6 +245,8 @@
\end{tikzpicture}
\end{frame}
\insertexample
[Nur Text]
{
beispieldokument/zeta
_
0.pdf
}
\subsection
{
Textformatierung
}
\begin{frame}
[fragile]
{
Formatierung
}
\structure
{
Schrifteinstellungen:
}
...
...
@@ -299,6 +321,8 @@
\end{tikzpicture}
\end{frame}
\insertexample
[Textformatierung]
{
beispieldokument/zeta
_
1.pdf
}
\subsection
{
Abschnitte
}
\begin{frame}
[fragile]
{
Abschnitte
}
\begin{columns}
...
...
@@ -324,6 +348,8 @@
\end{columns}
\end{frame}
\insertexample
[Abschnitte]
{
beispieldokument/zeta
_
2.pdf
}
\subsection
{
Umgebungen
}
\begin{frame}
[fragile]
{
Umgebungen
}
\begin{itemize}
...
...
@@ -377,6 +403,8 @@
\end{tikzpicture}
\end{frame}
\insertexample
[Umgebungen]
{
beispieldokument/zeta
_
3.pdf
}
\newcommand
{
\highlightRed
}
[1]
{{
\color
{
Mahogany
}
\texttt
{
\bfseries
#1
}}}
\newcommand
{
\highlightBlu
}
[1]
{{
\color
{
RoyalBlue
}
\texttt
{
\bfseries
#1
}}}
...
...
@@ -542,13 +570,14 @@
\end{tikzpicture}
\end{frame}
\subsection
{
Detexify
}
\begin{frame}
{
Detexify
}{
\url
{
http://detexify.kirelabs.org
}}
\vspace
{
-18pt
}
\includegraphics
[width=\textwidth]
{
figures/detexify.png
}
\note
[\centering]
{
\large
auf
\texttt
{
\textbackslash
usepackage
}
achten!
}
%
\end{frame}
\insertexample
[Mathematik]
{
beispieldokument/zeta
_
4.pdf
}
\section
{
Bilder und Tabellen
}
\begin{frame}
[fragile]
{
Bilder
\&
Tabellen
}
\begin{itemize}
...
...
@@ -590,6 +619,8 @@
\end{itemize}
\end{frame}
\insertexample
[Bilder]
{
beispieldokument/zeta
_
5.pdf
}
\subsection
{
Floats
}
\begin{frame}
[fragile]
{
Abbildungen mit
\glqq
{}
Floats
\grqq
{}}
\begin{columns}
...
...
@@ -634,6 +665,8 @@
\end{columns}
\end{frame}
\insertexample
[Floats]
{
beispieldokument/zeta
_
6.pdf
}
\section
{
Labels und Referenzen
}
\begin{frame}
[fragile]
{
Labels, Referenzen und Links
}
\structure
{
Referenzen
}
markieren mit
...
...
@@ -684,6 +717,8 @@
\end{tikzpicture}
\end{frame}
\insertexample
[Referenzen]
{
beispieldokument/zeta
_
7.pdf
}
\begin{frame}
[fragile]
{
Verschiedenes
}
\structure
{
Fußnoten:
}
\begin{itemize}
...
...
@@ -725,6 +760,8 @@
\end{itemize}
\end{frame}
\insertexample
[Fußnoten]
{
beispieldokument/zeta
_
8.pdf
}
\section
{
Präambel
}
\begin{frame}
[fragile]
{
Präambel
}
\begin{columns}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment