57
L A T E X for translators

LaTeX for translators

Embed Size (px)

Citation preview

LATEXfor translators

LATEX for translatorsA brief introduction

Marc Figueras

Universitat Pompeu Fabra

May 31, 2010

What is LATEX? Working & translating in LATEX

Outline

1 What is LATEX?Main features, pros and consStructure of a LATEX documentHow to write a document in LATEXSome examples

2 Working & translating in LATEXWhat do I need to work in LATEX?How to translate a LATEX document

What is LATEX? Working & translating in LATEX

Outline

1 What is LATEX?Main features, pros and consStructure of a LATEX documentHow to write a document in LATEXSome examples

2 Working & translating in LATEXWhat do I need to work in LATEX?How to translate a LATEX document

What is LATEX? Working & translating in LATEX

What is LATEX?

LATEX is a document preparation system for high-qualitytypesetting.

It is most often used for medium-to-large technical orscientific documents and, in general, when documentquality is very important.

It is not a word processor. It is not a WYSIWYG system.

LATEX processes a plain text file with your text and all formatand structure mark-ups and gives you the final document.

Widely used by academic publishers and researchmagazines in Physics, Mathematics, and Computing.

What is LATEX? Working & translating in LATEX

What is LATEX?

LATEX is a document preparation system for high-qualitytypesetting.

It is most often used for medium-to-large technical orscientific documents and, in general, when documentquality is very important.

It is not a word processor. It is not a WYSIWYG system.

LATEX processes a plain text file with your text and all formatand structure mark-ups and gives you the final document.

Widely used by academic publishers and researchmagazines in Physics, Mathematics, and Computing.

What is LATEX? Working & translating in LATEX

What is LATEX?

LATEX is a document preparation system for high-qualitytypesetting.

It is most often used for medium-to-large technical orscientific documents and, in general, when documentquality is very important.

It is not a word processor. It is not a WYSIWYG system.

LATEX processes a plain text file with your text and all formatand structure mark-ups and gives you the final document.

Widely used by academic publishers and researchmagazines in Physics, Mathematics, and Computing.

What is LATEX? Working & translating in LATEX

What is LATEX?

LATEX is a document preparation system for high-qualitytypesetting.

It is most often used for medium-to-large technical orscientific documents and, in general, when documentquality is very important.

It is not a word processor. It is not a WYSIWYG system.

LATEX processes a plain text file with your text and all formatand structure mark-ups and gives you the final document.

Widely used by academic publishers and researchmagazines in Physics, Mathematics, and Computing.

What is LATEX? Working & translating in LATEX

What is LATEX?

LATEX is a document preparation system for high-qualitytypesetting.

It is most often used for medium-to-large technical orscientific documents and, in general, when documentquality is very important.

It is not a word processor. It is not a WYSIWYG system.

LATEX processes a plain text file with your text and all formatand structure mark-ups and gives you the final document.

Widely used by academic publishers and researchmagazines in Physics, Mathematics, and Computing.

What is LATEX? Working & translating in LATEX

What is LATEX?

LATEX is a document preparation system for high-qualitytypesetting.

It is most often used for medium-to-large technical orscientific documents and, in general, when documentquality is very important.

It is not a word processor. It is not a WYSIWYG system.

LATEX processes a plain text file with your text and all formatand structure mark-ups and gives you the final document.

Widely used by academic publishers and researchmagazines in Physics, Mathematics, and Computing.

What is LATEX? Working & translating in LATEX

Advantages

High typesetting quality.

Advanced mathematical typesetting support.

Advanced cross-references and generation of bibliographiesand indexes.

Great multilingual support.

Extremely customizable.

It works with Linux, Windows, Unix and Mac.

You write your text in any text editor.

It’s free and open-source!

What is LATEX? Working & translating in LATEX

Problems for occasional users

Complex syntax at first sight.

It needs a learning period. Steep learning curve if you wantto go beyond basic knowledge.

Unfamiliar workflow for WYSIWYG users (write code ⇒compile ⇒ see result ⇒ debug ).

Complex for achieving fancy stuff.

What is LATEX? Working & translating in LATEX

Structure of a LATEX document

PreambleContains all commands, packages, data and user-definedenvironments affecting the whole document.

Body

Contains all specific information of the document: parts,chapters and sections structure, and, of course, the text itself!

What is LATEX? Working & translating in LATEX

Structure of a LATEX document

