From a3818d119ea677e1992fa05d5ab130a012086a56 Mon Sep 17 00:00:00 2001 From: Chaitanya Krishna Ande Date: Thu, 23 Apr 2015 13:54:52 +0200 Subject: initial version for latex --- latex.html.markdown | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 latex.html.markdown (limited to 'latex.html.markdown') diff --git a/latex.html.markdown b/latex.html.markdown new file mode 100644 index 00000000..cc1d99cb --- /dev/null +++ b/latex.html.markdown @@ -0,0 +1,133 @@ +--- +language: latex +contributors: + - ["Chaitanya Krishna Ande", "http://icymist.github.io"] +filename: learn-latex.tex +--- + +LaTeX is known to create aesthetically pleasing documents without you worrying +about the formatting. It is also great if one wants to create documents +containing a lot of mathematics. Getting a good document is very easy, but +getting it to behave exactly the way you want can be a bit hairy. + + +```latex +% 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 + +% Getting to the final document using LaTeX consists of the following steps: +% 1. Write the document in plain text +% 2. Compile plain text document to produce a pdf +% The compilation step looks something like this: +% $ pdflatex your-tex-file.tex your-tex-file.pdf +% A number of LaTeX editors combine both Step 1 and Step 2 in the same piece of +% software. So, you get to see Step 1, but not Step 2 completely. +% Step 2 is still happening behind the scenes. + +% You write all your formatting information in plain text in Step 1. +% The compilation part in Step 2 takes care of producing the document in the +% format you defined in Step 1. + +% For Step 1, it is best if you get a good text editor +% On Windows, probably Notepad++ +% For Step 2, you will need to get a TeX distribution +% Windows: MikTeX +% MacOS: MacTeX +% Linux: Should be available from your package manager + +% Let's get to the final pdf document as soon as possible + +% Choose the kind of document you want to write. +% You can replace article with book, report, etc. +\documentclass{article} +% begin the document +\begin{document} +% end the document +\end{document} +% Compile to pdf +% Now, you already have a final document which of course it is empty. +% Everything that you write is between the +% \begin{document} +% \end{document} + +% Start a new document from here. +% Let's do a decent document +\documentclass{article} +% required for inserting images +\usepackage{graphicx} +% begin the document +\begin{document} +% set the title (optional) +\title{Title of the document} +% set the author (optional) +\author{Chaitanya Krishna Ande} + +% make the title (optional) +\maketitle + +% start the first section +\section{Introduction} + +% write your text +This is the introduction. + +% start another section +\section{Another section} +This is the text for another section. + +% another section with subsection +\section{Section with sub-section} +Text for the section. +\subsection{Sub-section} +Let's discuss the Pythagoras theorem. +\subsubsection{Pythagoras Theorm} +% for cross-reference +\label{subsec:pythagoras} + +% notice how the sections and sub-sections are automatically numbered + +% Some math +% Inline math within $ $ +For a right angled triangle (see Fig.~\ref{fig:right-triangle}) with sides $a$, $b$ and $c$, where $c$ is the +hypotenuse, the following holds: +% Display math with the equation 'environment' +\begin{equation} + c^2 = a^2 + b^2. + % for cross-reference + \label{eq:pythagoras} +\end{equation} + +% Let's cross-reference the equation +Eqn.~\ref{eq:pythagoras} is also known as the Pythagoras Theorem which is also +the subject of Sec.~\ref{subsec:pythagoras}. + +\subsubsection{Figure} +Let's insert a Figure. + +\begin{figure} + \centering + \includegraphics[width=0.8\linewidth]{right-triangle.png} + \caption{Right triangle with sides a, b, c} + \label{fig:right-triangle} +\end{figure} + + +\subsubsection{Table} +Let's insert a Table. + +\begin{table} +\caption{Caption for the Table.} +\begin{tabular}{ccc} +Number & Last Name & First Name \\ +\hline +1 & Biggus & Dickus \\ +2 & Monty & Python +\end{tabular} +\end{table} + +% end the document +\end{document} +``` -- cgit v1.2.3 From c7f02d174a72f1f1d807c57e030ba3c8f066c27b Mon Sep 17 00:00:00 2001 From: Colton Kohnke Date: Thu, 8 Oct 2015 23:07:05 +0200 Subject: [latex/en] Initial latex whirlwind showcase --- latex.html.markdown | 191 +++++++++++++++++++++++++++++----------------------- 1 file changed, 106 insertions(+), 85 deletions(-) (limited to 'latex.html.markdown') diff --git a/latex.html.markdown b/latex.html.markdown index cc1d99cb..c8f21a83 100644 --- a/latex.html.markdown +++ b/latex.html.markdown @@ -2,6 +2,7 @@ language: latex contributors: - ["Chaitanya Krishna Ande", "http://icymist.github.io"] + - ["Colton Kohnke", "http://github.com/voltnor"] filename: learn-latex.tex --- @@ -12,122 +13,142 @@ getting it to behave exactly the way you want can be a bit hairy. ```latex + % 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 -% Getting to the final document using LaTeX consists of the following steps: -% 1. Write the document in plain text -% 2. Compile plain text document to produce a pdf -% The compilation step looks something like this: -% $ pdflatex your-tex-file.tex your-tex-file.pdf -% A number of LaTeX editors combine both Step 1 and Step 2 in the same piece of -% software. So, you get to see Step 1, but not Step 2 completely. -% Step 2 is still happening behind the scenes. - -% You write all your formatting information in plain text in Step 1. -% The compilation part in Step 2 takes care of producing the document in the -% format you defined in Step 1. - -% For Step 1, it is best if you get a good text editor -% On Windows, probably Notepad++ -% For Step 2, you will need to get a TeX distribution -% Windows: MikTeX -% MacOS: MacTeX -% Linux: Should be available from your package manager - -% Let's get to the final pdf document as soon as possible - -% Choose the kind of document you want to write. -% You can replace article with book, report, etc. -\documentclass{article} -% begin the document -\begin{document} -% end the document -\end{document} -% Compile to pdf -% Now, you already have a final document which of course it is empty. -% Everything that you write is between the -% \begin{document} -% \end{document} - -% Start a new document from here. -% Let's do a decent document -\documentclass{article} -% required for inserting images -\usepackage{graphicx} -% begin the document -\begin{document} -% set the title (optional) -\title{Title of the document} -% set the author (optional) -\author{Chaitanya Krishna Ande} - -% make the title (optional) +% LaTeX documents start with a defining the type of document it's compiling +% Other document types include book, report, presentations, etc. +\documentclass[12pt]{article} + +% Next we define the packages the document uses. +% I'm going to include the float and caption packages for figures. +\usepackage{caption} +\usepackage{float} + +% We can define some other document properties too! +\author{Chaitanya Krishna Ande \& Colton Kohnke} +\date{\today} +\title{Learn LaTeX in Y Minutes!} + +% Now we're ready to begin the document +% Everything before this line is called "The Preamble" +\begin{document} +% if we set the author, date, title fields, we can have LaTeX +% create a title page fo us. \maketitle -% start the first section \section{Introduction} +Hello, my name is Colton and together we're going to explore LaTeX ! -% write your text -This is the introduction. - -% start another section \section{Another section} -This is the text for another section. - -% another section with subsection -\section{Section with sub-section} -Text for the section. -\subsection{Sub-section} -Let's discuss the Pythagoras theorem. -\subsubsection{Pythagoras Theorm} -% for cross-reference +This is the text for another section. I think it needs a subsection. + +\subsection{This is a subsection} +I think we need another one + +\subsubsection{Pythagoras} +Much better now. \label{subsec:pythagoras} -% notice how the sections and sub-sections are automatically numbered +\section*{This is an unnumbered section} +However not all sections have to be numbered! -% Some math -% Inline math within $ $ -For a right angled triangle (see Fig.~\ref{fig:right-triangle}) with sides $a$, $b$ and $c$, where $c$ is the -hypotenuse, the following holds: +\section{Some Text notes} +LaTeX is generally pretty good about placing text where it should go. If +a line \\ needs \\ to \\ break \\ you add \textbackslash\textbackslash to +the text. In case you haven't noticed the \textbackslash is the character +the tells the LaTeX compiler it should pay attention to what's next. + +\section{Math} + +One of the primary uses for LaTeX is to produce academic article or +technical papers. Usually in the realm of math and science. As such, +we need to be able to add special symbols to our paper! \\ + +My favorite Greek letter is $\xi$. I also like $\beta$, $\gamma$ and $\sigma$. +Notice how I needed to add \$ signs before and after the symbols. This is +because when writing, we are in text-mode. 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 add references +For a right angled triangle (see Fig.~\ref{fig:right-triangle}) with sides $a$, + $b$ and $c$, where $c$ is the hypotenuse, the following holds: % Display math with the equation 'environment' -\begin{equation} +\begin{equation} % enters math-mode c^2 = a^2 + b^2. % for cross-reference \label{eq:pythagoras} -\end{equation} +\end{equation} % all \begin statments must have an end statement -% Let's cross-reference the equation Eqn.~\ref{eq:pythagoras} is also known as the Pythagoras Theorem which is also the subject of Sec.~\ref{subsec:pythagoras}. -\subsubsection{Figure} -Let's insert a Figure. -\begin{figure} +\section{Figures} + +Let's insert a Figure. Figure placement can get a little tricky. +I definately have to lookup the placement options each time. + +\begin{figure}[H] \centering - \includegraphics[width=0.8\linewidth]{right-triangle.png} - \caption{Right triangle with sides a, b, c} + %\includegraphics[width=0.8\linewidth]{right-triangle.png} + % Commented out for compilation purposes. Use your imagination. + \caption{Right triangle with sides $a$, $b$, $c$} \label{fig:right-triangle} \end{figure} - -\subsubsection{Table} +\subsection{Table} Let's insert a Table. -\begin{table} -\caption{Caption for the Table.} -\begin{tabular}{ccc} -Number & Last Name & First Name \\ -\hline -1 & Biggus & Dickus \\ -2 & Monty & Python -\end{tabular} +\begin{table}[H] + \caption{Caption for the Table.} + \begin{tabular}{ccc} + Number & Last Name & First Name \\ + \hline + 1 & Biggus & Dickus \\ + 2 & Monty & Python + \end{tabular} \end{table} + +\section{Compiling} + +By now you're probably wondering how to compile this fabulous document +(yes, it actually compiles). \\ +Getting to the final document using LaTeX consists of the following steps: + \begin{enumerate} % we can also created numbered lists! + \item Write the document in plain text + \item Compile plain text document to produce a pdf. + The compilation step looks something like this: \\ + % Verbatim tells the compiler to not interpret. + \begin{verbatim} + $pdflatex learn-latex.tex learn-latex.pdf + \end{verbatim} + \end{enumerate} + +A number of LaTeX editors combine both Step 1 and Step 2 in the same piece of +software. So, you get to see Step 1, but not Step 2 completely. +Step 2 is still happening behind the scenes. + +You write all your formatting information in plain text in Step 1. +The compilation part in Step 2 takes care of producing the document in the +format you defined in Step 1. + +\section{End} + +That's all for now! + % end the document \end{document} ``` +## More on LaTeX + +* The amazing LaTeX wikibook: [https://en.wikibooks.org/wiki/LaTeX](https://en.wikibooks.org/wiki/LaTeX) +* An actual tutorial: [http://www.latex-tutorial.com/](http://www.latex-tutorial.com/) + + -- cgit v1.2.3 From 53a0264029dbaaf5909110c0a390753b276ac324 Mon Sep 17 00:00:00 2001 From: Sricharan Chiruvolu Date: Fri, 9 Oct 2015 20:30:57 +0530 Subject: Update latex.html.markdown --- latex.html.markdown | 53 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 6 deletions(-) (limited to 'latex.html.markdown') diff --git a/latex.html.markdown b/latex.html.markdown index c8f21a83..f0646941 100644 --- a/latex.html.markdown +++ b/latex.html.markdown @@ -3,6 +3,7 @@ language: latex contributors: - ["Chaitanya Krishna Ande", "http://icymist.github.io"] - ["Colton Kohnke", "http://github.com/voltnor"] + - ["Sricharan Chiruvolu", "http://sricharan.xyz"] filename: learn-latex.tex --- @@ -25,12 +26,15 @@ getting it to behave exactly the way you want can be a bit hairy. \documentclass[12pt]{article} % Next we define the packages the document uses. +% If you want to include graphics, colored text or +% source code from a file into your document, +% you need to enhance the capabilities of LaTeX. This is done by adding packages. % I'm going to include the float and caption packages for figures. \usepackage{caption} \usepackage{float} % We can define some other document properties too! -\author{Chaitanya Krishna Ande \& Colton Kohnke} +\author{Chaitanya Krishna Ande, Colton Kohnke \& Sricharan Chiruvolu} \date{\today} \title{Learn LaTeX in Y Minutes!} @@ -41,6 +45,16 @@ getting it to behave exactly the way you want can be a bit hairy. % create a title page fo us. \maketitle +% Most research papers have abstract, you can use the predefined commands for this. +% This should appear in its logical order, therefore, after the top matter, +% but before the main sections of the body. +% This command is available in document classes article and report. +\begin{abstract} + LaTex documentation written as LaTex! How novel and totally not my idea! +\end{abstract} + +% Section commands are intuitive. +% All the titles of the sections are added automatically to the table of contents. \section{Introduction} Hello, my name is Colton and together we're going to explore LaTeX ! @@ -69,15 +83,34 @@ One of the primary uses for LaTeX is to produce academic article or technical papers. Usually in the realm of math and science. As such, we need to be able to add special symbols to our paper! \\ -My favorite Greek letter is $\xi$. I also like $\beta$, $\gamma$ and $\sigma$. +Math has many symbols, far beyond what you can find on a keyboard. +Set and relation symbols, arrows, operators, Greek letters to name a few. \\ + + +Sets and relations play a vital role in many mathematical research papers. +Here's how you state all y that belong to X, $\forall$ x $\in$ X. Notice how I needed to add \$ signs before and after the symbols. This is because when writing, we are in text-mode. 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 add references -For a right angled triangle (see Fig.~\ref{fig:right-triangle}) with sides $a$, - $b$ and $c$, where $c$ is the hypotenuse, the following holds: +My favorite Greek letter is $\xi$. I also like $\beta$, $\gamma$ and $\sigma$. + +Operators are essential parts of a mathematical document: trigonometric functions +(sin, cos, tan), logarithms and exponentials (log, exp), limits (lim) e.t.c. have +pre-defined LaTeX commands. Let's write an equation to see how it's done: \\ + +$\cos$ (2$\theta$) = $\cos$^2 $\theta$ - $\sin$^2 $\theta$ + +Fractions(Numerator-denominators) can be written in these forms: + +% 10 / 7 +^10/_7 + +% Relatively complex fractions can be written as +% \frac{numerator}{denominator} +$\frac{n!}{k!(n - k)!}$ + % Display math with the equation 'environment' \begin{equation} % enters math-mode c^2 = a^2 + b^2. @@ -88,11 +121,17 @@ For a right angled triangle (see Fig.~\ref{fig:right-triangle}) with sides $a$, Eqn.~\ref{eq:pythagoras} is also known as the Pythagoras Theorem which is also the subject of Sec.~\ref{subsec:pythagoras}. +Summations and Integrals are written with sum and int commands: +\begin{equation} % enters math-mode +\sum_{i=0}^{5} f_i + +\int_0^\infty \mathrm{e}^{-x}\,\mathrm{d}x +\end{equation} \section{Figures} Let's insert a Figure. Figure placement can get a little tricky. -I definately have to lookup the placement options each time. +I definitely have to lookup the placement options each time. \begin{figure}[H] \centering @@ -115,6 +154,8 @@ Let's insert a Table. \end{tabular} \end{table} +% \section{Hyperlinks} + \section{Compiling} -- cgit v1.2.3 From f3de591fc522f41bdfb92893fc623f48fb18d1d4 Mon Sep 17 00:00:00 2001 From: Colton Kohnke Date: Fri, 9 Oct 2015 21:29:01 +0200 Subject: merge patch-1, restructure, fix grammar --- latex.html.markdown | 154 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 95 insertions(+), 59 deletions(-) (limited to 'latex.html.markdown') diff --git a/latex.html.markdown b/latex.html.markdown index f0646941..146e8d45 100644 --- a/latex.html.markdown +++ b/latex.html.markdown @@ -6,28 +6,23 @@ contributors: - ["Sricharan Chiruvolu", "http://sricharan.xyz"] filename: learn-latex.tex --- - -LaTeX is known to create aesthetically pleasing documents without you worrying -about the formatting. It is also great if one wants to create documents -containing a lot of mathematics. Getting a good document is very easy, but -getting it to behave exactly the way you want can be a bit hairy. - - -```latex - % 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 +% 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 (\) + % LaTeX documents start with a defining the type of document it's compiling -% Other document types include book, report, presentations, etc. +% Other document types include book, report, presentations, etc. +% The options for the document appear in the [] brackets. In this case +% it specifies we want to use 12pt font. \documentclass[12pt]{article} % Next we define the packages the document uses. -% If you want to include graphics, colored text or -% source code from a file into your document, +% If you want to include graphics, colored text, or +% source code from another language file into your document, % you need to enhance the capabilities of LaTeX. This is done by adding packages. % I'm going to include the float and caption packages for figures. \usepackage{caption} @@ -42,13 +37,13 @@ getting it to behave exactly the way you want can be a bit hairy. % Everything before this line is called "The Preamble" \begin{document} % if we set the author, date, title fields, we can have LaTeX -% create a title page fo us. +% create a title page for us. \maketitle % Most research papers have abstract, you can use the predefined commands for this. % This should appear in its logical order, therefore, after the top matter, % but before the main sections of the body. -% This command is available in document classes article and report. +% 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! \end{abstract} @@ -56,76 +51,103 @@ getting it to behave exactly the way you want can be a bit hairy. % Section commands are intuitive. % All the titles of the sections are added automatically to the table of contents. \section{Introduction} -Hello, my name is Colton and together we're going to explore LaTeX ! +Hello, my name is Colton and together we're going to explore LaTeX! \section{Another section} This is the text for another section. I think it needs a subsection. -\subsection{This is a subsection} +\subsection{This is a subsection} % Subsections are also intuitive. I think we need another one \subsubsection{Pythagoras} Much better now. \label{subsec:pythagoras} -\section*{This is an unnumbered section} +% 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! \section{Some Text notes} LaTeX is generally pretty good about placing text where it should go. If a line \\ needs \\ to \\ break \\ you add \textbackslash\textbackslash to -the text. In case you haven't noticed the \textbackslash is the character -the tells the LaTeX compiler it should pay attention to what's next. +the source code. \\ + +\section{Lists} +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 + \item Salad. + \item 27 watermelon. + \item A single jackrabbit. + % we can even override the item number by using [] + \item[how many?] Medium sized squirt guns. + + Not a list item, but still part of the enumerate. + +\end{enumerate} % All environments must have an end. \section{Math} -One of the primary uses for LaTeX is to produce academic article or +One of the primary uses for LaTeX is to produce academic articles or technical papers. Usually in the realm of math and science. As such, we need to be able to add special symbols to our paper! \\ -Math has many symbols, far beyond what you can find on a keyboard. -Set and relation symbols, arrows, operators, Greek letters to name a few. \\ - +Math has many symbols, far beyond what you can find on a keyboard; +Set and relation symbols, arrows, operators, and Greek letters to name a few.\\ Sets and relations play a vital role in many mathematical research papers. -Here's how you state all y that belong to X, $\forall$ x $\in$ X. -Notice how I needed to add \$ signs before and after the symbols. This is -because when writing, we are in text-mode. 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. \\ +Here's how you state all y that belong to X, $\forall$ x $\in$ X. \\ +% Notice how I needed to add $ signs before and after the symbols. This is +% because when writing, we are in text-mode. +% 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. 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! -Operators are essential parts of a mathematical document: trigonometric functions -(sin, cos, tan), logarithms and exponentials (log, exp), limits (lim) e.t.c. have -pre-defined LaTeX commands. Let's write an equation to see how it's done: \\ +Operators are essential parts of a mathematical document: +trigonometric functions ($\sin$, $\cos$, $\tan$), +logarithms and exponentials ($\log$, $\exp$), +limits ($\lim$), etc. +have per-defined LaTeX commands. +Let's write an equation to see how it's done: \\ -$\cos$ (2$\theta$) = $\cos$^2 $\theta$ - $\sin$^2 $\theta$ +$\cos(2\theta) = \cos^{2}(\theta) - \sin^{2}(\theta)$ Fractions(Numerator-denominators) can be written in these forms: % 10 / 7 -^10/_7 +$^{10}/_{7}$ % Relatively complex fractions can be written as % \frac{numerator}{denominator} -$\frac{n!}{k!(n - k)!}$ +$\frac{n!}{k!(n - k)!}$ \\ + +We can also insert equations in an "equation environment." % Display math with the equation 'environment' \begin{equation} % enters math-mode c^2 = a^2 + b^2. - % for cross-reference - \label{eq:pythagoras} -\end{equation} % all \begin statments must have an end statement + \label{eq:pythagoras} % for referencing +\end{equation} % all \begin statements must have an end statement +We can then reference our new equation! Eqn.~\ref{eq:pythagoras} is also known as the Pythagoras Theorem which is also -the subject of Sec.~\ref{subsec:pythagoras}. +the subject of Sec.~\ref{subsec:pythagoras}. A lot of things can be labeled: +figures, equations, sections, etc. Summations and Integrals are written with sum and int commands: -\begin{equation} % enters math-mode -\sum_{i=0}^{5} f_i -\int_0^\infty \mathrm{e}^{-x}\,\mathrm{d}x +% Some latex compilers will complain if there are blank lines +% In an equation environment. +\begin{equation} + \sum_{i=0}^{5} f_{i} +\end{equation} +\begin{equation} + \int_{0}^{\infty} \mathrm{e}^{-x} \mathrm{d}x \end{equation} \section{Figures} @@ -133,40 +155,56 @@ Summations and Integrals are written with sum and int commands: Let's insert a Figure. Figure placement can get a little tricky. I definitely have to lookup the placement options each time. -\begin{figure}[H] - \centering - %\includegraphics[width=0.8\linewidth]{right-triangle.png} - % Commented out for compilation purposes. Use your imagination. +\begin{figure}[H] % H here denoted the placement option. + \centering % centers the figure on the page + % Inserts a figure scaled to 0.8 the width of the page. + %\includegraphics[width=0.8\linewidth]{right-triangle.png} + % Commented out for compilation purposes. Please use your imagination. \caption{Right triangle with sides $a$, $b$, $c$} \label{fig:right-triangle} \end{figure} \subsection{Table} -Let's insert a Table. +We can also insert Tables in the same way as figures. \begin{table}[H] \caption{Caption for the Table.} - \begin{tabular}{ccc} - Number & Last Name & First Name \\ - \hline + % the {} arguments below describe how each row of the table is drawn. + % Again, I have to look these up. Each. And. Every. Time. + \begin{tabular}{c|cc} + Number & Last Name & First Name \\ % Column rows are separated by $ + \hline % a horizontal line 1 & Biggus & Dickus \\ 2 & Monty & Python \end{tabular} \end{table} -% \section{Hyperlinks} +% \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 +instead just print it to the document. We do this we a verbatim +environment. + +% There are other packages that exist (i.e. minty, lstlisting, etc.) +% but verbatim is the bare-bones basic one. +\begin{verbatim} + print("Hello World!") + a%b; % look! We can use % signs in verbatim. + random = 4; #decided by fair random dice roll +\end{verbatim} \section{Compiling} By now you're probably wondering how to compile this fabulous document -(yes, it actually compiles). \\ +and look at the glorious glory that is a Latex pdf. +(yes, this document actually does compiles). \\ Getting to the final document using LaTeX consists of the following steps: - \begin{enumerate} % we can also created numbered lists! - \item Write the document in plain text - \item Compile plain text document to produce a pdf. - The compilation step looks something like this: \\ - % Verbatim tells the compiler to not interpret. + \begin{enumerate} + \item Write the document in plain text (the "source code"). + \item Compile source code to produce a pdf. + The compilation step looks something like this (in Linux): \\ \begin{verbatim} $pdflatex learn-latex.tex learn-latex.pdf \end{verbatim} @@ -191,5 +229,3 @@ That's all for now! * The amazing LaTeX wikibook: [https://en.wikibooks.org/wiki/LaTeX](https://en.wikibooks.org/wiki/LaTeX) * An actual tutorial: [http://www.latex-tutorial.com/](http://www.latex-tutorial.com/) - - -- cgit v1.2.3 From b5bd5d7ba2dd6cc857f1bdf574eb1e7b3b7206aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Su=C3=A1rez?= Date: Thu, 15 Oct 2015 00:05:18 +0200 Subject: Fix some typos in LaTeX article --- latex.html.markdown | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'latex.html.markdown') diff --git a/latex.html.markdown b/latex.html.markdown index 146e8d45..fe2ddf43 100644 --- a/latex.html.markdown +++ b/latex.html.markdown @@ -12,7 +12,7 @@ filename: learn-latex.tex % 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 +45,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 +63,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 +74,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 @@ -106,7 +106,7 @@ Here's how you state all y that belong to X, $\forall$ x $\in$ X. \\ % The opposite also holds true. Variable can also be rendered in math-mode. 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 +126,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 +141,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 +181,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,7 +198,7 @@ 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. +and look at the glorious glory that is a LaTeX pdf. (yes, this document actually does compiles). \\ Getting to the final document using LaTeX consists of the following steps: \begin{enumerate} @@ -206,7 +206,7 @@ Getting to the final document using LaTeX consists of the following steps: \item Compile source code to produce a pdf. The compilation step looks something like this (in Linux): \\ \begin{verbatim} - $pdflatex learn-latex.tex learn-latex.pdf + $pdfLaTeX learn-LaTeX.tex learn-LaTeX.pdf \end{verbatim} \end{enumerate} @@ -228,4 +228,4 @@ That's all for now! ## More on LaTeX * The amazing LaTeX wikibook: [https://en.wikibooks.org/wiki/LaTeX](https://en.wikibooks.org/wiki/LaTeX) -* An actual tutorial: [http://www.latex-tutorial.com/](http://www.latex-tutorial.com/) +* An actual tutorial: [http://www.LaTeX-tutorial.com/](http://www.LaTeX-tutorial.com/) -- cgit v1.2.3 From 2605af62489e5c184ab2166d264c8ccbbb413d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Su=C3=A1rez?= Date: Thu, 15 Oct 2015 00:11:05 +0200 Subject: Fix more typos --- latex.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'latex.html.markdown') diff --git a/latex.html.markdown b/latex.html.markdown index fe2ddf43..e180e622 100644 --- a/latex.html.markdown +++ b/latex.html.markdown @@ -206,7 +206,7 @@ Getting to the final document using LaTeX consists of the following steps: \item Compile source code to produce a pdf. The compilation step looks something like this (in Linux): \\ \begin{verbatim} - $pdfLaTeX learn-LaTeX.tex learn-LaTeX.pdf + $pdflatex learn-latex.tex learn-latex.pdf \end{verbatim} \end{enumerate} @@ -228,4 +228,4 @@ That's all for now! ## More on LaTeX * The amazing LaTeX wikibook: [https://en.wikibooks.org/wiki/LaTeX](https://en.wikibooks.org/wiki/LaTeX) -* An actual tutorial: [http://www.LaTeX-tutorial.com/](http://www.LaTeX-tutorial.com/) +* An actual tutorial: [http://www.latex-tutorial.com/](http://www.latex-tutorial.com/) -- cgit v1.2.3 From a1939d8e89716378d4dd76c824a6908bf21bfe88 Mon Sep 17 00:00:00 2001 From: Adam Bard Date: Sun, 18 Oct 2015 00:13:47 +0800 Subject: Update latex.html.markdown Add opening tex tag --- latex.html.markdown | 3 +++ 1 file changed, 3 insertions(+) (limited to 'latex.html.markdown') diff --git a/latex.html.markdown b/latex.html.markdown index e180e622..9b7b4feb 100644 --- a/latex.html.markdown +++ b/latex.html.markdown @@ -6,6 +6,8 @@ contributors: - ["Sricharan Chiruvolu", "http://sricharan.xyz"] filename: learn-latex.tex --- + +```tex % All comment lines start with % % There are no multi-line comments @@ -225,6 +227,7 @@ That's all for now! % end the document \end{document} ``` + ## More on LaTeX * The amazing LaTeX wikibook: [https://en.wikibooks.org/wiki/LaTeX](https://en.wikibooks.org/wiki/LaTeX) -- cgit v1.2.3