Contact Us!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: sagemathinc/cocalc-example-files
Path: blob/master/latex/multiple-files/master.tex
Views: 1002
1
\documentclass[12pt,
2
DIV=12,
3
twoside=false,
4
twocolumn=false,
5
abstraction,
6
%headsepline,
7
%footsepline,
8
%plainheadsepline,
9
%plainfootsepline,
10
dottedtoc,
11
headings=normal,
12
headinclude=true,
13
footinclude=true,
14
parskip=half]{scrbook}
15
16
\usepackage{subfiles}
17
18
\usepackage[USenglish]{babel}
19
% for German text, change this to
20
% \usepackage[ngerman]{babel}
21
\usepackage[utf8]{inputenc}
22
\usepackage[T1]{fontenc}
23
24
% avoid old unsafe commands
25
\RequirePackage[l2tabu,orthodox,abort]{nag}
26
\usepackage{fixltx2e}
27
28
\usepackage{typearea}
29
% \usepackage{layouts}
30
31
\usepackage[onehalfspacing]{setspace}
32
\raggedbottom
33
\usepackage{graphicx}
34
35
% font tweaks
36
\usepackage{ellipsis,ragged2e,marginnote}
37
\usepackage[tracking=true]{microtype}
38
\usepackage{cmbright}
39
%\usepackage[upright]{fourier}
40
\usepackage{inconsolata} % better monospaced font!
41
\renewcommand{\familydefault}{\sfdefault}
42
\setkomafont{sectioning}{\normalcolor\bfseries}
43
\setkomafont{disposition}{\normalcolor\bfseries}
44
45
\usepackage[small, bf, up, hang]{caption}
46
\usepackage[percent]{overpic}
47
48
\usepackage{mathtools}
49
\usepackage{nicefrac}
50
% unit[2.3]{N} and unitfrac[4.3]{Nm}{s}
51
\usepackage{units}
52
53
\usepackage{booktabs}
54
\usepackage{tabularx}
55
56
%%% Bibliography management
57
% quite popular is natbib, read about it here
58
% https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management
59
% \usepackage{natbib}
60
% for this document we use biblatex with the biber backend
61
% this works very well, also for special characters etc.
62
\usepackage[backend=bibtex,style=alphabetic]{biblatex}
63
% this file contains the literature database
64
\addbibresource{bibliography.bib}
65
66
\usepackage{multirow}
67
\usepackage{rotating}
68
\usepackage{sagetex}
69
\usepackage{color}
70
71
% usually, inside a text a LaTeX command needs a trailing \ or {}
72
% for a trailing space. xspace solves this by looking ahead and inserting
73
% it for you.
74
\usepackage{xspace}
75
% Hence, after this redefinition "\LaTeX is" properly gives "LaTeX is".
76
\let\orgLaTeX\LaTeX
77
\renewcommand*{\LaTeX}{\orgLaTeX\xspace}
78
79
% quick setup for page numbers in the footer
80
\usepackage[automark]{scrlayer-scrpage}
81
\clearpairofpagestyles
82
% \ihead{\leftmark}
83
% \ohead{\includegraphics[height=1cm]{IMG/Logo.JPG}}
84
\ofoot{\thepage}
85
86
\title{Multiple \LaTeX Source Files}
87
\subtitle{Howto handle this in CoCalc}
88
\author{Harald Schilly}
89
90
\begin{document}
91
92
\maketitle
93
94
\chapter{Introduction}
95
96
This is an overview about how to write a large \LaTeX document
97
with multiple input sources, where:
98
99
\begin{itemize}
100
\item all sub-documents can be previewed by rendering only the partial document,
101
\item the forward/inverse search works,
102
\item SageTeX~\cite{sagetex} is supported,
103
\item formulas, graphics and the advanced KOMAscript package are enabled.
104
\end{itemize}
105
106
107
\tableofcontents
108
109
\chapter{Setup}
110
111
The general setup of this document is best explained by reading the header
112
of the ``\texttt{master.tex}'' file.
113
114
\section{Bibliography}
115
116
The bibliography uses \texttt{biblatex} and \texttt{biber},
117
which works much more robust than the older \texttt{bibtex}.
118
The file ``\texttt{bibliography.bib}'' defines the references
119
in the usual bibtex format,
120
and the references work across all sub-documents.
121
It also directly supports special characters. For example, the \cite{komascript} reference contains the letter ``ü'',
122
which is processed and rendered without any issues.
123
124
The next chapters are sub-documents.
125
They briefly describe each individual aspect in more detail.
126
127
\subfile{10-make.tex}
128
\subfile{20-subfiles.tex}
129
\subfile{30-komascript.tex}
130
\subfile{40-sagetex.tex}
131
132
\chapter{Conclusion}
133
134
\printbibliography
135
136
\end{document}
137
138
%sagemathcloud={"latex_command":"make 'master.pdf'"}
139
140