-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.tex
232 lines (185 loc) · 12.2 KB
/
main.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
\documentclass{article}
% This is a template of pdf that can show its own MD5.
%
% To generate the correct MD5 code for the document, please
% do not change the code in the header except the filename of
% the 32 figures (numa-nump, numA-numP) or the height or kern
% of the figures.
%
% After changing the content of other part of the pdf as you need,
% please recompile the main.tex to pdf, get the MD5 of the new pdf,
% and change the following figure name accordingly.
%
% The following header represents the MD5:
% a85c4ff61d17566cc45af234fbfe84e3
%
% For more information please visit:
% https://github.com/zhuzilin/pdf-template-with-its-md5
%
% ------------- START OF MD5 HEADER ---------------
% Please do not change the following
% Change the images here.
\immediate\pdfximage height 7pt {processed/1/A.jpg}
\edef\numa{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/2/8.jpg}
\edef\numb{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/3/5.jpg}
\edef\numc{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/4/C.jpg}
\edef\numd{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/5/4.jpg}
\edef\nume{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/6/F.jpg}
\edef\numf{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/7/F.jpg}
\edef\numg{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/8/6.jpg}
\edef\numh{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/9/1.jpg}
\edef\numi{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/10/D.jpg}
\edef\numj{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/11/1.jpg}
\edef\numk{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/12/7.jpg}
\edef\numl{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/13/5.jpg}
\edef\numm{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/14/6.jpg}
\edef\numn{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/15/6.jpg}
\edef\numo{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/16/C.jpg}
\edef\nump{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/17/C.jpg}
\edef\numA{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/18/4.jpg}
\edef\numB{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/19/5.jpg}
\edef\numC{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/20/A.jpg}
\edef\numD{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/21/F.jpg}
\edef\numE{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/22/2.jpg}
\edef\numF{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/23/3.jpg}
\edef\numG{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/24/4.jpg}
\edef\numH{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/25/F.jpg}
\edef\numI{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/26/B.jpg}
\edef\numJ{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/27/F.jpg}
\edef\numK{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/28/E.jpg}
\edef\numL{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/29/8.jpg}
\edef\numM{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/30/4.jpg}
\edef\numN{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/31/E.jpg}
\edef\numO{\kern 0pt \pdfrefximage\the\pdflastximage}
\immediate\pdfximage height 7pt {processed/32/3.jpg}
\edef\numP{\kern 0pt \pdfrefximage\the\pdflastximage}
\edef\blockA{\numa{}\numb{}\numc{}\numd{}\nume{}\numf{}\numg{}\numh{}}
\edef\blockB{\numi{}\numj{}\numk{}\numl{}\numm{}\numn{}\numo{}\nump{}}
\edef\blockC{\numA{}\numB{}\numC{}\numD{}\numE{}\numF{}\numG{}\numH{}}
\edef\blockD{\numI{}\numJ{}\numK{}\numL{}\numM{}\numN{}\numO{}\numP{}}
\edef\MDFIVE{\blockA{}\blockB{}\blockC{}\blockD{}}
% Use the following 2 lines to make the pdf reproducible.
% https://tex.stackexchange.com/questions/229605/reproducible-latex-builds-compile-to-a-file-which-always-hashes-to-the-same-va
\pdfinfoomitdate=1
\pdftrailerid{}
% -------------- END OF MD5 HEADER ----------------
% Language setting
% Replace `english' with e.g. `spanish' to change the document language
\usepackage[english]{babel}
% Set page size and margins
% Replace `letterpaper' with`a4paper' for UK/EU standard size
\usepackage[letterpaper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
\usepackage{amsmath}
\usepackage{fancyhdr}
\usepackage{hyperref}
\usepackage{graphicx}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.5pt}
\fancypagestyle{firstpage}{
\fancyhf{}
\fancyfoot[L]{
MD5 of this document:\MDFIVE{}
}
\fancyfoot[R]{}
}
\title{Your Paper}
\author{You}
\begin{document}
\maketitle
\thispagestyle{firstpage}
\begin{abstract}
This is a template to create a pdf document with its own MD5 attached. Apart from the MD5 code attached in the footer of the first page, the rest of the document is the same as the example project of \href{https://www.overleaf.com/project}{Overleaf}. For more information on how to use this template, please visit:
\href{https://github.com/zhuzilin/pdf-template-with-its-md5}{https://github.com/zhuzilin/pdf-template-with-its-md5}
\bigbreak
Your abstract.
\end{abstract}
\section{Introduction}
Your introduction goes here! Simply start writing your document and use the Recompile button to view the updated PDF preview. Examples of commonly used commands and features are listed below, to help you get started.
Once you're familiar with the editor, you can find various project setting in the Overleaf menu, accessed via the button in the very top left of the editor. To view tutorials, user guides, and further documentation, please visit our \href{https://www.overleaf.com/learn}{help library}, or head to our plans page to \href{https://www.overleaf.com/user/subscription/plans}{choose your plan}.
\section{Some examples to get started}
\subsection{How to create Sections and Subsections}
Simply use the section and subsection commands, as in this example document! With Overleaf, all the formatting and numbering is handled automatically according to the template you've chosen. If you're using Rich Text mode, you can also create new section and subsections via the buttons in the editor toolbar.
\subsection{How to include Figures}
First you have to upload the image file from your computer using the upload link in the file-tree menu. Then use the includegraphics command to include it in your document. Use the figure environment and the caption command to add a number and a caption to your figure. See the code for Figure \ref{fig:frog} in this section for an example.
Note that your figure will automatically be placed in the most appropriate place for it, given the surrounding text and taking into account other figures or tables that may be close by. You can find out more about adding images to your documents in this help article on \href{https://www.overleaf.com/learn/how-to/Including_images_on_Overleaf}{including images on Overleaf}.
\begin{figure}
\centering
\includegraphics[width=0.3\textwidth]{frog.jpg}
\caption{\label{fig:frog}This frog was uploaded via the file-tree menu.}
\end{figure}
\subsection{How to add Tables}
Use the table and tabular environments for basic tables --- see Table~\ref{tab:widgets}, for example. For more information, please see this help article on \href{https://www.overleaf.com/learn/latex/tables}{tables}.
\begin{table}
\centering
\begin{tabular}{l|r}
Item & Quantity \\\hline
Widgets & 42 \\
Gadgets & 13
\end{tabular}
\caption{\label{tab:widgets}An example table.}
\end{table}
\subsection{How to add Comments and Track Changes}
Comments can be added to your project by highlighting some text and clicking ``Add comment'' in the top right of the editor pane. To view existing comments, click on the Review menu in the toolbar above. To reply to a comment, click on the Reply button in the lower right corner of the comment. You can close the Review pane by clicking its name on the toolbar when you're done reviewing for the time being.
Track changes are available on all our \href{https://www.overleaf.com/user/subscription/plans}{premium plans}, and can be toggled on or off using the option at the top of the Review pane. Track changes allow you to keep track of every change made to the document, along with the person making the change.
\subsection{How to add Lists}
You can make lists with automatic numbering \dots
\begin{enumerate}
\item Like this,
\item and like this.
\end{enumerate}
\dots or bullet points \dots
\begin{itemize}
\item Like this,
\item and like this.
\end{itemize}
\subsection{How to write Mathematics}
\LaTeX{} is great at typesetting mathematics. Let $X_1, X_2, \ldots, X_n$ be a sequence of independent and identically distributed random variables with $\text{E}[X_i] = \mu$ and $\text{Var}[X_i] = \sigma^2 < \infty$, and let
\[S_n = \frac{X_1 + X_2 + \cdots + X_n}{n}
= \frac{1}{n}\sum_{i}^{n} X_i\]
denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge in distribution to a normal $\mathcal{N}(0, \sigma^2)$.
\subsection{How to change the margins and paper size}
Usually the template you're using will have the page margins and paper size set correctly for that use-case. For example, if you're using a journal article template provided by the journal publisher, that template will be formatted according to their requirements. In these cases, it's best not to alter the margins directly.
If however you're using a more general template, such as this one, and would like to alter the margins, a common way to do so is via the geometry package. You can find the geometry package loaded in the preamble at the top of this example file, and if you'd like to learn more about how to adjust the settings, please visit this help article on \href{https://www.overleaf.com/learn/latex/page_size_and_margins}{page size and margins}.
\subsection{How to change the document language and spell check settings}
Overleaf supports many different languages, including multiple different languages within one document.
To configure the document language, simply edit the option provided to the babel package in the preamble at the top of this example project. To learn more about the different options, please visit this help article on \href{https://www.overleaf.com/learn/latex/International_language_support}{international language support}.
To change the spell check language, simply open the Overleaf menu at the top left of the editor window, scroll down to the spell check setting, and adjust accordingly.
\subsection{How to add Citations and a References List}
You can simply upload a \verb|.bib| file containing your BibTeX entries, created with a tool such as JabRef. You can then cite entries from it, like this: \cite{greenwade93}. Just remember to specify a bibliography style, as well as the filename of the \verb|.bib|. You can find a \href{https://www.overleaf.com/help/97-how-to-include-a-bibliography-using-bibtex}{video tutorial here} to learn more about BibTeX.
If you have an \href{https://www.overleaf.com/user/subscription/plans}{upgraded account}, you can also import your Mendeley or Zotero library directly as a \verb|.bib| file, via the upload menu in the file-tree.
\subsection{Good luck!}
We hope you find Overleaf useful, and do take a look at our \href{https://www.overleaf.com/learn}{help library} for more tutorials and user guides! Please also let us know if you have any feedback using the Contact Us link at the bottom of the Overleaf menu --- or use the contact form at \url{https://www.overleaf.com/contact}.
\bibliographystyle{alpha}
\bibliography{sample}
\end{document}