Default Latex Template
I get frustrated every time I install latex and TeXnicCenter and wish to display some formulas or write a short essay and realize that there are no templates whatsoever that I could use. Then I get frustrated even more when I realize that I cannot even remember the most basic latex lines to start a new document. The last time that happened, I decided to add a small template here, so I – and hopefully some other dudes – shall simply copy the code and start a new latex document immediately!
There you go:
1 2 3 4 5 | \documentclass[a4paper,12pt]{report} \usepackage{amsmath,amssymb,amsthm} \begin{document} text \end{document} |
The following template could be employed for a more advanced text, such as a thesis:
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 | \documentclass[a4paper,twoside,12pt]{scrbook} \usepackage{amsmath,amssymb,amsthm} \usepackage[footnotesize,sl,SL,hang,tight]{subfigure} % helpful package for aligning figures next to each other \usepackage{longtable} % tables over several pages \usepackage[font={small,sl},hang,labelfont=bf]{caption} % configure captions \usepackage{captcont} % continue sufigures over several pages \usepackage{booktabs} % publication quality tables for LaTeX %\usepackage{showkeys} % shows the labels above the references for easier development \usepackage{mathrsfs} \ifpdfoutput{% \usepackage[pdftex]{graphicx} \usepackage[]{pdfpages} %for including full pdf pages }{% \usepackage{graphicx} } \usepackage{wrapfig} % wraping text around figures \usepackage{rotating} % rotate figures \usepackage{verbatim} % multiline comment \usepackage{algorithmic} \usepackage[headinclude]{scrpage2} %\KOMAoptions{headinclude} % Font packages: \usepackage{times} \usepackage{helvet} % sets sans serif font \usepackage[T1]{fontenc} %\usepackage{lmodern} %PDF hyperref config \ifpdfoutput{% \usepackage[pdftex, a4paper, bookmarks, bookmarksopen=true, bookmarksnumbered=true, pdfauthor={Alfredo Albino}, pdftitle={My Life And More}, colorlinks, linkcolor=black, citecolor=black, filecolor=black, urlcolor=black, anchorcolor=black, menucolor=black, breaklinks=true, pageanchor=true, plainpages=false, pdfpagelabels=true]{hyperref} }{} \ifpdfoutput{% \pdfcompresslevel=9 \pdfoutput=1 \DeclareGraphicsExtensions{.pdf,.png} }{} \bibliographystyle{alpha} \pagestyle{useheadings} % A4 \topmargin -0.5in \textheight 9.3in \textwidth 6.3in \oddsidemargin 0.18in \evensidemargin -0.22in \parskip 0.1in \parindent 0in \renewcommand{\arraystretch}{1.5} \renewcommand{\baselinestretch}{1} \begin{document} \begin{titlepage} \topmargin 1.0cm \oddsidemargin 0.0cm \evensidemargin 0.0cm %\textwidth 6.5in \centering \Huge \vspace{2.0cm} \textbf{\textsf{My Life And More}} \\[1.5cm] %\includegraphics*[width=0.4\textwidth]{image} \\[1.5cm] \vspace{2.0cm} \sffamily \Large Alfredo Albino \\[0.8cm] \large BEST University \\ August 2010 \\[1.3cm] Prof. Dr. Alfons Aareweg \vfill %\includegraphics*[width=0.3\textwidth]{logo1} \hfill %\includegraphics*[width=0.3\textwidth]{logo2} \vspace{3.4cm} \end{titlepage} \cleardoublepage \pagenumbering{roman} \setcounter{page}{1} %\include{abstract} \chapter*{Abstract} abstract stuff \cleardoublepage \cleardoublepage %\include{acknowledgment} \chapter*{Acknowledgment} thanks \tableofcontents \cleardoublepage \pagenumbering{arabic} \renewcommand*{\chapterformat}{} % show chapter titles only (no numbers) %\include{chapter1} \chapter{Start} \section{Now} start \appendix \clearpage %\renewcommand*{\chapterpagestyle}{myappendixpagestyle} \addcontentsline{toc}{chapter}{List of Figures} \listoffigures \cleardoublepage \addcontentsline{toc}{chapter}{List of Tables} \listoftables \cleardoublepage \clearpage \renewcommand*{\chapterpagestyle}{empty} %\nocite{*} \addcontentsline{toc}{chapter}{Bibliography} %\bibliography{bib} \end{document} |