%% Welcome to the beginner's guide to LaTeX %% You can create a comment using % %% Comments with %% provide a more thorough explanation of each section %% They can be removed once you are familiar with the basics %% Comments with % provide a short explanation of the line %% They provide a reminder of the commands you might forget later on %% I recommend not removing them %% LaTeX commands usually start with a \, follow by the command name %% You write in the parameters/input in the { } %% A .tex document always starts with \documentclass[]{} %% The default is good for reports in general \documentclass[fleqn]{article} %% You can change the margins %% The default is 1.25 inches on all sides \usepackage[margin=1.25in]{geometry} %Set margins %% This package provides the amsmath package plus some spacing fix for certain symbols \usepackage{mathtools} %amsmath %% This package provides some additional math symbols \usepackage{amssymb} %Math symbols %% These packages are required for adding figures \usepackage{graphicx} %Allow embedding of pdf and pictures \usepackage{float} %Positioning of the figure %% This package creates multi-line comments without using % for each line \usepackage{verbatim} %Mutli-line comments %% This package allows web addresses to be clicked \usepackage{hyperref} %% Replace these entries, which are for the title heading \author{Your Name} \date{May 29, 1453} %Can be replaced with \today for today's date \title{Some title} \begin{document} %% Note this command creates the heading itself \maketitle %Create the title heading %% Use \section{} to create a section %% Use \section*{} to create a section without the number label \section{Writing Text} %% Some common text format commands: %% Bold: \textbf{} %% Italic: \textit{} %% Underline: \underline{} %% They can be combined: %% Bold and Italic: \textbf{\textit{}} or textit{\textbf{}} %% Remember to match the number of } \textbf{\textit{\underline{Sample Text}}} %% Use \\ to create a line break, add extra line between text to create a new paragraph This is paragraph 1 This is paragraph 2 \\ This is not paragraph 3 %% For this exercise, type some text below and compile it. %% Place your text below this line ---------------------- %% This creates a subsection \subsection{Lists} %% To create a numbered list, use \begin{enumerate} ... \end{enumerate} %% Use \item for each entry on the list List of food \begin{enumerate} \item Pizza \item Apple \end{enumerate} %% To create a bullet list, use \begin{itemize} ... \end{itemize} %% List can be nested: Some generic nested list \begin{enumerate} \item Item 1 \begin{enumerate} \item Item A \item Item B \end{enumerate} \item 2 \end{enumerate} %%Use proper indentation to avoid confusion %% For this exercise, create a list of place you would travel, and also list the activities you would do at that place. %% Place your code below this line ---------------------- \subsection{Tables} Go to \url{ http://www.tablesgenerator.com/ } and create a simple table. Once you are done, click generate to get a LaTeX code. Copy and paste below: %% Paste your code below this line ---------------------- \newpage %Start from a new page \section{Mathematics} %% To create a math expression, decide the type of environment you want: %% In-line math %% Use $ ... $ or \( ... \) The formula for the area of a circle is $A = \pi r^2$. %% Display math %% Use \[ ... \] \[ y = \int_0^1 x^2 + 3x - 7 \cos{x} \] %% Single equation %% Use \begin{equation} ... \end{equation} \begin{equation} a^2 + b^2 = c^2 \end{equation} %% Align math %% Use \begin{align*} ... \end{align*} %% Use & to align the expression \begin{align*} y_1 + y_2 + 4y_3 &\geq 1 \\ 3y_1 + 7y_2 + 2y_3 &\geq 2 \\ -y_1 - y_2 - y_3 &\geq 0 \end{align*} %% To create a matrix, use \begin{pmatrix} ... \end{pmatrix} or \begin{bmatrix} ... \end{pmatrix} %% For this exercise, find a Wikipedia article on a math/physics topic. From that article, recreate the math equations in LaTeX. %% Place your code below this line ---------------------- \end{document} %% This signals the end of the document, anything you type below this will create an error