Last active
December 8, 2019 04:40
-
-
Save mwadman/a3443e3a6e5ceac57ac4961d6c607e0e to your computer and use it in GitHub Desktop.
A Tex file with multiple examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[]{article} | |
\usepackage[utf8]{inputenc} | |
%%%%%%%%%%%% | |
% Packages % | |
%%%%%%%%%%%% | |
% Page Geometry (Size, Margins) | |
\usepackage{geometry} | |
\geometry{ | |
a4paper, % Sets paper sizing to A4. Can also be set to 'letterpaper'. | |
top=20mm, % Sets top margin | |
bottom=20mm, % Sets bottom margin | |
left=20mm, % Sets left margin | |
right=20mm, % Sets right margin | |
} | |
% Fancy Header (And Footer) Package | |
\usepackage{fancyhdr} | |
\pagestyle{fancy} | |
\fancyhf{} | |
\renewcommand{\headrulewidth}{0pt} | |
\lfoot{\today} | |
\cfoot{\name} | |
\rfoot{\thepage} | |
% Hyperlinks | |
\usepackage[bookmarks=false]{hyperref} % Disables bookmarks when opened in PDF viewer. Needs to be set in \usepackage for some reason | |
\hypersetup{ | |
colorlinks=false, % Do not color links | |
pdftitle={PDF Title}, % As shown when opened in PDF viewer | |
} | |
\urlstyle{same} % If unset, links are shown in monospace font | |
% Typeface/Font | |
\usepackage[T1]{fontenc} | |
\usepackage[sfdefault]{roboto} | |
% Font Awesome Icons | |
\usepackage{fontawesome} | |
%%%%%%%%%%%%%%%%%% | |
% Begin Document % | |
%%%%%%%%%%%%%%%%%% | |
\begin{document} | |
% Centered text | |
\begin{center} | |
centered text | |
\end{center} | |
% Parted Text | |
Left Side \hfill Right Side | |
% Example Bulleted List | |
\begin{itemize} | |
\item Item. | |
\item Another Item. | |
\end{itemize} | |
% Example Numbered List | |
\begin{enumerate} | |
\item First Item. | |
\item Second Item. | |
\end{enumerate} | |
% Example Lines | |
\noindent\rule{\textwidth}{1pt} % Horizontal Line within margins | |
Text Here \hrulefill % Draws line to end of margin | |
% Example text formatting | |
\textbf{bold text} | |
\underline{underlined text} | |
\textit{italicised text} | |
\textsl{slanted, but not quite italicised text} | |
\textsc{Small Caps text} | |
% Example Text Sizes | |
{\tiny tiny} % Normal -3 | |
{\scriptsize script} % Normal -2 | |
{\footnotesize footnote} % Normal -1 | |
{\small small} % Normal -1 | |
{\normalsize normal} | |
{\large large +1} % Normal +1 | |
{\Large Large +2} % Normal +2 | |
{\LARGE LARGE +3} % Normal +3 | |
{\huge huge +4} % Normal +4 | |
{\Huge Huge +5} % Normal +5 | |
% Example hyperlinks | |
\href{http://latex-project.org}{Substitute Link Text} | |
\url{http://latex-project.org} % For when no substitute text is needed | |
% Example change font | |
\begingroup | |
\fontseries{t}\selectfont | |
This is the thin version of the default font | |
\endgroup | |
\begingroup | |
\fontseries{l}\selectfont | |
This is the light version of the default font | |
\endgroup | |
\begingroup | |
\fontseries{c}\selectfont | |
This is the condensed version of the default font | |
\endgroup | |
And this is back to the normal version of the default font | |
% Example page break | |
\newpage | |
% Example Sections | |
\part{part} % Level 0 | |
\section{section} % Level 1 | |
\subsection{subsection} % Level 2 | |
\subsubsection{subsubsection} % Level 3 | |
\paragraph{paragraph} % Level 4 | |
\subparagraph{subparagraph} % Level 5 | |
% Example import of a section | |
\input{directory/filename.tex} | |
% Font Awesome Icons | |
\faGithub, \faLinkedin, \faStackExchange, and \faStackOverflow | |
% Fancy LaTeX Logo | |
\LaTeX{} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment