LaTeX on Windows - University of California,...

59
LaTeX on Windows For making papers in academia V1.0 Dean Truong, VCL University of California, Davis 1

Transcript of LaTeX on Windows - University of California,...

Page 1: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

LaTeX on Windows

For making papers in academia

V1.0

Dean Truong, VCL

University of California, Davis

1

Page 2: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Outline

Introduction

Preliminary Tools

Eclipse IDE

TeXlipse

Thesis Template

Version Control and Backup with

Subclipse+Subversion+Apache

Miscellaneous

2

Page 3: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Introduction

This presentation is a simple “getting started” type of tutorial

It will not teach you the details of using each of the application/tools presented here

It will not teach you LaTeX or Subversion

Further research on your part is required to do anything more than is shown here

Learn to explore things on your own (in other words: USE GOOGLE!)

3

Page 4: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Basic Requirements

Windows XP Service Pack 2 or higher

$0 USD

(Excluding the cost of Windows + compatible PC)

If you want a backup server you’ll need a PC

that is connected to the internet with a static

IP address…preferably with a static DNS

Should be $0 if you work at a company or school

4

Page 5: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

List of Applications

PDF Viewer: Sumatra PDF

LaTeX Compiler: MiKTeX

LaTeX Editor: Eclipse IDE + TeXlipse plugin

Version Control: Subversion + Subclipse

plugin

Backup Server: Apache HTTP Server

5

Page 6: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Outline

Introduction

Preliminary Tools

Eclipse IDE

TeXlipse

Thesis Template

Version Control and Backup with

Subclipse+Subversion+Apache

Miscellaneous

6

Page 7: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Preliminary Tools

Download: Sumatra PDF and MiKTeX

http://blog.kowalczyk.info/software/sumatrapdf/do

wnload.html

http://miktex.org/

7

Page 8: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Preliminary Tools (cont.)

Sumatra PDF installation is straightforward

Get the complete MiKTeX installation

8

Page 9: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Preliminary Tools (cont.)

Finish the MiKTeX installation…

It may take a long time for slow internet connections

9

Page 10: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Outline

Introduction

Preliminary Tools

Eclipse IDE

TeXlipse

Thesis Template

Version Control and Backup with

Subclipse+Subversion+Apache

Miscellaneous

10

Page 11: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Eclipse IDE

Download: http://www.eclipse.org/

Click on “Downloads”

11

Page 12: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Eclipse IDE (cont.)

Click on “Projects”

Click on filter by tag:

“all”

Click on Eclipse

Project “Eclipse

Platform”

12

Page 13: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Eclipse IDE (cont.)

Click on a version

I picked the Latest

Release…

13

Page 14: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Eclipse IDE (cont.)

Click on “Platform

Runtime Binary”

Download for the

appropriate Windows

version

14

Page 15: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Eclipse IDE (cont.)

After downloading

the *.zip file…

Unzip the “eclipse”

folder into

C:\Program Files

Make a shortcut of

eclipse.exe into the

Desktop or Start

Menu or …

15

Page 16: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Outline

Introduction

Preliminary Tools

Eclipse IDE

TeXlipse

Thesis Template

Version Control and Backup with

Subclipse+Subversion+Apache

Miscellaneous

16

Page 17: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

TeXlipse Plugin

Open

Eclipse IDE

Click on

“Help”

“Install New

Software…”

17

Page 18: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

TeXlipse Plugin (cont.)

Add Site: http://texlipse.sourceforge.net

18

Page 19: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

TeXlipse Plugin (cont.)

Install TeXlipse (straightforward)

19

Select the latest version of

“TeXlipse” and continue

Page 20: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

TeXlipse Plugin (cont.)

Click on “Window” “Preferences”

Go to “Texlipse” “Viewer Settings” Add new viewer

configuration

Fill out configuration as shown here

20

Page 21: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

TeXlipse Plugin (cont.)

Alternate “forward

search” command

(Forward search

allows you to

preview the LaTeX

generated PDF at

the location

associated with your

current cursor

position in a LaTeX

source file—Cntrl-4)

21

Page 22: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

TeXlipse Plugin (cont.)

Make Sumatra PDF the top

(preferred/default) viewer

22

Page 23: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

TeXlipse Plugin (cont.)

Go to

“Texlipse”

“Builder

Settings” and

make sure all

the paths are

defined as

shown here

23

Page 24: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

TeXlipse Plugin (cont.)

Add “-synctex=1” for PdfLatexto facilitate synchronization between source LaTeX files and output PDF

“-synctex=1” should be added for Dvipdf and Ps2pdf if those are also used 24

Page 25: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Reverse (Inverse) Search

Execute the above command once and close Sumatra PDF You may have to change the

paths based on your installation

(Reverse (inverse) search allows you to double click on the LaTeX generated PDF to take you to the corresponding place in a source LaTeX file)

25

"C:\Program Files\SumatraPDF\SumatraPDF.exe" -inverse-search "java -classpath

\"C:\Program Files\eclipse\plugins\net.sourceforge.texlipse_1.4.0\texlipse.jar\"

net.sourceforge.texlipse.viewer.util.FileLocationClient -p 55000 -f \"%f\" -l %l"

Page 26: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Making a New LaTeX Project

26

Click on “File” “New”

“Project…”

Choose “Texlipse”

“LaTeX Project”

Page 27: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Making a New LaTeX Project

(cont.)

27

*.pdf output

Build commands:

*.pdf graphics only =

pdflatex.exe

*.eps graphics only =

latex.exe+dvips.exe+ps2pdf.exe