PreambleContains all commands, packages, data and user-definedenvironments affecting the whole document.

1 It begins defining the type of document (article, book,report, etc.) and all related options.

2 Then you can add any package for multilingual support,character encodings, fonts, graphics, fancy headers andfooters and almost any thing you can imagine...

3 It also contains generic data, like title, authors, date, etc.4 And you can define here your own customized commands

or environments.

What is LATEX? Working & translating in LATEX

Structure of a LATEX document

Body

Contains all specific information of the document: parts,chapters and sections structure, and, of course, the text itself!

1 You can add commands for creating a title page, anabstract, a table of contents, and some other stuff.

2 And then you write your text, structured in chapters,sections and subsections.

3 By means of LATEX commands you mark format, sectioning,inclusion of images, labels for cross-references,bibliographical references, etc.

What is LATEX? Working & translating in LATEX

How to write a document in LATEX

3 steps...

1 Write the code with a text editor.Use any text editor!The file with the code is just an ASCII text file withextension .tex.

2 Compile the .tex file.Use LATEX program.It will give you a final document in PDF, PostScript or DVIformats.

3 See the result.Use your favorite viewer (like Adobe Reader for PDF).

What is LATEX? Working & translating in LATEX

How to write a document in LATEX

3 steps...

1 Write the code with a text editor.Use any text editor!The file with the code is just an ASCII text file withextension .tex.

2 Compile the .tex file.Use LATEX program.It will give you a final document in PDF, PostScript or DVIformats.

3 See the result.Use your favorite viewer (like Adobe Reader for PDF).

What is LATEX? Working & translating in LATEX

How to write a document in LATEX

3 steps...

1 Write the code with a text editor.Use any text editor!The file with the code is just an ASCII text file withextension .tex.

2 Compile the .tex file.Use LATEX program.It will give you a final document in PDF, PostScript or DVIformats.

3 See the result.Use your favorite viewer (like Adobe Reader for PDF).

What is LATEX? Working & translating in LATEX

How to write a document in LATEX

3 steps...

1 Write the code with a text editor.Use any text editor!The file with the code is just an ASCII text file withextension .tex.

2 Compile the .tex file.Use LATEX program.It will give you a final document in PDF, PostScript or DVIformats.

3 See the result.Use your favorite viewer (like Adobe Reader for PDF).

What is LATEX? Working & translating in LATEX

How to write a document in LATEX

Schematically, the process is as follows:

What is LATEX? Working & translating in LATEX

A simple example

Code for a simple document:

\documentclass{article}

\title{Defoe’s \emph{Memoirs of Capt. George Carleton}}

\author{James Stanhope}

\date{\today}

\begin{document}

\maketitle

He flattered himself, that that long-lived obstacle

to his ambition thus removed, his successor would

never fall into those measures, which he had wisely

concerted for the liberties of Europe.

% And this is just a comment, it has no effect

\end{document}

What is LATEX? Working & translating in LATEX

A simple example

And the result:

Defoe’s Memoirs of Capt. George Carleton

James Stanhope

May 27, 2010

He flattered himself, that that long-lived obstacle to his ambition thus re-moved, his successor would never fall into those measures, which he had wiselyconcerted for the liberties of Europe.

1

What is LATEX? Working & translating in LATEX

A slightly more complex one...

\documentclass[oneside,a4paper,11pt]{article}

\usepackage[latin1]{inputenc}

\usepackage[latin,icelandic,catalan,english]{babel}

\usepackage{palatino}

\title{An extremely verbose and useless title}

\author{Me and myself}

\begin{document}

\maketitle

\begin{abstract}

Here goes an interesting summary.

\end{abstract}

\tableofcontents

\section{Trends in exobiology}

\label{PrimeraSeccio}

Lorem ipsum dolor sit amet, consectetur

adipisicing elit, sed do \textbf{eiusmod} tempor

incididunt ut labore et \emph{dolore} magna aliqua.

%%% seguim a la pagina seguent

What is LATEX? Working & translating in LATEX

A slightly more complex one...

\subsection{Latest results for our experiment}

\label{PrimeraSubSeccio}

In blandit arcu in lectus. Quisque eleifend.

Cras non felis. Aliquam id ante sed justo aliquet

venenatis. Cum sociis natoque penatibus et magnis

dis parturient montes, nascetur ridiculus mus.

\end{document}

What is LATEX? Working & translating in LATEX

A slightly more complex one...

