View unanswered posts | View active topics It is currently Sat Dec 16, 2017 5:49 pm



Reply to topic  [ 6 posts ] 
LaTeX Installation How-To 
Author Message
LQFP144 - On Top Of The Game
User avatar

Joined: Tue Jan 03, 2012 8:37 pm
Posts: 434
Location: Manhattan, KS. USA
LaTeX is a typesetting markup language (based on Donald Knuth's TeX system) which allows an author to generate publish-ready documents for journals and books. LaTeX is especially popular in research and industrial environments for its ability to represent complex equations and scientific notation, embed a variety of image formats, and manage dynamic updates for section numbering, pagination, and works cited. Additional packages (ie. TikZ, Beamer) may also be installed to expand the capabilities of LaTeX and, much like other markup langages, formatting can be controlled through the use of standardized--or customized--style files.

Documents are generated by undergoing the following series of conversions:

LaTeX markup (.tex) -> Compiled binary (.dvi) -> Postcript (.ps) -> Archive (.pdf)

In most cases, an editor will facilitate the conversion directly from .tex to .pdf without manually stepping through these processes.

Though LaTeX editors exist which resemble popular desktop publishing suites, the use of such programs is highly discouraged. One of the primary principles behind LaTeX is that a document's code should remain readable, portable, and available for collaborative editing and revising. WYSIWYG editors, on the other hand, are known to introduce proprietary formatting and redundant code which can restrict the document's ability to be read and processed by others. If you plan to use LaTeX, plan to learn the language.

A LaTeX installation generally consists of the following:

  • An editor
  • The LaTeX engine
  • Support applications

Installation instructions can be found below and are broken up into three parts: Windows, Mac OS, and Linux.

For an overview of the LaTeX markup language, visit http://www.latex-project.org

Comments or criticism should be posted here: viewtopic.php?f=35&t=1625

_________________
FreeEMS vehicle #23: 2003 Toyota "Toxic" Tacoma
Build page: http://forum.diyefi.org/viewtopic.php?f=3&t=1635)


Last edited by ToxicGumbo on Tue Mar 06, 2012 7:04 am, edited 2 times in total.



Mon Mar 05, 2012 8:40 am
Profile
LQFP144 - On Top Of The Game
User avatar

Joined: Tue Jan 03, 2012 8:37 pm
Posts: 434
Location: Manhattan, KS. USA
Windows (XP, Vista, 7)

Before getting started, there are two LaTeX engines to consider:


MikTeX has been the standard Windows LaTeX engine for over ten years. It has a strong history of upkeep and is supported by most mainstream editors. However, because TeXLive is the standard for Linux and Mac OS, I highly recommend it instead. Having the same LaTeX engine standardized across operating systems will offer more consistent results for document creation and collaboration.

Note that the TeXLive "package update" repositories for a given release are set to expire when the next full release becomes available. Package repositories for versions prior the new release are removed fairly quickly from public access as a means to migrate users to the newer releases.

Programs to download:

You might also want to install one of the following:
  • Dia - A lean and powerful diagram editor
  • InkScape - An advanced vector graphics editor

What to do:
  1. Download and Install 7-Zip
    • Click on the 7-Zip link above. When the page loads, click on the appropriate link to download 7-Zip for your version of Windows (32 or 64 bit).
    • Once the download completes, locate the installer, double-click it, and proceed through the installation screens using the default options.
  2. Download, Configure, and Install TeXLive
    • Click on the TeXLive link above. When the page loads, click on the link "install-tl.zip" to begin the download.
    • Once the download completes, locate the installer, right-click it, choose "7-Zip" in the pop-up menu, and then "Extract files...". This will bring up the 7-Zip "Extract" window. Click "OK" to unzip the files. Open the new, unzipped, folder and double-click on "install-tl-advanced.bat" to launch the installation screen.
      • Click the appropriate "Toggle" button to set the "Default paper size" to your region.
      • Click the appropriate "Change" button to "Change file associations" to "All".
    • Now click on the "Install TeX Live" button to begin the installation. Be aware that TeXLive is composed of over 1GB of files and may take a while to download and process. When the installer completes, it will present you with a summary of any errors which may have occurred (such as timeouts/retries trying to download packages). You can safely quit the installer at this point.
  3. Download and Install GhostScript
    • For PDF printing support in TeXMaker, we'll first need to install GhostScript. Click on the GhostScript link above and download the latest release listed for your version of Windows (32 or 64 bit).
    • Once the download completes, locate the installer, double-click it, and proceed through the installation screens using the default options.
  4. Download and Install TeXMaker
    • Click on the TexMaker link above. When the page loads, click on the link "texmakerwin32_install.exe" to begin the download.
    • Once the download completes, locate the installer, double-click it, and proceed through the installation screens.
  5. Clean Up
    • Close any windows you opened to complete the above steps. Throw away any installers. You're done!

_________________
FreeEMS vehicle #23: 2003 Toyota "Toxic" Tacoma
Build page: http://forum.diyefi.org/viewtopic.php?f=3&t=1635)


Last edited by ToxicGumbo on Mon Apr 30, 2012 6:12 pm, edited 14 times in total.



Mon Mar 05, 2012 8:53 am
Profile
LQFP144 - On Top Of The Game
User avatar

Joined: Tue Jan 03, 2012 8:37 pm
Posts: 434
Location: Manhattan, KS. USA
Mac OS X (10.5-10.7)

The TeX Users Group (TUG) maintains a TeXLive distribution for Mac OS which includes nearly everything you need to get started. This distribution comes bundled with two editors: TeXShop and TeXWorks. Though either editor can be used, we will install TeXMaker instead since neither is recommended for those new to LaTeX.

Programs to download:

You might also want to install one of the following:
  • Dia - A lean and powerful diagram editor
  • InkScape - An advanced vector graphics editor

What to do:
  1. Download and Install MacTex
    • Click on the MacTeX link above. When the page loads, click on the link "MacTeX.mpkg.zip" to begin the download. Be aware that this file is over 1GB and may take a while to download.
    • Once the download completes, locate the zip file and double-click it to unarchive the installation program. This installer will appear in the same location with the extension .mpkg. Double-click the .mpkg file and proceed through the installation screens. When the installation has completed, a folder called "TeX" will appear in the Applications folder.
  2. Update and Configure the TeX System
    • From the desktop, double-click on your harddrive icon, open the "Applications" folder, then the "TeX" folder, and finally the "TeX Live Utility" application. If the utility doesn't prompt you to download updates, click on the "Actions" menu and choose "Update All Packages". This update process can take a significant amount of time to complete.
    • Click on the "Actions" menu and choose "Change Paper Size". Set this either to "A4" or "US Letter" according to your locale and click "Accept". This step will take some time and no notification will be given when the process has completed (the small, spinning wheel at the bottom-right of the utility window will disappear when the process has finished).
    • Exit the utility.
  3. Download and Install TeXMaker
    • Click on the TexMaker link above. When the page loads, click on the installer that's recommended for your version of Mac OS to begin the download.
    • Once the download completes, locate the zip file and double-click it to reveal the TeXMaker program. Double-click on your harddrive icon and drag the TexMaker icon to the "Applications" folder.
    • Open the "Applications" folder and drag the TexMaker icon down to the Mac OS dock for quick access.
  4. Clean Up
    • Close any windows you opened to complete the above steps. Throw away any installers. You're done!

_________________
FreeEMS vehicle #23: 2003 Toyota "Toxic" Tacoma
Build page: http://forum.diyefi.org/viewtopic.php?f=3&t=1635)


Last edited by ToxicGumbo on Mon Apr 30, 2012 6:25 am, edited 2 times in total.



Mon Mar 05, 2012 8:54 am
Profile
LQFP144 - On Top Of The Game
User avatar

Joined: Tue Jan 03, 2012 8:37 pm
Posts: 434
Location: Manhattan, KS. USA
Linux (Debian, Ubuntu)

Though the following instructions are intended for the Debian and Ubuntu .dpkg crowd, all packages mentioned below should exist in other dependency-based package management systems under similar names.

Programs to install:
  • TeXLive- TeX System (LaTeX engine)
  • TeXMaker - LaTeX editor & document viewer

You might also want to install one or more of the following:
  • Dia - A lean and powerful diagram editor
  • InkScape - An advanced vector graphics editor
  • Additional TeXLive support packages - Commonly referenced packages and macros
    • texlive-fonts-extra
    • texlive-generic-extra
    • texlive-humanities
    • texlive-math-extra
    • texlive-science

What to do:
  1. Download and Install TeXLive and TeXMaker
      Open a command line, type the following, and hit enter:
      Code:
      sudo apt-get update; sudo apt-get install texlive texmaker

  2. Set the Default Paper Type
      To select your default paper type, type the more appropriate of the following two commands and hit enter:
      Code:
      sudo texconfig-sys paper letter
      sudo texconfig-sys paper a4

_________________
FreeEMS vehicle #23: 2003 Toyota "Toxic" Tacoma
Build page: http://forum.diyefi.org/viewtopic.php?f=3&t=1635)


Last edited by ToxicGumbo on Thu Mar 22, 2012 4:15 am, edited 2 times in total.



Mon Mar 05, 2012 8:55 am
Profile
LQFP144 - On Top Of The Game
User avatar

Joined: Tue Jan 03, 2012 8:37 pm
Posts: 434
Location: Manhattan, KS. USA
Prepare TeXMaker for Use

    When you first run TeXMaker on any of the above platforms, look across the horizontal button bar (just below the main menus at the top) for an arrow icon followed by a "Quick Build" dropdown menu, another arrow, and then a "View Dvi" dropdown menu. These arrows are used to perform the actions selected in the dropdown menus that follow them.

    • Configure Quick Build
        To configure the default action of "Quick Build", go the "Options" menu and select "Configure TeXMaker". Click on the "Quick Build" icon in the left column of the window that appears. Click on the radio button next to "PdfLaTeX + View PDF" and click OK.

    • Change the Default Viewer
        In most cases, you'll only want your LaTeX markup to be converted directly to PDF. As a consequence, the only documents you'll create will be in PDF format, so click on the "View Dvi" menu and choose "View PDF".

    These settings are automatically saved.

A Very Quick Overview

    Notice how the TeXMaker application is split into 3 panes that are surrounding by various icons. The topmost-right pane, which is also the largest, is where you actually type or insert LaTeX markup. The pane below that is for viewing messages or errors during a build. The pane on the left provides a variety of symbols and commands used to generate the appropriate markup in your document. You can hover over any of the icons for a tool tip description of its function.

Create a Document

    Let's create a sample document. Locate the horizontal button bar and click on the first icon (which looks like a white page with a "+" on it) to start editing. Copy and paste the markup below into the TexMaker editor.

    Code:
    \documentclass{article}
    \title{My First LaTeX Document}
    \author{John Doe}
    \date{March 2012}
    \begin{document}
       \maketitle
       Hello world!
    \end{document}

    To build the PDF, first save what you've written and be sure to include the extension .tex. For this exercise, let's call the file helloworld.tex. Once saved, click on the arrow just to the left of "Quick Build". This will convert your document and open the resulting PDF so long as no problems occurred from cutting and pasting. If a problem does occur, look at the bottom pane for any error messages and adjust your markup as necessary.

Play Around

    Now that you can create a PDF using the LaTeX markup language, starting experimenting. Try inserting symbols, using different commands, or playing around with different modes. If you screw up anything too much, quit TeXMaker, nuke your settings files in $HOME/.config/xm1/ (that's the number one, not an "L"), and re-trace the steps above. Most importantly, be sure to visit www.latex-project.org to learn more about the LaTeX markup language!

_________________
FreeEMS vehicle #23: 2003 Toyota "Toxic" Tacoma
Build page: http://forum.diyefi.org/viewtopic.php?f=3&t=1635)


Thu Mar 22, 2012 2:15 am
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 14913
Location: Home sweet home!
Just my personal addition to this, and I can delete this post if Jeff wishes it to be so, but:

Above Jeff recommends TexMaker as the editor/IDE for it, however there are other decent choices:

  • TexMaker < Jeff's choice and a good default choice - I've used this when on Linux
  • TexWorks < Kind of basic UI/layout
  • TexStudio < Just tried it now, seems a bit clunky
  • TexShop < My favourite on the Mac

I've put this here for my own reference, as I often just use eclipse (TeXlipse) to edit my documents and generate on the command line, so I forget which I prefer.

Fred.

_________________
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!


Fri Feb 08, 2013 2:04 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.