-
Notifications
You must be signed in to change notification settings - Fork 19
/
app_latex.tex
101 lines (69 loc) · 2.08 KB
/
app_latex.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
\begin{center}
\includegraphics[width=5cm]{images/latex/latex_humour}
\end{center}
%----------------------------
\subsection*{newcommand}
This features allows to define new commands which can then be used throughout the document.
In {\filenamefont manual.tex} you will find
\begin{verbatim}
\newcommand{\K}{{\mathbb{K}}}
\newcommand{\Ranb}{{\mathsf{Ra}}}
\newcommand{\nineteeneightysix}{{\color{violet}\bf 1986}}
\end{verbatim}
which correspond to $\K$, $\Ranb$ and \nineteeneightysix.
%----------------------------
\subsection*{fullpage package}
How to extend margins for the whole document (such as this one):
\begin{verbatim}
\usepackage[cm]{fullpage}
\end{verbatim}
%----------------------------
\subsection*{siunitx package}
\begin{verbatim}
\usepackage{siunitx}
\DeclareSIUnit\year{yr}
\end{verbatim}
%----------------------------
\subsection*{tikz}
\begin{verbatim}
\usetikzlibrary{arrows, arrows.meta}
\end{verbatim}
%----------------------------
\subsection*{include verbatim material inside a line}
\begin{verbatim}
\verb"git pull upstream master" and then eat an ice cream.
\end{verbatim}
results in
\verb"git pull upstream master" and then eat an ice cream.
%------------------------------
\subsection*{bibliography}
opla
\verb|\footfullcite|
%------------------------------
\subsection*{how to refer to a latex document from another document?}
This is the first latex file names {\tt manual.tex}. It contains sections and equations, all labelled.
\begin{verbatim}
\documentclass[a4paper]{book}
\begin{document}
\chapter{opla1} \label{ch1}
\section{meuh} \label{ss1}
\subsection{popo}
opla \ref{ch1} opla \ref{ss1}
\begin{equation}
\alpha= \beta \label{eq:one}
\end{equation}
\end{document}
\end{verbatim}
This second file will load the {\tt manual.aux} with the 'xr' package
and then all labels of that file are now available in this file:
\begin{verbatim}
\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{xr}
\externaldocument[MMM-]{manual}
\begin{document}
opla
the introduction to volume1 (\ref{MMM-ss1})
see \eqref{MMM-eq:one}
\end{document}
\end{verbatim}