And the result:

An extremely verbose and useless title

Me and myself

May 26, 2010

Abstract

Here goes an interesting summary, which I expanded for the finaldocument in order to show how breathtakingly wondrous it is.

Contents

1 Trends in exobiology 11.1 Latest results for our experiment . . . . . . . . . . . . . . . . 1

1 Trends in exobiology

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmodtempor incididunt ut labore et dolore magna aliqua.

1.1 Latest results for our experiment

In blandit arcu in lectus. Quisque eleifend. Cras non felis. Aliquam id antesed justo aliquet venenatis. Cum sociis natoque penatibus et magnis disparturient montes, nascetur ridiculus mus.

1

What is LATEX? Working & translating in LATEX

And the last one...

\documentclass[oneside,a4paper,10pt]{article}

\usepackage[latin1]{inputenc}

\usepackage[catalan]{babel}

\usepackage{charter}

\usepackage[bitstream-charter]{mathdesign}

\title{El darrer exemple}

\begin{document}

\maketitle

Equacions simples, com $x^y$ o $x_n = \sqrt{a + b}$ es poden escriure

en lınia tancant-les entre un parell de sımbols de dolar. Les

equacions mes complicades s’han d’escriure en l’entorn

\textbf{equation}, com aquesta:

\begin{equation}

\theta_1 = \arcsin \left( \sqrt{\left(\frac{n_2}{n_1}\right)^2

- \left(\frac{n_3}{n_1}\right)^2} \right).

\end{equation}

O si voleu l’equacio d’ones en 3 dimensions:

\begin{equation}

\nabla^2 \vec{u} = k {\partial^2 \vec{u} \over \partial t^2}

\end{equation}

\end{document}

What is LATEX? Working & translating in LATEX

And the last one...

The result:

El darrer exemple

26 de maig de 2010

Equacions simples, com x y o xn =p

a+ b es poden escriure en línia tancant-lesentre un parell de símbols de dòlar. Les equacions més complicades s’han d’escriureen l’entorn equation, com aquesta:

θ1 = arcsin

�

n2

n1

�2

−�

n3

n1

�2 . (1)

O si voleu l’equació d’ones en 3 dimensions:

∇2~u= k∂ 2~u

∂ t2 (2)

1

What is LATEX? Working & translating in LATEX

What do I need to work in LATEX?

A LATEX distribution

There are many distributions. For Windows I recommendproTeXt or, especially, MikTeX.

A text editorAny simple text editor, like Windows notepad.

Any good text editor (NoteTab, UltraEdit, TextPad, etc.).

Any editor designed for LATEX: TeXnic Center, TeXmaker.

A viewerLATEX output can be in PDF, DVI or PostScript. You can use PDFfor most documents, so you also need a PDF viewer, like AdobeReader, which probably you already have.

What is LATEX? Working & translating in LATEX

What do I need to work in LATEX?

A LATEX distribution

There are many distributions. For Windows I recommendproTeXt or, especially, MikTeX.

A text editorAny simple text editor, like Windows notepad.

Any good text editor (NoteTab, UltraEdit, TextPad, etc.).

Any editor designed for LATEX: TeXnic Center, TeXmaker.

A viewerLATEX output can be in PDF, DVI or PostScript. You can use PDFfor most documents, so you also need a PDF viewer, like AdobeReader, which probably you already have.

What is LATEX? Working & translating in LATEX

What do I need to work in LATEX?

A LATEX distribution

There are many distributions. For Windows I recommendproTeXt or, especially, MikTeX.

A text editorAny simple text editor, like Windows notepad.

Any good text editor (NoteTab, UltraEdit, TextPad, etc.).

Any editor designed for LATEX: TeXnic Center, TeXmaker.

A viewerLATEX output can be in PDF, DVI or PostScript. You can use PDFfor most documents, so you also need a PDF viewer, like AdobeReader, which probably you already have.

What is LATEX? Working & translating in LATEX

What do I need to work in LATEX?

A LATEX distribution

There are many distributions. For Windows I recommendproTeXt or, especially, MikTeX.

A text editorAny simple text editor, like Windows notepad.

Any good text editor (NoteTab, UltraEdit, TextPad, etc.).

Any editor designed for LATEX: TeXnic Center, TeXmaker.

A viewerLATEX output can be in PDF, DVI or PostScript. You can use PDFfor most documents, so you also need a PDF viewer, like AdobeReader, which probably you already have.

