Setup and Tutorial for Using LaTeX with TeXShop/BasicTeX. Introduction – WARNING: I DON’T USE MACS, SO I’M NOT SURE IF THIS’LL WORK. J. Here is a quick “tutorial” for getting started with LaTeX. For the purposes of this tutorial, I’m going to assume that you’re using TeXShop in one of. This tutorial will go through the steps required to start writing scientific reports with LATEX Other TEX editors like TeXmacs and TeXshop, for macintosh, exist.
|Published (Last):||7 February 2008|
|PDF File Size:||2.8 Mb|
|ePub File Size:||10.58 Mb|
|Price:||Free* [*Free Regsitration Required]|
LaTeX Setup and Tutorial
To start, open TeXShop. You should see a blank window, which looks like this: In TeXShop, the code will be color coded. Two more windows will appear: Tutoriql, a pdf file will appear, looking something like this: Be careful not to delete any braces or the like! Notice the different quotes I used: Typeset and see what you get. Here is an important lesson: LaTeX takes care of most of the formatting for us! There is an important corollary: Let LaTeX take care of the formatting!
Getting Started with LaTeX
In order to get a paragraph break in LaTeX, leave a blank line. Perhaps the middle of your document looks like this:.
Notice my habit of writing one sentence per line.
Now we want to include some math. Be sure to leave the top part of the code alone! All math should either be between dollar signs when in-line or inside some sort of an equation enviroment.
What happened with that last bit of code? It gives us a way to display equations without the equation number.
Personally, I think it is better to have all equations numbered, but I want to give you the option…. LaTeX and computers in general are rather sensitive when it comes to syntax. Do not confuse a curly brace with a round brace, do not confuse forward slash with backslash, etc. Try typesetting the following code, which contains an error:. Rather than get a nice pdf, you should get tutorkal LaTeX is telling you that it made it as far msctex line 17 of your code, at which point it found an error.
What LaTeX was doing was alternating in and out of math mode exactly opposite as we intended, until according to LaTeX we tried to start an equation while already in math mode. What lesson should we draw from this? It can be helpful to work backwards when looking for an error. So you can start narrowing down the possible region where the error is by putting percent signs in front of various bits of code until you find the problem.
Put the following code inside your document and typeset twice:. Not only did you get an equation number, but the text refers to the equation number. Note that this reference will remain correct, even if you add another equation above thus changing the numbering.
There are four types of fancy text I want to discuss: If you want to have an un-numbered list with bullets, replace both instances of enumerate with itemize. In order to include graphics in to your LaTeX document, you should save the image file in the same folder as your LaTeX code. This means that you need to keep track of your image files when using machines macteex the computer lab!
Suppose, for example, you wanted to include this image in your file: However, I much prefer that graphics be encapsulated in a figure. Thus I would rather you use code like the following:. This allows you to refer to the figure. Please see macex template for reports for an example.
This is only the beginning. Take a look at the template for reports for more code to play with. Also look at the various links on my resources page. Ask around if you need advice. I could not figure out the error.
You are commenting using your WordPress. You are commenting using your Twitter account. You are commenting using your Facebook account.
Matthew Blackwell – LaTeX Setup and Tutorial
Getting started To start, open TeXShop. Now, insert the following code in to the document: If tutorual, so be it. Add in some weird spaces and line breaks, so the middle of the code looks perhaps like this: Perhaps the middle of your document looks like this: Each morning, I drink a cup of coffee and eat a piece of bread.
Quite a bit of bread is consumed in my household. Fortunately, I have learned to make bread — two or three times per week, I bake bread! Math Now we want to include some math. Math which is part of the text goes between dollar signs. The cosine function take special tutofial. Here is some more code with math that you should try out: I like big parentheses: Personally, I think it is better to have all equations mqctex, but I want to give you the option… Errors LaTeX and computers in general are rather sensitive when it comes to syntax.
Try typesetting the following code, which contains an error: Bad math environment delimiter. Put the following code inside your document and typeset twice: Fancy text There are four types of fancy text I want to discuss: Numbered lists can be made tutoriql the following code: Sections and subsections can be generated like this: Thus I would rather you use code like the following: That same template includes an example of a bibliography.
This entry was posted in LaTeX. Leave a comment here Cancel reply Enter your comment here Fill in your details below or click an icon tuotrial log in: Email required Address never made public. All content by Paul T.