Page 28: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Outline

Introduction

Preliminary Tools

Eclipse IDE

TeXlipse

Thesis Template

Version Control and Backup with

Subclipse+Subversion+Apache

Miscellaneous

28

Page 29: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Thesis Templates

Get the approprate thesis template files

Put the files (*.cls and *.clo) into the same folder as your project

Include the document “class”; examples: \documentclass[twoside, 11pt]{ucdthesis}

Old 2002 UC Davis thesis template

\documentclass[MS, twoside]{ucdavisthesis}

Ryan’s UC Davis thesis template

For further details see example thesis project folders enclosed in example_thesis.zip

29

Page 30: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Thesis Templates (cont.)

Downloading the latest (Ryan’s) UC Davis

template:

http://tug.ctan.org/tex-

archive/macros/latex/contrib/ucdavisthesis/

30

Page 31: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Thesis Templates (cont.)

Unzip ucdavisthesis.zip

In a command line window execute:

pdflatexucdavisthesis.ins

Four files should be generated:

ucdavisthesis.cls

ucdthesis1*.clo

31

Page 32: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Outline

Introduction

Preliminary Tools

Eclipse IDE

TeXlipse

Thesis Template

Version Control and Backup with

Subclipse+Subversion+Apache

Miscellaneous

32

Page 33: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Subclipse Plugin Install

Install in the same way as TeXlipse Click on “Help” “Install

New Software…”

Go to http://subclipse.tigris.org/ Find the latest update link

33

Page 34: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Subversion Install

34

Go to http://subversion.apache.org/ Click on “Getting Subversion” “Binary Packages”

Click on “Windows”; click on the “Apache 2.2-compatible” link

Get the latest stable binary

Page 35: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Subversion Install (cont.)

35

If given a choice

choose Apache 2.2.x

Change path to make life easy

Page 36: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Apache Install

36

Download:

http://httpd.apac

he.org/download.

cgi

Find the latest

stable build

Download the

“MSI Installer”

OpenSSL

version

Page 37: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Apache Install (cont.)

Double check DNS,

email, and port settings

Do “Typical” installation

Change path to make

life easy

37

Page 38: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Apache Setup

38

Open up the port for Apache

if you have Windows

Firewall turned on

Page 39: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Apache Setup (cont.)

Test if your server is now running and can be seen by another computer/device You should at least be

able to see this on your own computer (server) with a browser

Use ipconfig /all to find your IP and DNS address

Or use http://ipgoat.com

39

Page 40: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Subversion—Apache Setup

40

Create the path to the repository (make new folders if required) and then execute: svnadmincreate to generate the SVN files/folders

Copy mod_authz_svn.soand mod_dav_svn.sofrom C:\svn\bin to C:\Apache2.2\modules

Page 41: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Subversion—Apache Setup

(cont.)

Add configuration lines to C:\Apache2.2\conf\httpd.conf as shown above Notice that configuration paths have forward-slashes

(/) instead of the DOS back-slash convention (\)41

Page 42: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Subversion—Apache Setup

(cont.)

Make a C:\etc directory

Make passwords for project collaborators

“-c” option only used the first time so that the

svn-auth-file is created42

Page 43: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Subversion—Apache Setup

(cont.)

Create C:/etc/svn-acl

configuration file

Make groups (teams)

Point to the name

(and root) of the SVN

repository

Set up the appropriate

permissions

43

Page 44: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Subversion—Apache Setup

(cont.)

Create C:/etc/subversion.conf configuration file

Setup the HTTP location and point to the path of the SVN repository

Point to C:/etc/svn-auth-file

Point to C:/etc/svn-acl

44

Page 45: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Subversion—Apache Setup

(cont.)

Restart the Apache HTTP Server

45

Page 46: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Subversion—Apache Setup

(cont.)

Verify repository access

Example: http://www.myserver.com/MastersThesis

46

Page 47: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Subclipse Project

Click on “New”

“Other…”

Select “SVN”

“Checkout Project

from SVN”

47

Page 48: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Subclipse Project (cont.)

48

Page 49: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Subclipse Project (cont.)

49

Page 50: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Import into Subclipse Project

You can

import LaTeX

files from

another

project into

the Subclipse

project

50

Page 51: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Import into Subclipse Project

(cont.)

51

Select “General”

“File System”

Get from old

directory all

the files

Page 52: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Import into Subclipse Project

(cont.)

Make sure to change (if necessary) the

LaTeX properties to what you expect

52

Page 53: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Commit Subclipse Project

“Commit”

(upload

new/modified

files) to the

SVN/Apache

server

53

Page 54: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Commit Subclipse Project

(cont.)

54

Page 55: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Commit Subclipse Project

(cont.)

You can also see the

committed files using a

browser

55

Page 56: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Backing Up

Not Done Yet

56

Page 57: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Outline

Introduction

Preliminary Tools

Eclipse IDE

TeXlipse

Thesis Template

Version Control and Backup with

Subclipse+Subversion+Apache

Miscellaneous

57

Page 58: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Miscellaneous

Dealing with *.eps

Making comments with pdfcomments

Dealing with IEEE LaTeX templates

Coming Soon…

Dealing with ACM LaTeX templates

Coming Soon…

Additional Tips???

58

Page 59: LaTeX on Windows - University of California, Davisvcl.ece.ucdavis.edu/pubs/latex.windows.guide_v1.2010.05.28.pdf · LaTeX on Windows For making papers in academia V1.0 Dean Truong,

Miscellaneous

Not Done Yet

59