What is LATEX? Working & translating in LATEX

Installing a distribution

Let’s install MikTeX. Go to http://www.miktex.org:

What is LATEX? Working & translating in LATEX

Installing a distribution

You can choose a basic installation or a complete installation:

Once the installer is downloaded, just click on it and accept all optionspresented with the default values.

What is LATEX? Working & translating in LATEX

Installing a distribution

Once installed it’s a good idea to update the configuration. Go to theprogram group ‘MikTeX’ in the Windows ‘Start’ menu and choose‘Settings’:

Execute ‘Settings’ (‘Options’ inprevious versions)

You can set here language supportoptions

What is LATEX? Working & translating in LATEX

Installing a distribution

For managing packages go to the program group ‘MikTeX’ in theWindows ‘Start’ menu and choose ‘Package Manager’:

Here you can add/remove packages (if you installed the whole MikTeXdistribution, all packages are already installed in your computer).

What is LATEX? Working & translating in LATEX

Installing a distribution

If you change/add/remove anything, the manager will update theMikTeX installation...

Note that MikTeX can also add packages “on the fly”, that is, when you

compile a document which needs some package not installed in your

computer yet, it will automatically download it from any Internet LATEX

repository.

What is LATEX? Working & translating in LATEX

Installing a text editor

Let’s use TeXnic Center as an example... go tohttp://www.texniccenter.org/

And download the installer and install the program!

What is LATEX? Working & translating in LATEX

Installing a text editor

Let’s use TeXnic Center as an example... go tohttp://www.texniccenter.org/

And download the installer and install the program!

What is LATEX? Working & translating in LATEX

Installing a text editor

Then TeXnic Center appears on Windows ‘Start’ menu:

Note that if you have not a previously installed LATEX distribution, TeXnic

Center will ask you where is it. You can simply ignore it. TeXnic Center works

equally well without having LATEX installed.

What is LATEX? Working & translating in LATEX

Installing a text editor

TeXnic Center:

What is LATEX? Working & translating in LATEX

Installing a text editor

And working in some document:

What is LATEX? Working & translating in LATEX

Installing a text editor

TeXnic Center calls directly LATEX for compiling as well as anyviewer for visualizing the final result. You must specify theoutput type and then just click a button in the top bar.

Maybe it seems all somewhat weird, but it’s quite direct andstreamlined.

What is LATEX? Working & translating in LATEX

As a translator, what do I really need?

A LATEX distribution

There are many distributions. For Windows I recommendproTeXt or, especially, MikTeX.

A text editorAny simple text editor, like Windows notepad.

Any good text editor (NoteTab, UltraEdit, TextPad, etc.).

Any editor designed for LATEX: TeXnic Center, TeXmaker.

A viewerLATEX output can be in PDF, DVI or PostScript. You can use PDFfor most documents, so you also need a PDF viewer, like AdobeReader, which probably you already have.

What is LATEX? Working & translating in LATEX

As a translator, what do I really need?

A LATEX distribution

There are many distributions. For Windows I recommendproTeXt or, especially, MikTeX.

A text editorAny simple text editor, like Windows notepad.

Any good text editor (NoteTab, UltraEdit, TextPad, etc.).

Any editor designed for LATEX: TeXnic Center, TeXmaker.

A viewerLATEX output can be in PDF, DVI or PostScript. You can use PDFfor most documents, so you also need a PDF viewer, like AdobeReader, which probably you already have.

What is LATEX? Working & translating in LATEX

As a translator, what do I really need?

A LATEX distribution

There are many distributions. For Windows I recommendproTeXt or, especially, MikTeX.

A text editorAny simple text editor, like Windows notepad.

Any good text editor (NoteTab, UltraEdit, TextPad, etc.).

Any editor designed for LATEX: TeXnic Center, TeXmaker.

A viewerLATEX output can be in PDF, DVI or PostScript. You can use PDFfor most documents, so you also need a PDF viewer, like AdobeReader, which probably you already have.

What is LATEX? Working & translating in LATEX

As a translator, what do I really need?

Open your file and just translate...

You can forget about compiling and checking the finaldocument. That’s the editor’s work.

But of course there are some things that you must keep inmind...

What is LATEX? Working & translating in LATEX

How to translate a LATEX document

On the preamble

Usually you don’t want to mess with all those preamblecommands, but there are some ones worth remarking...

