Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
talks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osak
talks
Commits
809a0965
Commit
809a0965
authored
6 years ago
by
Valentin Bruch
Browse files
Options
Downloads
Patches
Plain Diff
latex: added slides with example document (in a fancy macro)
parent
6d73ca96
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
workshops/latex/handout.tex
+1
-1
1 addition, 1 deletion
workshops/latex/handout.tex
workshops/latex/latex.tex
+52
-15
52 additions, 15 deletions
workshops/latex/latex.tex
with
53 additions
and
16 deletions
workshops/latex/handout.tex
+
1
−
1
View file @
809a0965
...
@@ -357,7 +357,7 @@ Alternativ: \verb|margin=2cm| oder \verb|left=2cm, right=2.5cm|
...
@@ -357,7 +357,7 @@ Alternativ: \verb|margin=2cm| oder \verb|left=2cm, right=2.5cm|
%header, footer
%header, footer
%
%
\subsection
{
Sonstiges
}
\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[utf8]{inputenc}| (wenn man \texttt{pdflatex} verwendet)\\
%\verb|\usepackage[T1]{fontenc} |vermeidet Umlautprobleme\\
%\verb|\usepackage[T1]{fontenc} |vermeidet Umlautprobleme\\
%\verb|\usepackage{lmodern} |schönere Standard-\LaTeX-Schrift\\
%\verb|\usepackage{lmodern} |schönere Standard-\LaTeX-Schrift\\
...
...
This diff is collapsed.
Click to expand it.
workshops/latex/latex.tex
+
52
−
15
View file @
809a0965
...
@@ -55,20 +55,40 @@
...
@@ -55,20 +55,40 @@
und der Aachener Linux User Group
und der Aachener Linux User Group
}
}
\newlength\marginwidth
%Copied from
\newcommand\marginbox
[3][2pt]
{
%https://tex.stackexchange.com/questions/198091/get-number-of-pages-of-external-pdf
% USAGE: \marginbox[margin width]{width}{content}
\newcommand*
{
\pdfnumberofpages
}
[1]
{
%
\setlength\marginwidth
{
#1
}
\directlua
{
%
\begin{tikzpicture}
[even odd rule, scale=1]
local doc = epdf.open("
\luaescapestring
{
#1
}
")
\node
[anchor=north west]
(text)
{
%
local pages
\begin{minipage}
{
#2-2
\marginwidth
-10pt
}
%
if (doc) then
#3
%
pages = doc:getCatalog():getNumPages()
\end{minipage}
%
else
}
;
pages = 0
\begin{pgfonlayer}
{
background
}
end
\node
[draw opacity=.5, draw=blue, line width=#1, inner sep=2pt, fit = (text)]
{}
;
tex.write(pages)
\end{pgfonlayer}
}
%
\end{tikzpicture}
}
\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}
\begin{document}
...
@@ -225,6 +245,8 @@
...
@@ -225,6 +245,8 @@
\end{tikzpicture}
\end{tikzpicture}
\end{frame}
\end{frame}
\insertexample
[Nur Text]
{
beispieldokument/zeta
_
0.pdf
}
\subsection
{
Textformatierung
}
\subsection
{
Textformatierung
}
\begin{frame}
[fragile]
{
Formatierung
}
\begin{frame}
[fragile]
{
Formatierung
}
\structure
{
Schrifteinstellungen:
}
\structure
{
Schrifteinstellungen:
}
...
@@ -299,6 +321,8 @@
...
@@ -299,6 +321,8 @@
\end{tikzpicture}
\end{tikzpicture}
\end{frame}
\end{frame}
\insertexample
[Textformatierung]
{
beispieldokument/zeta
_
1.pdf
}
\subsection
{
Abschnitte
}
\subsection
{
Abschnitte
}
\begin{frame}
[fragile]
{
Abschnitte
}
\begin{frame}
[fragile]
{
Abschnitte
}
\begin{columns}
\begin{columns}
...
@@ -324,6 +348,8 @@
...
@@ -324,6 +348,8 @@
\end{columns}
\end{columns}
\end{frame}
\end{frame}
\insertexample
[Abschnitte]
{
beispieldokument/zeta
_
2.pdf
}
\subsection
{
Umgebungen
}
\subsection
{
Umgebungen
}
\begin{frame}
[fragile]
{
Umgebungen
}
\begin{frame}
[fragile]
{
Umgebungen
}
\begin{itemize}
\begin{itemize}
...
@@ -377,6 +403,8 @@
...
@@ -377,6 +403,8 @@
\end{tikzpicture}
\end{tikzpicture}
\end{frame}
\end{frame}
\insertexample
[Umgebungen]
{
beispieldokument/zeta
_
3.pdf
}
\newcommand
{
\highlightRed
}
[1]
{{
\color
{
Mahogany
}
\texttt
{
\bfseries
#1
}}}
\newcommand
{
\highlightRed
}
[1]
{{
\color
{
Mahogany
}
\texttt
{
\bfseries
#1
}}}
\newcommand
{
\highlightBlu
}
[1]
{{
\color
{
RoyalBlue
}
\texttt
{
\bfseries
#1
}}}
\newcommand
{
\highlightBlu
}
[1]
{{
\color
{
RoyalBlue
}
\texttt
{
\bfseries
#1
}}}
...
@@ -542,13 +570,14 @@
...
@@ -542,13 +570,14 @@
\end{tikzpicture}
\end{tikzpicture}
\end{frame}
\end{frame}
\subsection
{
Detexify
}
\begin{frame}
{
Detexify
}{
\url
{
http://detexify.kirelabs.org
}}
\begin{frame}
{
Detexify
}{
\url
{
http://detexify.kirelabs.org
}}
\vspace
{
-18pt
}
\vspace
{
-18pt
}
\includegraphics
[width=\textwidth]
{
figures/detexify.png
}
\includegraphics
[width=\textwidth]
{
figures/detexify.png
}
\note
[\centering]
{
\large
auf
\texttt
{
\textbackslash
usepackage
}
achten!
}
%
\note
[\centering]
{
\large
auf
\texttt
{
\textbackslash
usepackage
}
achten!
}
%
\end{frame}
\end{frame}
\insertexample
[Mathematik]
{
beispieldokument/zeta
_
4.pdf
}
\section
{
Bilder und Tabellen
}
\section
{
Bilder und Tabellen
}
\begin{frame}
[fragile]
{
Bilder
\&
Tabellen
}
\begin{frame}
[fragile]
{
Bilder
\&
Tabellen
}
\begin{itemize}
\begin{itemize}
...
@@ -590,6 +619,8 @@
...
@@ -590,6 +619,8 @@
\end{itemize}
\end{itemize}
\end{frame}
\end{frame}
\insertexample
[Bilder]
{
beispieldokument/zeta
_
5.pdf
}
\subsection
{
Floats
}
\subsection
{
Floats
}
\begin{frame}
[fragile]
{
Abbildungen mit
\glqq
{}
Floats
\grqq
{}}
\begin{frame}
[fragile]
{
Abbildungen mit
\glqq
{}
Floats
\grqq
{}}
\begin{columns}
\begin{columns}
...
@@ -634,6 +665,8 @@
...
@@ -634,6 +665,8 @@
\end{columns}
\end{columns}
\end{frame}
\end{frame}
\insertexample
[Floats]
{
beispieldokument/zeta
_
6.pdf
}
\section
{
Labels und Referenzen
}
\section
{
Labels und Referenzen
}
\begin{frame}
[fragile]
{
Labels, Referenzen und Links
}
\begin{frame}
[fragile]
{
Labels, Referenzen und Links
}
\structure
{
Referenzen
}
markieren mit
\structure
{
Referenzen
}
markieren mit
...
@@ -684,6 +717,8 @@
...
@@ -684,6 +717,8 @@
\end{tikzpicture}
\end{tikzpicture}
\end{frame}
\end{frame}
\insertexample
[Referenzen]
{
beispieldokument/zeta
_
7.pdf
}
\begin{frame}
[fragile]
{
Verschiedenes
}
\begin{frame}
[fragile]
{
Verschiedenes
}
\structure
{
Fußnoten:
}
\structure
{
Fußnoten:
}
\begin{itemize}
\begin{itemize}
...
@@ -725,6 +760,8 @@
...
@@ -725,6 +760,8 @@
\end{itemize}
\end{itemize}
\end{frame}
\end{frame}
\insertexample
[Fußnoten]
{
beispieldokument/zeta
_
8.pdf
}
\section
{
Präambel
}
\section
{
Präambel
}
\begin{frame}
[fragile]
{
Präambel
}
\begin{frame}
[fragile]
{
Präambel
}
\begin{columns}
\begin{columns}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment