diff options
Diffstat (limited to 'latex.html.markdown')
-rw-r--r-- | latex.html.markdown | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/latex.html.markdown b/latex.html.markdown index 146e8d45..d41f6b2f 100644 --- a/latex.html.markdown +++ b/latex.html.markdown @@ -4,15 +4,18 @@ contributors: - ["Chaitanya Krishna Ande", "http://icymist.github.io"] - ["Colton Kohnke", "http://github.com/voltnor"] - ["Sricharan Chiruvolu", "http://sricharan.xyz"] + - ["Ramanan Balakrishnan", "https://github.com/ramananbalakrishnan"] filename: learn-latex.tex --- + +```tex % All comment lines start with % % There are no multi-line comments % LaTeX is NOT a "What You See Is What You Get" word processing software like % MS Word, or OpenOffice Writer -% Every Latex command starts with a backslash (\) +% Every LaTeX command starts with a backslash (\) % LaTeX documents start with a defining the type of document it's compiling % Other document types include book, report, presentations, etc. @@ -45,7 +48,7 @@ filename: learn-latex.tex % but before the main sections of the body. % This command is available in the document classes article and report. \begin{abstract} - LaTex documentation written as LaTex! How novel and totally not my idea! + LaTeX documentation written as LaTeX! How novel and totally not my idea! \end{abstract} % Section commands are intuitive. @@ -63,8 +66,8 @@ I think we need another one Much better now. \label{subsec:pythagoras} -% By using the asterisk we can suppress Latex's inbuilt numbering. -% This works for other Latex commands as well. +% By using the asterisk we can suppress LaTeX's inbuilt numbering. +% This works for other LaTeX commands as well. \section*{This is an unnumbered section} However not all sections have to be numbered! @@ -74,7 +77,7 @@ a line \\ needs \\ to \\ break \\ you add \textbackslash\textbackslash to the source code. \\ \section{Lists} -Lists are one of the easiest things to create in Latex! I need to go shopping +Lists are one of the easiest things to create in LaTeX! I need to go shopping tomorrow, so let's make a grocery list. \begin{enumerate} % This creates an "enumerate" environment. % \item tells the enumerate to increment @@ -104,9 +107,12 @@ Here's how you state all y that belong to X, $\forall$ x $\in$ X. \\ % However, the math symbols only exist in math-mode. % We can enter math-mode from text mode with the $ signs. % The opposite also holds true. Variable can also be rendered in math-mode. +% We can also enter math mode with \[\] + +\[a^2 + b^2 = c^2 \] My favorite Greek letter is $\xi$. I also like $\beta$, $\gamma$ and $\sigma$. -I haven't found a Greek letter that yet that Latex doesn't know about! +I haven't found a Greek letter that yet that LaTeX doesn't know about! Operators are essential parts of a mathematical document: trigonometric functions ($\sin$, $\cos$, $\tan$), @@ -126,7 +132,7 @@ $^{10}/_{7}$ % \frac{numerator}{denominator} $\frac{n!}{k!(n - k)!}$ \\ -We can also insert equations in an "equation environment." +We can also insert equations in an "equation environment". % Display math with the equation 'environment' \begin{equation} % enters math-mode @@ -141,7 +147,7 @@ figures, equations, sections, etc. Summations and Integrals are written with sum and int commands: -% Some latex compilers will complain if there are blank lines +% Some LaTeX compilers will complain if there are blank lines % In an equation environment. \begin{equation} \sum_{i=0}^{5} f_{i} @@ -181,9 +187,9 @@ We can also insert Tables in the same way as figures. % \section{Hyperlinks} % Coming soon -\section{Getting Latex to not compile something (i,e, Source Code)} -Let's say we want to include some code into our Latex document, -we would then need Latex to not try and interpret that text and +\section{Getting LaTeX to not compile something (i.e. Source Code)} +Let's say we want to include some code into our LaTeX document, +we would then need LaTeX to not try and interpret that text and instead just print it to the document. We do this we a verbatim environment. @@ -198,8 +204,8 @@ environment. \section{Compiling} By now you're probably wondering how to compile this fabulous document -and look at the glorious glory that is a Latex pdf. -(yes, this document actually does compiles). \\ +and look at the glorious glory that is a LaTeX pdf. +(yes, this document actually does compile). \\ Getting to the final document using LaTeX consists of the following steps: \begin{enumerate} \item Write the document in plain text (the "source code"). @@ -222,9 +228,19 @@ format you defined in Step 1. That's all for now! +% Most often, you would want to have a references section in your document. +% The easiest way to set this up would be by using the bibliography section +\begin{thebibliography}{1} + % similar to other lists, the \bibitem command can be used to list items + % each entry can then be cited directly in the body of the text + \bibitem{latexwiki} The amazing LaTeX wikibook: {\em https://en.wikibooks.org/wiki/LaTeX} + \bibitem{latextutorial} An actual tutorial: {\em http://www.latex-tutorial.com} +\end{thebibliography} + % end the document \end{document} ``` + ## More on LaTeX * The amazing LaTeX wikibook: [https://en.wikibooks.org/wiki/LaTeX](https://en.wikibooks.org/wiki/LaTeX) |