Babel specifications: the last language specified is thedocument default language.\usepackage{french,german,english} ⇒\usepackage{french,german,spanish}.

Titles and subtitles. \title{Lasing without inversion}

⇒ \title{Emision laser sin inversion}.

What is LATEX? Working & translating in LATEX

How to translate a LATEX document

On the preamble

Usually you don’t want to mess with all those preamblecommands, but there are some ones worth remarking...

Babel specifications: the last language specified is thedocument default language.\usepackage{french,german,english} ⇒\usepackage{french,german,spanish}.

Titles and subtitles. \title{Lasing without inversion}

⇒ \title{Emision laser sin inversion}.

What is LATEX? Working & translating in LATEX

How to translate a LATEX document

On the preamble

Usually you don’t want to mess with all those preamblecommands, but there are some ones worth remarking...

Babel specifications: the last language specified is thedocument default language.\usepackage{french,german,english} ⇒\usepackage{french,german,spanish}.

Titles and subtitles. \title{Lasing without inversion}

⇒ \title{Emision laser sin inversion}.

What is LATEX? Working & translating in LATEX

How to translate a LATEX document

On the preamble

Usually you don’t want to mess with all those preamblecommands, but there are some ones worth remarking...

Babel specifications: the last language specified is thedocument default language.\usepackage{french,german,english} ⇒\usepackage{french,german,spanish}.

Titles and subtitles. \title{Lasing without inversion}

⇒ \title{Emision laser sin inversion}.

What is LATEX? Working & translating in LATEX

How to translate a LATEX document

Headers and footers and related stuff. You can findcommands specifying headers and footers, things like\rfoot{This is a right footer} ⇒\rhead{Esto es un pie derecho}.

Maybe some user-defined commands including text whichappears in the final document.\newcommand{\teoremaguais}{$\text{ }\bullet$ Theorem}

⇒\newcommand{\teoremaguais}{$\text{ }\bullet$ Teorema}.But don’t worry too much about this!

What is LATEX? Working & translating in LATEX

How to translate a LATEX document

Headers and footers and related stuff. You can findcommands specifying headers and footers, things like\rfoot{This is a right footer} ⇒\rhead{Esto es un pie derecho}.

Maybe some user-defined commands including text whichappears in the final document.\newcommand{\teoremaguais}{$\text{ }\bullet$ Theorem}

⇒\newcommand{\teoremaguais}{$\text{ }\bullet$ Teorema}.But don’t worry too much about this!

What is LATEX? Working & translating in LATEX

How to translate a LATEX document

On the body

The main part you have to worry about...

Of course, the text to be translated!

Be careful with all sectioning commands, like \chapter{},\section{}, etc.

Be careful with all formatting commands, \emph{} foritalics, \textbf{} for boldface, \textsc{} for small caps,etc. according to the target language.

Be careful not to translate internal labels and references(\label{} and \ref{}). They don’t appear in the outputtext.

Don’t forget figures titles and captions. Don’t forget tablestitles and headers.

What is LATEX? Working & translating in LATEX

How to translate a LATEX document

On the body

The main part you have to worry about...

Of course, the text to be translated!

Be careful with all sectioning commands, like \chapter{},\section{}, etc.

Be careful with all formatting commands, \emph{} foritalics, \textbf{} for boldface, \textsc{} for small caps,etc. according to the target language.

Be careful not to translate internal labels and references(\label{} and \ref{}). They don’t appear in the outputtext.

Don’t forget figures titles and captions. Don’t forget tablestitles and headers.

What is LATEX? Working & translating in LATEX

How to translate a LATEX document

On the body

The main part you have to worry about...

Of course, the text to be translated!

Be careful with all sectioning commands, like \chapter{},\section{}, etc.

Be careful with all formatting commands, \emph{} foritalics, \textbf{} for boldface, \textsc{} for small caps,etc. according to the target language.

Be careful not to translate internal labels and references(\label{} and \ref{}). They don’t appear in the outputtext.

Don’t forget figures titles and captions. Don’t forget tablestitles and headers.

What is LATEX? Working & translating in LATEX

How to translate a LATEX document

And that’s all!

Presentacio elaborada amb LATEX i el paquet Beamer

Aquesta obra esta subjecta a una llicencia Reconeixement-Compartir Igual3.0 Espanya de Creative Commons. Per veure’n una copia, visiteu

http://creativecommons.org/licenses/by-sa/3.0/es/