Sunteți pe pagina 1din 89

Introduction Document Types Special Material Wrapping Up

LATEX: More Than Just Academic Papers and Theses

Lim Lian Tze


liantze@gmail.com
http://liantze.penguinattack.org/

cbna

Malaysian Open Source Conference 2011

Lim Lian Tze | mosc 2011 1 / 48


Introduction Document Types Special Material Wrapping Up

Contents

1 What are TEX, LATEX and Friends?

2 Document Types

3 Special Material

4 Wrapping Up

Lim Lian Tze | mosc 2011 2 / 48


Introduction Document Types Special Material Wrapping Up

Contents

1 What are TEX, LATEX and Friends?

2 Document Types

3 Special Material

4 Wrapping Up

Lim Lian Tze | mosc 2011 3 / 48


Introduction Document Types Special Material Wrapping Up

What are TEX and LATEX, and Friends?

TEX ASCII TeX, /tEx/, /tEk/


A computer typesetting system created by Donald Knuth
for ‘the creation of beautiful books’

Lim Lian Tze | mosc 2011 4 / 48


Introduction Document Types Special Material Wrapping Up

What are TEX and LATEX, and Friends?

LATEX ASCII LaTeX, /"leItEx/, /"leItEk/, /"lA:tEx/, /"lA:tEk/


A document preparation system by Leslie Lamport

Lim Lian Tze | mosc 2011 4 / 48


Introduction Document Types Special Material Wrapping Up

What are TEX and LATEX, and Friends?

Binaries 𝜀-TEX: additional primitives to TEX


pdfTEX: additional PDF-related primitives
XETEX: native UTF-8 input; can access system fonts
LuaTEX: includes the Lua scripting engine

Lim Lian Tze | mosc 2011 4 / 48


Introduction Document Types Special Material Wrapping Up

What are TEX and LATEX, and Friends?

Binaries 𝜀-TEX: additional primitives to TEX


pdfTEX: additional PDF-related primitives
XETEX: native UTF-8 input; can access system fonts
LuaTEX: includes the Lua scripting engine

Lim Lian Tze | mosc 2011 4 / 48


Introduction Document Types Special Material Wrapping Up

What are TEX and LATEX, and Friends?

Friends BIBTEX, MakeIndex, METAFONT, METAPOST, . . .


http://www.ctan.org/what_is_tex.html

Lim Lian Tze | mosc 2011 4 / 48


Introduction Document Types Special Material Wrapping Up

Why?
From http://www.ctan.org/what_is_tex.html

Output Quality Freedom


It has the best output. It’s free.
It knows typesetting. It runs anywhere.

Superior Engineering Popularity


It’s fast. It’s the standard (in
It’s stable. academia and science).
It’s not rigid (extensible).
Plain text input.
Many output types.

Lim Lian Tze | mosc 2011 5 / 48


Introduction Document Types Special Material Wrapping Up

Where Would I Want to Use LATEX?

Documents with complex structures


Lots of mathematics

Lim Lian Tze | mosc 2011 6 / 48


Introduction Document Types Special Material Wrapping Up

Where Would I Want to Use LATEX?

Documents with complex structures


Lots of mathematics (or other specific needs)

Lim Lian Tze | mosc 2011 6 / 48


Introduction Document Types Special Material Wrapping Up

Where Would I Want to Use LATEX?

Documents with complex structures


Lots of mathematics (or other specific needs)
When publishers require them

Lim Lian Tze | mosc 2011 6 / 48


Introduction Document Types Special Material Wrapping Up

Where Would I Want to Use LATEX?

Documents with complex structures


Lots of mathematics (or other specific needs)
When publishers require them
Batch processing

Lim Lian Tze | mosc 2011 6 / 48


Introduction Document Types Special Material Wrapping Up

Where Would I Want to Use LATEX?

Documents with complex structures


Lots of mathematics (or other specific needs)
When publishers require them
Batch processing
Back-end of other applications

Lim Lian Tze | mosc 2011 6 / 48


Introduction Document Types Special Material Wrapping Up

How Do I Use It?

1 Write a plain text LATEX file (.tex)

Lim Lian Tze | mosc 2011 7 / 48


Introduction Document Types Special Material Wrapping Up

How Do I Use It?

1 Write a plain text LATEX file (.tex)


2 Run it through pdflatex or xelatex → PDF output
(or latex + dvips + ps2pdf for DVI + PS + PDF)

Lim Lian Tze | mosc 2011 7 / 48


Introduction Document Types Special Material Wrapping Up

How Do I Use It?

1 Write a plain text LATEX file (.tex)


2 Run it through pdflatex or xelatex → PDF output
(or latex + dvips + ps2pdf for DVI + PS + PDF)
3 Run bibtex and/or makeindex to process bibliographies, indices

Lim Lian Tze | mosc 2011 7 / 48


Introduction Document Types Special Material Wrapping Up

How Do I Use It?

1 Write a plain text LATEX file (.tex)


2 Run it through pdflatex or xelatex → PDF output
(or latex + dvips + ps2pdf for DVI + PS + PDF)
3 Run bibtex and/or makeindex to process bibliographies, indices
4 Re-run pdflatex to resolve references and pointers

Lim Lian Tze | mosc 2011 7 / 48


Introduction Document Types Special Material Wrapping Up

Example .tex File


\documentclass[a4paper,11pt]{article}
\author{Lim Lian Tze}
\title{An Introductory Paper}
\date{\today}
\usepackage[english]{babel}

\begin{document}
\maketitle
\tableofcontents

\begin{abstract}
This paper introduces\ldots
\end{abstract}

\section{Introduction}
We consider\ldots

\section{State of the Art}


We look at\ldots

\subsection{Document Formats}
There are many\ldots
\end{document}

Lim Lian Tze | mosc 2011 8 / 48


Introduction Document Types Special Material Wrapping Up

Example .tex File


\documentclass[a4paper,11pt]{article}
\author{Lim Lian Tze}
\title{An Introductory Paper}
\date{\today}
\usepackage[english]{babel}

\begin{document}
\maketitle
\tableofcontents
pdflatex
\begin{abstract}
This paper introduces\ldots
\end{abstract}

\section{Introduction}
We consider\ldots

\section{State of the Art}


We look at\ldots

\subsection{Document Formats}
There are many\ldots
\end{document}

Lim Lian Tze | mosc 2011 8 / 48


Introduction Document Types Special Material Wrapping Up

Example .tex File


\documentclass[a4paper,11pt]{article} An Introductory Paper
\author{Lim Lian Tze} Lim Lian Tze
\title{An Introductory Paper} June 7, 2011
\date{\today}
\usepackage[english]{babel}
Contents
1 Introduction 1
\begin{document}
2 State of the Art 1
\maketitle 2.1 Document Formats . . . . . . . . . . . . . . . . . . . . . . . . 1
\tableofcontents
Abstract

pdflatex This paper introduces. . .


\begin{abstract}
This paper introduces\ldots 1 Introduction
\end{abstract} We consider. . .

\section{Introduction} 2 State of the Art


We consider\ldots We look at. . .

2.1 Document Formats


\section{State of the Art} There are many. . .
We look at\ldots

\subsection{Document Formats}
There are many\ldots 1
\end{document}

Lim Lian Tze | mosc 2011 8 / 48


Introduction Document Types Special Material Wrapping Up

Example .tex File


\documentclass[a4paper,11pt]{article} An Introductory Paper
\author{Lim Lian Tze} Lim Lian Tze
\title{An Introductory Paper} 7. Juni 2011
\date{\today}
\usepackage[ngerman]{babel}
Inhaltsverzeichnis
1 Introduction 1
\begin{document}
2 State of the Art 1
\maketitle 2.1 Document Formats . . . . . . . . . . . . . . . . . . . . . . . . 1
\tableofcontents
Zusammenfassung

pdflatex This paper introduces. . .


\begin{abstract}
This paper introduces\ldots 1 Introduction
\end{abstract} We consider. . .

\section{Introduction} 2 State of the Art


We consider\ldots We look at. . .

2.1 Document Formats


\section{State of the Art} There are many. . .
We look at\ldots

\subsection{Document Formats}
There are many\ldots 1
\end{document}

Lim Lian Tze | mosc 2011 8 / 48


Introduction Document Types Special Material Wrapping Up

Example .tex File


\documentclass[a4paper,11pt]{article} An Introductory Paper
\author{Lim Lian Tze} Lim Lian Tze
\title{An Introductory Paper} 7 Jun 2011
\date{\today}
\usepackage[bahasam]{babel}
Kandungan
1 Introduction 1
\begin{document}
2 State of the Art 1
\maketitle 2.1 Document Formats . . . . . . . . . . . . . . . . . . . . . . . . 1
\tableofcontents
Abstrak

pdflatex This paper introduces. . .


\begin{abstract}
This paper introduces\ldots 1 Introduction
\end{abstract} We consider. . .

\section{Introduction} 2 State of the Art


We consider\ldots We look at. . .

2.1 Document Formats


\section{State of the Art} There are many. . .
We look at\ldots

\subsection{Document Formats}
There are many\ldots 1
\end{document}

Lim Lian Tze | mosc 2011 8 / 48


Introduction Document Types Special Material Wrapping Up

Where Do I Get It?

Windows MiKTEX, TEXLive


Un*x, GNU/Linux TEXLive
Mac OS X MacTEX (based on TEXLive)
Installation Use your OS’ package manager
(or download manually)

Lim Lian Tze | mosc 2011 9 / 48


Introduction Document Types Special Material Wrapping Up

Where Do I Get It?

Windows MiKTEX, TEXLive


Un*x, GNU/Linux TEXLive
Mac OS X MacTEX (based on TEXLive)
Installation Use your OS’ package manager
(or download manually)
Editors vi, emacs, Texmaker, TeXworks, . . .

Lim Lian Tze | mosc 2011 9 / 48


Introduction Document Types Special Material Wrapping Up

Where Do I Get It?

Windows MiKTEX, TEXLive


Un*x, GNU/Linux TEXLive
Mac OS X MacTEX (based on TEXLive)
Installation Use your OS’ package manager
(or download manually)
Editors vi, emacs, Texmaker, TeXworks, . . .
LATEX Packages Use MiKTEX or TEXLive’s package manager

Lim Lian Tze | mosc 2011 9 / 48


Introduction Document Types Special Material Wrapping Up

Where Do I Get It?

Windows MiKTEX, TEXLive


Un*x, GNU/Linux TEXLive
Mac OS X MacTEX (based on TEXLive)
Installation Use your OS’ package manager
(or download manually)
Editors vi, emacs, Texmaker, TeXworks, . . .
LATEX Packages Use MiKTEX or TEXLive’s package manager
Documentation (TEXLive) $ texdoc <package name>
(MiKTEX) $ mthelp <package name>

Lim Lian Tze | mosc 2011 9 / 48


Introduction Document Types Special Material Wrapping Up

Easy to Learn, Hard to Master

Customising may not be straightforward (vs word processors)

Lim Lian Tze | mosc 2011 10 / 48


Introduction Document Types Special Material Wrapping Up

Easy to Learn, Hard to Master

Customising may not be straightforward (vs word processors)


Intentionally so: Style guidelines should be followed strictly
Publisher/organisation provides document class or style files
Use these to take care of formatting and styling, focus on the content

Lim Lian Tze | mosc 2011 10 / 48


Introduction Document Types Special Material Wrapping Up

Easy to Learn, Hard to Master

Customising may not be straightforward (vs word processors)


Intentionally so: Style guidelines should be followed strictly
Publisher/organisation provides document class or style files
Use these to take care of formatting and styling, focus on the content
Fair enough.
But where do I learn all the stuff the TEXnicians and TEXperts do?

Lim Lian Tze | mosc 2011 10 / 48


Introduction Document Types Special Material Wrapping Up

Easy to Learn, Hard to Master

Customising may not be straightforward (vs word processors)


Intentionally so: Style guidelines should be followed strictly
Publisher/organisation provides document class or style files
Use these to take care of formatting and styling, focus on the content
Fair enough.
But where do I learn all the stuff the TEXnicians and TEXperts do?
(There is a learning curve)

Lim Lian Tze | mosc 2011 10 / 48


Introduction Document Types Special Material Wrapping Up

Getting Help

Many free tutorials and e-books on the Web (beware of obsolete ones!)
Getting to Grips with LATEX. Andy Roberts.
http://www.andy-roberts.net/misc/latex/
LATEX: Beautiful Typesetting. Lim Lian Tze.
http://liantze.penguinattack.org/latextypesetting.html
LATEX and Friends. M.R.C. van Dongen.
http://csweb.ucc.ie/~dongen/LaTeX-and-Friends.pdf
The LATEX WikiBook. http://en.wikibooks.org/wiki/LaTeX

Lim Lian Tze | mosc 2011 11 / 48


Introduction Document Types Special Material Wrapping Up

Getting Help

Many free tutorials and e-books on the Web (beware of obsolete ones!)
Getting to Grips with LATEX. Andy Roberts.
http://www.andy-roberts.net/misc/latex/
LATEX: Beautiful Typesetting. Lim Lian Tze.
http://liantze.penguinattack.org/latextypesetting.html
LATEX and Friends. M.R.C. van Dongen.
http://csweb.ucc.ie/~dongen/LaTeX-and-Friends.pdf
The LATEX WikiBook. http://en.wikibooks.org/wiki/LaTeX
Questions?
TEX FAQ. http://www.tex.ac.uk/cgi-bin/texfaq2html
TEX.SX. http://tex.stackexchange.com/
comp.text.tex usenet group
Malaysian LATEX User Group. http://latex-my.blogspot.com/

Lim Lian Tze | mosc 2011 11 / 48


Introduction Document Types Special Material Wrapping Up

Getting Help

Many free tutorials and e-books on the Web (beware of obsolete ones!)
Getting to Grips with LATEX. Andy Roberts.
http://www.andy-roberts.net/misc/latex/
LATEX: Beautiful Typesetting. Lim Lian Tze.
http://liantze.penguinattack.org/latextypesetting.html
LATEX and Friends. M.R.C. van Dongen.
http://csweb.ucc.ie/~dongen/LaTeX-and-Friends.pdf
The LATEX WikiBook. http://en.wikibooks.org/wiki/LaTeX
Questions?
TEX FAQ. http://www.tex.ac.uk/cgi-bin/texfaq2html
TEX.SX. http://tex.stackexchange.com/
comp.text.tex usenet group
Malaysian LATEX User Group. http://latex-my.blogspot.com/
Arrange for training

Lim Lian Tze | mosc 2011 11 / 48


Introduction Document Types Special Material Wrapping Up

So, What Can LATEX Do?

Lim Lian Tze | mosc 2011 12 / 48


Introduction Document Types Special Material Wrapping Up

Contents

1 What are TEX, LATEX and Friends?

2 Document Types

3 Special Material

4 Wrapping Up

Lim Lian Tze | mosc 2011 13 / 48


Introduction Document Types Special Material Wrapping Up

Basic Types

Books Chapter 1

Heading on level 0 (chapter)

Hello, here is some text without a meaning. This text should show, how a
printed text will look like at this place. If you read this text, you will get no
A Wonderful Read information. Really? Is there no information? Is there a difference between

\documentclass{book} A. Dummy
this text and some nonsense like »Huardest gefburn«. Kjift – Never mind!
A blind text like this gives you information about the selected font, how the
letters are written and the impression of the look. This text should contain
all letters of the alphabet and it should be written in of the original language.
There is no need for a special contents, but the length of words should match
3rd June 2011 to the language.

\author{...} 1.1 Heading on level 1 (section)


Hello, here is some text without a meaning. This text should show, how a
printed text will look like at this place. If you read this text, you will get no
information. Really? Is there no information? Is there a difference between
this text and some nonsense like »Huardest gefburn«. Kjift – Never mind!

\title{...} A blind text like this gives you information about the selected font, how the
letters are written and the impression of the look. This text should contain
all letters of the alphabet and it should be written in of the original language.
There is no need for a special contents, but the length of words should match
to the language.

1.1.1 Heading on level 2 (subsection)


Hello, here is some text without a meaning. This text should show, how a
printed text will look like at this place. If you read this text, you will get no
information. Really? Is there no information? Is there a difference between

\begin{document}
\maketitle
4 CHAPTER 1. HEADING ON LEVEL 0 (CHAPTER) 1.2. LISTS 5

\chapter{...} this text and some nonsense like »Huardest gefburn«. Kjift – Never mind!
A blind text like this gives you information about the selected font, how the
letters are written and the impression of the look. This text should contain
Example for list (4*itemize)

• First item in a list


all letters of the alphabet and it should be written in of the original language.
There is no need for a special contents, but the length of words should match – First item in a list
to the language. ∗ First item in a list

\section{...} Heading on level 3 (subsubsection)


Hello, here is some text without a meaning. This text should show, how a
printed text will look like at this place. If you read this text, you will get no
· First item in a list
· Second item in a list
∗ Second item in a list

information. Really? Is there no information? Is there a difference between – Second item in a list
this text and some nonsense like »Huardest gefburn«. Kjift – Never mind!

...
A blind text like this gives you information about the selected font, how the • Second item in a list
letters are written and the impression of the look. This text should contain
all letters of the alphabet and it should be written in of the original language.
There is no need for a special contents, but the length of words should match
1.2.2 Example for list (enumerate)
to the language. 1. First item in a list

Heading on level 4 (paragraph) Hello, here is some text without a 2. Second item in a list

\subsection{...} meaning. This text should show, how a printed text will look like at this
place. If you read this text, you will get no information. Really? Is there
no information? Is there a difference between this text and some nonsense
like »Huardest gefburn«. Kjift – Never mind! A blind text like this gives
you information about the selected font, how the letters are written and the
3. Third item in a list

4. Fourth item in a list

impression of the look. This text should contain all letters of the alphabet 5. Fifth item in a list
and it should be written in of the original language. There is no need for a

\end{document} special contents, but the length of words should match to the language.

1.2 Lists
Example for list (4*enumerate)

1. First item in a list

1.2.1 Example for list (itemize) (a) First item in a list


i. First item in a list
• First item in a list
A. First item in a list
• Second item in a list B. Second item in a list
• Third item in a list ii. Second item in a list

• Fourth item in a list (b) Second item in a list

• Fifth item in a list 2. Second item in a list

Lim Lian Tze | mosc 2011 14 / 48


Introduction Document Types Special Material Wrapping Up

Basic Types (cont’d)


A blind text like this gives you information about the selected font, how the
letters are written and the impression of the look. This text should contain
all letters of the alphabet and it should be written in of the original language.
A Wonderful Read There is no need for a special contents, but the length of words should match
to the language.

Articles A. Dummy
3rd June 2011
Heading on level 4 (paragraph) Hello, here is some text without a
meaning. This text should show, how a printed text will look like at this
place. If you read this text, you will get no information. Really? Is there
no information? Is there a difference between this text and some nonsense
like »Huardest gefburn«. Kjift – Never mind! A blind text like this gives
1 Heading on level 1 (section) you information about the selected font, how the letters are written and the
impression of the look. This text should contain all letters of the alphabet
Hello, here is some text without a meaning. This text should show, how a and it should be written in of the original language. There is no need for a
printed text will look like at this place. If you read this text, you will get no special contents, but the length of words should match to the language.
information. Really? Is there no information? Is there a difference between
this text and some nonsense like »Huardest gefburn«. Kjift – Never mind!
A blind text like this gives you information about the selected font, how the 2 Lists
letters are written and the impression of the look. This text should contain

\documentclass{article} all letters of the alphabet and it should be written in of the original language.
There is no need for a special contents, but the length of words should match
to the language.
2.1 Example for list (itemize)
• First item in a list
• Second item in a list
1.1 Heading on level 2 (subsection) • Third item in a list
Hello, here is some text without a meaning. This text should show, how a • Fourth item in a list

\author{...} printed text will look like at this place. If you read this text, you will get no
information. Really? Is there no information? Is there a difference between
this text and some nonsense like »Huardest gefburn«. Kjift – Never mind!
A blind text like this gives you information about the selected font, how the
letters are written and the impression of the look. This text should contain
• Fifth item in a list

2.1.1 Example for list (4*itemize)


• First item in a list
all letters of the alphabet and it should be written in of the original language.
There is no need for a special contents, but the length of words should match – First item in a list

\title{...} to the language.

1.1.1 Heading on level 3 (subsubsection)


Hello, here is some text without a meaning. This text should show, how a
∗ First item in a list
· First item in a list
· Second item in a list
∗ Second item in a list
printed text will look like at this place. If you read this text, you will get no
– Second item in a list
information. Really? Is there no information? Is there a difference between
this text and some nonsense like »Huardest gefburn«. Kjift – Never mind! • Second item in a list

1 2

\begin{document}
\maketitle
2.2 Example for list (enumerate) Second item in a list
1. First item in a list Second item in a list

\section{...} 2. Second item in a list

3. Third item in a list


Second item in a list

Second item in a list

4. Fourth item in a list

5. Fifth item in a list

... 2.2.1 Example for list (4*enumerate)


1. First item in a list

(a) First item in a list


i. First item in a list

\subsection{...} A. First item in a list


B. Second item in a list
ii. Second item in a list
(b) Second item in a list

2. Second item in a list

\end{document} 2.3 Example for list (description)


First item in a list

Second item in a list

Third item in a list

Fourth item in a list

Fifth item in a list

2.3.1 Example for list (4*description)


First item in a list

First item in a list


First item in a list
First item in a list

3 4

Lim Lian Tze | mosc 2011 15 / 48


Introduction Document Types Special Material Wrapping Up

Journal and Conference Proceedings Articles

IEEE ACM LLNCS


\documentclass{IEEEtran} \documentclass{sig-alternate} \documentclass{llncs}

A Wonderful Read A Wonderful Read


A. Dummy
A. Dummy A Wonderful Read
Abstract—Hello, here is some text without a meaning. 1) Heading on level 3 (subsubsection): Hello, A. Dummy
This text should show, how a printed text will look like here is some text without a meaning. This text
at this place. If you read this text, you will get no should show, how a printed text will look like No Institute Given
information. Really? Is there no information? Is there
at this place. If you read this text, you will get
a difference between this text and some nonsense like
no information. Really? Is there no information? ABSTRACT show, how a printed text will look like at this place. If you read
»Huardest gefburn«. Kjift – Never mind! A blind text like this text, you will get no information. Really? Is there no infor-
this gives you information about the selected font, how the Is there a difference between this text and some Hello, here is some text without a meaning. This text should show,
mation? Is there a difference between this text and some nonsense Abstract Hello, here is some text without a meaning. This text should
how a printed text will look like at this place. If you read this
letters are written and the impression of the look. This text nonsense like »Huardest gefburn«. Kjift – Never text, you will get no information. Really? Is there no informa- like »Huardest gefburn«. Kjift – Never mind! A blind text like this show, how a printed text will look like at this place. If you read this text,
should contain all letters of the alphabet and it should be you will get no information. Really? Is there no information? Is there a
mind! A blind text like this gives you information tion? Is there a difference between this text and some nonsense gives you information about the selected font, how the letters are
written in of the original language. There is no need for written and the impression of the look. This text should contain difference between this text and some nonsense like »Huardest gefburn«.
about the selected font, how the letters are written like »Huardest gefburn«. Kjift – Never mind! A blind text like this
all letters of the alphabet and it should be written in of the original Kjift – Never mind! A blind text like this gives you information about
a special contents, but the length of words should match gives you information about the selected font, how the letters are
and the impression of the look. This text should language. There is no need for a special contents, but the length of the selected font, how the letters are written and the impression of the
to the language. written and the impression of the look. This text should contain
contain all letters of the alphabet and it should be all letters of the alphabet and it should be written in of the original words should match to the language. look. This text should contain all letters of the alphabet and it should
be written in of the original language. There is no need for a special
written in of the original language. There is no need language. There is no need for a special contents, but the length of
words should match to the language. Heading on level 4 (paragraph). contents, but the length of words should match to the language.
I. H EADING ON LEVEL 1 ( SECTION ) for a special contents, but the length of words should Hello, here is some text without a meaning. This text should
match to the language. show, how a printed text will look like at this place. If you read
Hello, here is some text without a meaning. This 1. Heading on level 1 (SECTION) this text, you will get no information. Really? Is there no infor-
a) Heading on level 4 (paragraph): Hello, Hello, here is some text without a meaning. This text should mation? Is there a difference between this text and some nonsense
text should show, how a printed text will look like here is some text without a meaning. This text show, how a printed text will look like at this place. If you read like »Huardest gefburn«. Kjift – Never mind! A blind text like this
at this place. If you read this text, you will get should show, how a printed text will look like this text, you will get no information. Really? Is there no infor- gives you information about the selected font, how the letters are
1 Heading on level 1 (section)
no information. Really? Is there no information? mation? Is there a difference between this text and some nonsense written and the impression of the look. This text should contain
at this place. If you read this text, you will get
Is there a difference between this text and some
like »Huardest gefburn«. Kjift – Never mind! A blind text like this all letters of the alphabet and it should be written in of the original Hello, here is some text without a meaning. This text should show,
no information. Really? Is there no information? gives you information about the selected font, how the letters are language. There is no need for a special contents, but the length of
nonsense like »Huardest gefburn«. Kjift – Never Is there a difference between this text and some written and the impression of the look. This text should contain words should match to the language.
how a printed text will look like at this place. If you read this text,
mind! A blind text like this gives you information nonsense like »Huardest gefburn«. Kjift – Never all letters of the alphabet and it should be written in of the original you will get no information. Really? Is there no information? Is there
language. There is no need for a special contents, but the length of a difference between this text and some nonsense like »Huardest
about the selected font, how the letters are written mind! A blind text like this gives you information words should match to the language.
2. Lists
and the impression of the look. This text should about the selected font, how the letters are written gefburn«. Kjift – Never mind! A blind text like this gives you infor-
1.1 Heading on level 2 (subsection) 2.1 Example for list (itemize) mation about the selected font, how the letters are written and the
contain all letters of the alphabet and it should be and the impression of the look. This text should
Hello, here is some text without a meaning. This text should impression of the look. This text should contain all letters of the al-
written in of the original language. There is no need contain all letters of the alphabet and it should be show, how a printed text will look like at this place. If you read • First item in a list
for a special contents, but the length of words should written in of the original language. There is no need this text, you will get no information. Really? Is there no infor- phabet and it should be written in of the original language. There is
• Second item in a list
match to the language. for a special contents, but the length of words should mation? Is there a difference between this text and some nonsense no need for a special contents, but the length of words should match
like »Huardest gefburn«. Kjift – Never mind! A blind text like this • Third item in a list
match to the language. gives you information about the selected font, how the letters are
to the language.
written and the impression of the look. This text should contain • Fourth item in a list
A. Heading on level 2 (subsection) all letters of the alphabet and it should be written in of the original
II. L ISTS language. There is no need for a special contents, but the length of • Fifth item in a list 1.1 Heading on level 2 (subsection)
Hello, here is some text without a meaning. This words should match to the language.
text should show, how a printed text will look like A. Example for list (itemize) 2.1.1 Example for list (4*itemize) Hello, here is some text without a meaning. This text should show,
at this place. If you read this text, you will get 1.1.1 Heading on level 3 (subsubsection) how a printed text will look like at this place. If you read this text,
• First item in a list
Hello, here is some text without a meaning. This text should • First item in a list
no information. Really? Is there no information? • Second item in a list you will get no information. Really? Is there no information? Is there
Is there a difference between this text and some • Third item in a list – First item in a list
a difference between this text and some nonsense like »Huardest
nonsense like »Huardest gefburn«. Kjift – Never • Fourth item in a list ∗ First item in a list
gefburn«. Kjift – Never mind! A blind text like this gives you infor-
Permission to make digital or hard copies of all or part of this work for · First item in a list
mind! A blind text like this gives you information • Fifth item in a list personal or classroom use is granted without fee provided that copies are mation about the selected font, how the letters are written and the
about the selected font, how the letters are written not made or distributed for profit or commercial advantage and that copies · Second item in a list
1) Example for list (4*itemize): bear this notice and the full citation on the first page. To copy otherwise, to ∗ Second item in a list
and the impression of the look. This text should republish, to post on servers or to redistribute to lists, requires prior specific
• First item in a list – Second item in a list
contain all letters of the alphabet and it should be permission and/or a fee.

written in of the original language. There is no need – First item in a list MOSC 2011, July 3–5, 2011, Penang, Malaysia.
• Second item in a list
Copyright 2011 ACM 123-4-56789-012-3/11/0007 ...$10.00.
for a special contents, but the length of words should ∗ First item in a list
match to the language. · First item in a list

Lim Lian Tze | mosc 2011 16 / 48


Introduction Document Types Special Material Wrapping Up

Some Goodies

Quick language-switching with babel

Lim Lian Tze | mosc 2011 17 / 48


Introduction Document Types Special Material Wrapping Up

Some Goodies

Automatic generation of cross-referencing labels:


\section{Introduction}\label{sec:intro}
... We saw in section \ref{sec:intro}...

Lim Lian Tze | mosc 2011 17 / 48


Introduction Document Types Special Material Wrapping Up

Some Goodies

Automatic generation of lists:


\tableofcontents, \listoffigures, \listoftables

Lim Lian Tze | mosc 2011 17 / 48


Introduction Document Types Special Material Wrapping Up

Some Goodies

Automatic generation of bibliographies and indices:


\cite{Knuth:1976}...\bibliography{references.bib}
...the Linux kernel\index{Linux!kernel}... \printindex

Lim Lian Tze | mosc 2011 17 / 48


Introduction Document Types Special Material Wrapping Up

Some Goodies

Fully hyperlinked PDF with bookmarks: \usepackage{hyperref}

Lim Lian Tze | mosc 2011 17 / 48


Introduction Document Types Special Material Wrapping Up

Some Goodies

Inclusion of selected pages from other PDFs


(while inserting new page headers/footers!)
\usepackage{pdfpages}
\includepdf[pages={1,3-5,8},pagecommand=\thispagestyle{plain}]{file.pdf}

Lim Lian Tze | mosc 2011 17 / 48


Introduction Document Types Special Material Wrapping Up

University Theses

Universiti Sains Malaysia \documentclass{usmthesis}


TABLE OF CONTENTS
REFERENCES
CHAPTER 1
Acknowledgements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii

WRITING YOUR THESIS WITH LATEX Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii INTRODUCTION: SAMPLES OF BASIC LATEX
COMMANDS Changsheng, X., Wang, J., Lu, L. and Zhang, Y. (2008). A novel framework for
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v semantic annotation and personalized retrieval of sports video, Multimedia, IEEE
Transactions on 10(3): 421–436.
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
D’Orazio, T., Leo, M., Spagnolo, P., Mazzeo, P. L., Mosca, N., Nitti, M. and Distante,
List of Plates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii A. (2009). An investigation into the feasibility of real-time soccer offside detec-
Hello and welcome, fellow Universiti Sains Malaysia (USM) research postgrad! The
tion from a multiple camera system, IEEE TRANSACTIONS ON CIRCUITS AND
List of Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii SYSTEMS FOR VIDEO TECHNOLOGY 19(12): 1804–1818.
usmthesis package and template files were written in the hope that they may help
by List of Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix D’Orazio, T., Leo, M., Spagnolo, P., Nitti, M., Mosca, N. and Distante, A. (2009).
you prepare your research thesis using LATEX, based on the Institut Pengajian Siswazah
A visual system for real time detection of goal events during soccer matches,
Abstrak . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
Computer Vision and Image Understanding 113(5): 622–632. Computer Vision
(IPS) requirements (IPS, 2007). Please note that this version is based on the new
Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Based Analysis in Sport Environments.
URL: http://www.sciencedirect.com/science/article/B6WCX-4S50K9H-
guidelines, in force 17 Dec 2007 onwards. (Song, Cai, Lyu and Cai, 2002)
1/2/fe82b213b3ec28e07aef15882eb37538
CHAPTER 1 – INTRODUCTION: SAMPLES OF BASIC LATEX
IPS (2007). A Guide to the Preparation, Submission and Examination of Theses, In-
COMMANDS
LIM LIAN TZE LATEX is powerful and produces beautiful documents. However, there is definitely stitute of Graduate Studies, Universiti Sains Malaysia, Penang, Malaysia.
1.1 Some Simple Command Usages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
a learning curve to it – one that is worth the effort. If you find any errors in these Lim, L. T. (2009). LATEX: Beautiful typesetting, [Online]. [Accessed January 22, 2011].
1.2 Special Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Available from World Wide Web: http://liantze.googlepages.com/latextypesetting.
templates or documents, or have any suggestions or feedback, do e-mail me about it
1.3 Useful Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Mittelbach, F., Goossens, M., Braams, J., Carlisle, D. and Rowley, C. (2004). The
(liantze@gmail.com). The author cannot always guarantee prompt response, how- LATEX Companion, Addison-Wesley Series on Tools and Techniques for Computer
Typesetting, 2nd edn, Addison-Wesley, Boston, MA, USA.
CHAPTER 2 – CITATIONS AND BIBLIOGRAPHY ever. ©
Oetiker, T., Partl, H., Hyna, I. and Schlegl, E. (2006). The Not So Short Introduction
Thesis submitted in fulfilment of the requirements 2.1 The *.bib File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
to LATEX 2ε , 4.2 edn.
for the degree of MiKTEX, my recommended LATEX distribution for Windows, is available on the Roberts, A. (2005). Getting to grips with LATEX, [Online]. [Accessed January 22,
2.2 Citations using the natbib package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Master of Science CSPC’07 CD. A step-by-step installation walkthrough is available at (Lim, 2009).
2011]. Available from World Wide Web: http://www.andy-roberts.net/misc/latex/
2.2.1 Author-Year System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 index.html.

2.2.2 Numeric System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Song, J. Q., Cai, M., Lyu, M. R. and Cai, S. J. (2002). A new approach for line
recognition in large-size images using hough transform, Proceedings of the 16th
1.1 Some Simple Command Usages International Conference on Pattern Recognition., Vol. 1, pp. 33–36.
CHAPTER 3 – FIGURES, TABLES, EQUATIONS, ALGORITHMS, ETC
There are plenty of free LATEX tutorials online, some of which are listed in the bibli-
3.1 Inserting Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
December 2007 ographies or available at http://e-office.cs.usm.my. This sample thesis includes some
3.2 Inserting Plates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.3 Inserting Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 examples to do some common tasks. We start with some examples for lists (both bul-

iii 1 24

Lim Lian Tze | mosc 2011 18 / 48


Introduction Document Types Special Material Wrapping Up

University Theses (cont’d)

Multimedia University \documentclass{mmuthesis}


TABLE OF CONTENTS CHAPTER 1 REFERENCES

THE MMUTHESIS LATEX DOCUMENT COPYRIGHT PAGE ii INTRODUCTION, BACKGROUND STORY, MOTIVATIONS [1] Audibert, L. (2004). Word sense disambiguation criteria: a systematic study. In 20th in-
ternational conference on computational linguistics (coling 2004) (pp. 910–916). Geneva,
CLASS DECLARATION iii Switzerland: COLING.

ACKNOWLEDGEMENTS iv [2] Budanitsky, A., & Hirst, G. (2006). Evaluating WordNet-based measures of lexical semantic
1.1 First Test and I need a really long title, please do oblige me won’t you? Just relatedness. Computational Linguistics, 32(1), 13–47.

DEDICATION v a few more words and yes we’re there

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibu-
ABSTRACT vi
lum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu
BY TABLE OF CONTENTS vii libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue
LIM LIAN TZE eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames
LIST OF TABLES viii ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus
B.Sc. (Hons), University of Warwick, United Kingdom
vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat.
LIST OF FIGURES ix
M.Sc., Universiti Sains Malaysia, Malaysia Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo
PREFACE x ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at,
mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis
CHAPTER 1: INTRODUCTION, BACKGROUND STORY,
MOTIVATIONS 1 nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci
1.1 First Test and I need a really long title, please do oblige me won’t you? dignissim rutrum.
Just a few more words and yes we’re there 1 Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi. Morbi auctor
THESIS SUBMITTED IN FULFILMENT OF THE 1.1.1 Second Test 1
lorem non justo. Nam lacus libero, pretium at, lobortis vitae, ultricies et, tellus. Donec
1.2 Yeah 2
REQUIREMENT FOR THE DEGREE OF aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna, vitae ornare odio
CHAPTER 2: DUMMY CHAPTER 3 metus a mi. Morbi ac orci et nisl hendrerit mollis. Suspendisse ut massa. Cras nec ante.
DOCTOR OF PHILOSOPHY
APPENDIX A: MANUALS, TECHNICAL SPECIFICATIONS, Pellentesque a nulla. Cum sociis natoque penatibus et magnis dis parturient montes,
(by Research) nascetur ridiculus mus. Aliquam tincidunt urna. Nulla ullamcorper vestibulum turpis.
DOCUMENTATIONS, EXAMPLE SCENARIOS 4
in the Pellentesque cursus luctus mauris.
APPENDIX B: TRY 5
Faculty of Information Technology Test 1
REFERENCES 6 Figure 1.1: First figure. OK?

GLOSSARY 7

INDEX 8 1.1.1 Second Test

Their (Audibert, 2004) requirements1 are really amazing2 (Budanitsky & Hirst,
PUBLICATION LIST 9
MULTIMEDIA UNIVERSITY 2006).
MALAYSIA 1 See here, how weird, how to fill out an entire line. See here, how weird, how to fill out an entire line. See here, how weird,

how to fill out an entire line. See here, how weird, how to fill out an entire line. See here, how weird, how to fill out an entire line.
April 2010 2 don’t you agree?

vii 1 6

Lim Lian Tze | mosc 2011 19 / 48


Introduction Document Types Special Material Wrapping Up

University Theses (cont’d)

Universiti Malaya \documentclass{umalayathesis}


TABLE OF CONTENTS CHAPTER 1 REFERENCES

THE UMALAYATHESIS LATEX DOCUMENT CLASS ABSTRACT ii INTRODUCTION, BACKGROUND STORY, MOTIVATIONS Audibert, L. (2004). Word sense disambiguation criteria: a systematic study. In 20th International Confer-
ence on Computational Linguistics (COLING 2004) (pp. 910–916). Geneva, Switzerland: COLING.
DECLARATION iii
Budanitsky, A., & Hirst, G. (2006). Evaluating WordNet-based measures of lexical semantic relatedness.
Computational Linguistics, 32(1), 13–47.
ACKNOWLEDGEMENTS iv
1.1 First Test and I need a really long title, please do oblige me won’t you? Just a
few more words and yes we’re there
TABLE OF CONTENTS v
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum
LIST OF FIGURES vi
ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero,
LIST OF TABLES vii nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pel-

LIM LIAN TZE LIST OF SYMBOLS AND ACRONYMS viii lentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla
LIST OF APPENDICES ix
ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis
PREFACE x
in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean
CHAPTER 1: INTRODUCTION, BACKGROUND STORY, MOTIVATIONS 1
faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor
1.1 First Test and I need a really long title, please do oblige me won’t you?
Just a few more words and yes we’re there 1 semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend,
1.1.1 Second Test 2
1.2 Yeah 2 sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum.

THESIS SUBMITTED IN FULFILMENT CHAPTER 2: DUMMY CHAPTER 5


Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi. Morbi auctor
OF THE REQUIREMENTS lorem non justo. Nam lacus libero, pretium at, lobortis vitae, ultricies et, tellus. Donec
FOR THE DEGREE OF DOCTOR OF PHILOSOPHY APPENDICES 6
aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna, vitae ornare odio metus
REFERENCES 9
a mi. Morbi ac orci et nisl hendrerit mollis. Suspendisse ut massa. Cras nec ante. Pellen-
tesque a nulla. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur
ridiculus mus. Aliquam tincidunt urna. Nulla ullamcorper vestibulum turpis. Pellen-
tesque cursus luctus mauris.

INSTITUTE OF POSTGRADUATE STUDIES


UNIVERSITY OF MALAYA
KUALA LUMPUR

2010

Figure 1.1: First figure. OK?

v 1 9

Lim Lian Tze | mosc 2011 20 / 48


Introduction Document Types Special Material Wrapping Up

Highly Configurable Documents


memoir and KOMA-Script Classes

Sectional headings
Running headers and footers
Good font, colour and illustration choices
http://latex-my.blogspot.com/search/label/bookdesign

Lim Lian Tze | mosc 2011 21 / 48


Introduction Document Types Special Material Wrapping Up

Highly Configurable Documents


memoir and KOMA-Script Classes

Sectional headings
Running headers and footers
Good font, colour and illustration choices
http://latex-my.blogspot.com/search/label/bookdesign

Image: A simple network. Illustration by ©Svilen Mushkatov (http://www.sxc.hu/profile/svilen001). Grid@USM

PWN

Grid Computing Cluster


Analyser

PWN PWN
Analyser Analyser
PWN
Analyser

Remote Host

The Development and Integration of


Remote Host
Lexicon Lexicon Lexicon
Dispenser Dispenser Dispenser

Grid Services and Applications CONTENTS


Remote Host

Lexicon
Dispenser

Project Overview Sense-Tagger

Introduction 2
PWN
Grid@USM: Developing & Integrating Grid Applications & Services 4 Syntactic Lexicon Analyser
Remote Host

Parser Dispenser SLB on utmkblex


Project Milestones 7

Grid@USM
Project Expenditures 8
Figure 3: Blexisma2 agents are deployed on USM Campus Grid nodes using the Globus job submission toolkit.

2008/09 Report
Sub-Projects
Setting up USM Campus Grid 10
AP Chan Huah Yong, Ang Sin Keat, Tan Chin Min, Kheoh Hooi Leng, Cheng Wai Khuen, M. Muzzammil bin Mohd Salahudin
Dynamic Replica Management in Data Grid Environment 14
AP Chan Huah Yong, Aloysius Indrayanto and Muhammad Muzzammil bin Mohd Salahudin
Using Grid Technology to Create a Render-Farm for Blender 3D Animation 18
AP Phua Kia Ken and Zafri Muhammad
Grid-enabled Blexisma2 23

Grid@USM:
AP Tang Enya Kong, Lim Lian Tze, Ye Hong Hoe and Dr Didier Schwab
B2B Standards Component Modeling 27
Dr Vincent Khoo Kay Teong, Ting Tin Tin, Rinki Yadav, Johnson Foong and Kor Chan Hock
An Automated Java Testing Tool on the Grid 31

DEVELOPING & INTEGRATING


(a) Diferent meanings of star in context (b) Diferent meanings of school in context
Dr Kamal Zuhairi Zamli, Dr Nor Ashidi Mat Isa, Mohammed Issam Younis and Saidatul Khatimah binti Said
iNet-Grid 35 Figure 4: SLB data generated by Blexisma2 agents used to determine most probable meanings of ambiguous lexical

GRID APPLICATIONS & SERVICES


Prof. Sureswaran Ramadass, AP Rahmat Budiarto, AP Chan Huah Yong and Dr Ahmed M. Manasrah item. A Web interface to the Sense-Tagger is available at http://utmkblex.usmgrid.myren.net.my:8080/Blexisma2Servlets/
Grid Application to Wave Front Propagation and Containment of Vector Borne Diseases 40 CVSenseTagger.
Prof. Koh Hock Lye, Dr Teh Su Yean and Tan Kah Bee

interested to improve its design to On the performance issues, we with Ontology-based Conceptual
Project Activities a multilingual setting, where more may attempt several solutions for the Vectors. In Proceedings of the 5th In-
Organised Events 46 complicated cross-lingual phenomena SLB bottleneck problem mentioned ternational Workshop on Natural Lan-
will have to be considered. We also earlier: guage Processing and Cognitive Sci-
Other Events 48 hope to improve the agent commu- ence (NLPCS’08). Barcelona, Spain;
Publications 50 USM’S R&D SUSTAINABILITY for attaining and subsequently sus- Grid computing is by its na- nication mechanisms to reduce la- Ț hardware (RAM) upgrades, pp. 153–158.
taining RU status is the creation ture highly distributed geographically, tency. Apart from creating more Ț further optimisation of PostgreSQL

Edited by Bahari Belaton and Lim Lian Tze


To attain the level of excellence as a of highly conducive research envi- consists of highly specialised equip- server settings,
agents that implement different learn- Schwab, D. & Lim, L. T. (2008). Blex-
research university (RU), USM in re- ronment and infrastructure. Grid ment (storage, grid engines and man- Ț database connection pooling,
ing algorithms and heuristics, we are isma2: a Distributed Agent Frame-
cent years has seriously engaged her- computing is an example of such agement tools), as well as expensive. Ț load balancing,
Platform for Information & Communication Technology Research self in various efforts to formulate infrastructure, aiming at providing It is as such an ideal example of com-
also planning agents responsible for
other NLP tasks such as deep parsing, Ț parallelising queries.
work for Constructing a Semantic
Lexical Database based on Con-
and chart her future research and excellent research facilities by en- mon, core computational resources
Universiti Sains Malaysia development (R&D) directions. The suring good computational horse- to be created and pooled among as-
detecting named entities, etc. In other
words, we hope to have agents of var-
ceptual Vectors. In Proceedings
of the International Conference on
pinnacle of these efforts was trans- power to support high impact do- piring researchers who require high ious responsibilities so that they can Distributed Frameworks & Applica-
lated into a 2 year strategic plan “USM mains in the bio-sciences, physical performance resources. be ‘mixed-and-matched’ to construct PROJECT PUBLICATIONS tions 2008 (DFmA 2008). Penang,
Research-Intensive University 2007– sciences, information and communi- new NLP applications, such as those Malaysia; pp. 102–110.
2009”. cation technology (ICT), Environment Lim, L. T. & Schwab, D. (2008). Lim-
Equally important, USM needs a fo- mentioned in the introduction. ri
its of Lexical Semantic Relatedness @

G
d
Note: The abbreviations Prof. and AP are used for Professor and Associate Professor respectively throughout this book. One of the crucial input elements sciences, Education, Arts and others. cused, holistic and dedicated effort S

M
U
4 26 GRID-ENABLED BLEXISMA2

Lim Lian Tze | mosc 2011 21 / 48


Introduction Document Types Special Material Wrapping Up

Presentation Slides

This presentation was made with LATEX!


Many possible classes: powerdot, beamer

Lim Lian Tze | mosc 2011 22 / 48


Introduction Document Types Special Material Wrapping Up

Presentation Slides

This presentation was made with LATEX!


Many possible classes: powerdot, beamer
Intro

\documentclass{beamer}
\usetheme{Warsaw} A First Presentation

Lim Lian Tze


\author ...
June 3, 2011

\begin{document}
\titleframe
Lim Lian Tze A First Presentation

Intro

Some Background
\section{Intro}

\begin{frame}
\frametitle{Some Background} Once upon a time
There were programmers
...
\end{frame}
\end{document}
Lim Lian Tze A First Presentation

Lim Lian Tze | mosc 2011 22 / 48


Introduction Document Types Special Material Wrapping Up

Presentation Slides

This presentation was made with LATEX!


Many possible classes: powerdot, beamer
Intro

\documentclass{beamer}
\usetheme{Szeged}
A First Presentation

Lim Lian Tze


\author ...
June 3, 2011

\begin{document}
\titleframe
A First Presentation

Intro

\section{Intro}
Some Background

\begin{frame}
\frametitle{Some Background} ◮ Once upon a time

... ◮ There were programmers

\end{frame}
\end{document}
A First Presentation

Lim Lian Tze | mosc 2011 22 / 48


Introduction Document Types Special Material Wrapping Up

Presentation Slides

This presentation was made with LATEX!


Many possible classes: powerdot, beamer

\documentclass{beamer}
A First Presentation
\usetheme{Bergen}

\author ... Who? Lim Lian Tze

When? June 3, 2011

\begin{document}
\titleframe

Some Background
\section{Intro}

\begin{frame}
\frametitle{Some Background} Once upon a time
There were programmers
...
\end{frame}
\end{document}

Lim Lian Tze | mosc 2011 22 / 48


Introduction Document Types Special Material Wrapping Up

Presentation Slides

This presentation was made with LATEX!


Many possible classes: powerdot, beamer
Intro

\documentclass{beamer}
\usetheme{oxygen}
A First Presentation

\author ... Lim Lian Tze

June 3, 2011

\begin{document}
\titleframe
Lim Lian Tze — A First Presentation 1/2

Intro

Some Background
\section{Intro}

\begin{frame}
\frametitle{Some Background} Once upon a time
There were programmers
...
\end{frame}
\end{document}
Lim Lian Tze — A First Presentation 2/2

Lim Lian Tze | mosc 2011 22 / 48


Introduction Document Types Special Material Wrapping Up

Oversized Posters

Many possible solutions: sciposter, flowfram, beamerposter

Lim Lian Tze | mosc 2011 23 / 48


Introduction Document Types Special Material Wrapping Up

Oversized Posters

Many possible solutions: sciposter, flowfram, beamerposter


Low-Cost Construction of a
Multilingual Lexicon from Bilingual Lists
Introduction Adding a New Language
◮ Bilingual MRDs are good resources for building ◮ (Example: Malay–English–Chinese + French)
multilingual lexicons, but heterogeneous structures ◮ Construct also French–English–Malay triples
◮ Lowest common denominator: list of ◮ Add French members to existing M-E-C clusters with
source language item→ target language item(s) common English & Malay members
◮ Proposal: Multilingual lexicon construction using only
simple bilingual lists bengkeng

\documentclass{beamer} One-time Inverse Consultation [1]


fierce

ferocious
garang + (cruel, ferocious, garang)
(féroce, fierce, garang)
ö
◮ Generates a bilingual lexicon for new language pair

Ð→
\usepackage[orientation=portrait, from existing bilingual lists
◮ JP–EN, EN–MS, MS–EN lexicons ⇒ JP–MS féroce
bengkeng cruel

˓→ size=a0]{beamerposter} Japanese

p
English
mark
seal
Malay
tanda
anjing laut
fierce garang

stamp tera ferocious ö

\usetheme{...} imprint
gauge
Precision of 100 Random Translation Sets

\author ... % Meta−information score(‘tera’) = 2 ×


|E1 ∩ E2|
|E1| + |E2|
∴p↔ ‘tera’ is most likely valid
=2×
2
3+4
= 0.57 0.85
α = 0.0
α = 0.2
α = 0.8

Precision
0.8

0.75
Merging Translation Triples into Sets
0.7
◮ (Example: Malay–English–Chinese) β

\begin{document} ◮ Retain OTIC ‘middle’ language links


◮ For each ‘head’ language LI, discard triples with score
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
◮ Precision generally around 0.70–0.82; max 0.86
< αX or score2 < β X, where X = max score of all
F1 and Rand Index of Selected Translation Sets
\begin{frame} triples containing that LI
(garang, ö) 0.143
(garang, ÑS ) 0.048
◮ Evaluating accuracy of sets with polysemous ‘middle’
language members, e.g. ‘plant’, ‘target’

... % Poster contents goes here


(garang, ferocious, ö)
(garang, bold, ÑS)
(garang, fierce, ö) Test Rand Index F1 Best accuracy when
(garang, ÀÈ) 0.125
(garang, —S ) 0.048 word min max min max α β
(garang, jazzy, ÀÈ)
(garang, bold, —S) ‘bank’ 0.417 0.611 0.588 0.632 0.6 0.4

\end{frame} (garang, 'Æ) 0.111


(garang, bold, 'Æ)

‘plant’
‘target’
‘letter’
0.818 0.927
0.821 1.000
0.709 0.818
0.809
0.902
0.724
0.913
1.000
0.792
0.6
0.4
0.8
0.2
0.2
0.2

\end{document} ◮ Merge all triples with common bilingual pairs


bengkeng
Discussion and Conclusion
◮ Low thresholds (α, β ): more coverage; low precision
(garang, ferocious, ö)
(garang, fierce, ö) Ð→
fierce
garang ◮ High thresholds: good precision; low coverage
(bengkeng, fierce, ö)
ferocious ◮ α = 0.6, β = 0.2 gives good trade-off between
ö
coverage, precision and recall
◮ Results are encouraging for such simple input data!
References ◮ Future plan: Integrate lexicon
[1] F. Bond and K. Ogura. “Combining linguistic resources to create a into an MT system
machine-tractable Japanese–Malay dictionary”. In: Language with WSD
Resources and Evaluation 42 (2008), pp. 127–136.

Lian Tze Lim Bali Ranaivo-Malançon Enya Kong Tang


liantze@gmail.com {ranaivo,enyakong}@mmu.edu.my
NLP-SIG, Faculty of Information Technology, Multimedia University, Malaysia

Lim Lian Tze | mosc 2011 23 / 48


Introduction Document Types Special Material Wrapping Up

Oversized Posters

Many possible solutions: sciposter, flowfram, beamerposter


Limits of Lexical Semantic Relatedness with
Ontology-based Conceptual Vectors
Lian-Tze Lim (Universiti Sains Malaysia)
Didier Schwab (Université Pierre Mendès France)

Introduction Constructing Ontology-based CV for WordNet Senses (cont.)

Miller-Charles dataset (1991) Kernel Vectors for WordNet Synsets


◮ Human judgements of similarity between pairs of English words each WN sense s, initialise V 0(s) = V (C); C is the SUMO/MILO class
◮ For
◮ Machine-computed scores can be compared against dataset assigned to s (Niles & Pease, 2003)
We aim to Learning CVs for WN Senses
◮ Represent thematic aspects of text (incl. word senses) with Conceptual compute V (s) as in (Schwab et al, 2007) but using V 0(s) based
◮ Iteratively
Vectors on eXtended WordNet
◮ Define semantic relatedness based on conceptual vectors
◮ Study behavior of CVs constructed based on ontology Comparison with Miller–Charles (M&C) Set

\documentclass{beamer} ◮ . . . by
comparing against Miller-Charles dataset

Complementing WordNet with Non-discrete Navigation


◮ We define two proximity measures based on CV:
proxcv (A, B ) = 1 − DA(A, B ) ÷ π2 
proxsyn(A, B ) = 1 − SynP (A, B ) ÷ π2

\usepackage[orientation=portrait, A





D239

8234567 A234567
38689A

1234567 9234567
◮ WordNet: explicit semantic
relations between senses
◮ Introduce non-discrete
◮ Take highest proxcv and proxsyn values of WN noun senses

Word Pair M&C proxcv proxsyn


Corr. with M&C
proxcv proxsyn
automobile car 0.98 1.00 1.00 1.000 1.000


navigation with idea of
  

˓→ size=a0]{beamerposter}
 3F6E1262F659A 3F6E126786886D9A 3F6E1219A cord smile 0.03 0.48 0.57 1.000 1.000

neightbourhood glass magician 0.03 0.47 0.57 1.000 1.000
C34 C34
C34 ◮ To solve (in part) Tennis gem jewel 0.96 1.00 1.00 1.000 1.000
176781E3
Problem of WordNet rooster voyage 0.02 0.44 0.53 0.999 0.998
D7C68129A D7C68129
FDE8D49A ◮ CVs for WordNet senses magician wizard 0.88 0.90 0.92 0.997 0.997

bird crane 0.74 0.82 0.86 0.996 0.996


projects them onto




\usetheme{...}
C34 C34
crane implement 0.42 0.60 0.68 0.989 0.991
hyperspace


7453D9A A 1223456789A  B6CCDE418379A noon string 0.02 0.38 0.47 0.988 0.988
bird cock 0.76 0.78 0.83 0.983 0.985
coast shore 0.93 0.86 0.89 0.980 0.982
journey voyage 0.96 0.85 0.88 0.974 0.976
Conceptual Vectors (CV)

\author ... % Meta−information


midday noon 0.86 1.00 1.00 0.965 0.968
furnace stove 0.78 0.70 0.77 0.950 0.956
implement tool 0.74 0.67 0.74 0.936 0.944
Principle and Thematic Distance
brother lad 0.42 0.47 0.55 0.925 0.930
◮ Inspired by componential semantics food rooster 0.22 0.34 0.43 0.920 0.921
◮ Formalism projecting semantic components into vectorial space lad wizard 0.11 0.20 0.30 0.915 0.911
asylum madhouse 0.90 0.70 0.76 0.901 0.897
◮ CV elements correspond to concepts indirectly
food fruit 0.77 0.60 0.69 0.885 0.885
◮ Overlap of shared ideas between word senses X & Y : boy lad 0.94 0.62 0.70 0.856 0.860
X ·Y monk slave 0.14 0.62 0.69 0.837 0.839
Thematic proximity: Sim(X , Y ) = cos([
X , Y ) = kX k×k Yk car journey 0.29 0.71 0.77 0.818 0.818
Angular distance: DA = arccos(Sim(A, B )) monk oracle 0.28 0.71 0.77 0.800 0.798
coast hill 0.22 0.71 0.77 0.777 0.774

\begin{document} Operations on Vectors


◮ Normalised

◮ Vectorial

◮ Weak
Vectorial Sum (⊕): averages operand vectors
Term-to-Term Product (⊙): highlights common ideas
Contextualisation: emphasizes features shared by two terms,
forest
coast
brother
graveyard
forest
monk
0.21
0.11
0.71
Corr. with M&C
0.81
0.70
0.34
0.644
0.85
0.77
0.43
0.634
0.735 0.731
0.711 0.704
0.644 0.634

\begin{frame}
accentuated by each other
Discussion
γ(X , Y ) = X ⊕ (X ⊙ Y )
◮ Synonymy: tests thematic closeness of two meanings X and Y , each Results are not too impressive. . .
enhanced with what it has in common with a third (C)

... % Poster contents goes here


Suitability of WN–SUMO/MILO mappings
SynR (X , Y , C ) = DA (γ(X , C ), γ(Y , C )) ◮ ֒brother֓–֒monk֓ scored too low because mapped to very different classes
◮ Partial
Synonymy: SynR where the context is the sum of contextualisation of (H UMAN and R ELIGIOUS O RGANISATION)
X and Y of their means ◮ ֒coast֓–֒hill֓, ֒forest֓–֒graveyard֓ and ֒coast֓–֒forest֓ considered dissimilar

SynP (X , Y ) = SynR (X , Y , γ(X , X ⊕ Y ) ⊕ γ(Y , X ⊕ Y )) by humans, but all L ANDA REA in mapping

\end{frame} Construction
◮ Can be computed from definitions from different sources (dictionaries,
◮ (Take these away and correlations with M&C rise to 0.800 and 0.798)

Suitability of the M&C Set


֒cars֓ and ֒gasoline֓ are semantically related;

synonym lists, hand-crafted indices, . . . )
֒cars֓ and ֒bicycles֓ are semantically similar (Resnik, 1995)

\end{document} ◮ Fabricates new CVs from existing CVs


→ requires bootstrap kernel of pre-computed CVs
◮ Emergence from randomised vectors (Lafourcade 2006)

◮ dimension of the vector space can be chosen freely


֒car֓–֒journey֓: low M&C score; high proxcv and proxsyn scores

◮ M&C

◮ CVs
assesses semantic similarity
(via proxcv and proxsyn) assesses semantic relatedness
◮ more constant lexical density in vector space

◮ no prior sense-to-concept mapping required Conclusion


◮ requires much more iterations, time and computing resources

◮ CVs can model the ideas conveyed by lexical meanings


◮ We try with ontology-based CVs first
◮ Can be constructed based on ontological sources
◮ Can be used to measure lexical semantic relatedness
Constructing Ontology-based CV for WordNet Senses
◮ Disadvantage of ontology-based CVs:
Vector Construction for Ontology Classes ◮ non-standard density of the hierarchy
◮ 1992 elements (each correspond to class in SUMO/MILO (not all were used)) in CV
◮ different philosophies in mapping lexical senses to ontology classes
◮ For each ontology class C , compute V (C) = (v1(C), v2(C), v3(C), . . .) Future Work
0 0
◮ Initialise V (C) with v (C) = 1 if vi corresponds to C , 0 otherwise
i ◮ Effects
of hierarchy-free CVs i.e. construction by emergence
Pdim(V ) vj0(C)
◮ Then V (C) with vi (C) = vi0(C) + j =1 dist (C,Cj ) ◮ Collect
human ratings on lexical semantic relatedness as benchmark
2

liantze@gmail.com Computer-aided Translation Unit, School of Computer Sciences, University Sains Malaysia http://utmk.cs.usm.my
didier.schwab@gmail.com GETALP-LIG, Laboratoire d’Informatique de Grenoble, Université Pierre Mendès France http://getalp.imag.fr

Lim Lian Tze | mosc 2011 23 / 48


Introduction Document Types Special Material Wrapping Up

Leaflets
leaflet: arrange contents into 6 pages on a foldable double-sided sheet
Discussion References Low-Cost Construction of a
▸ Low thresholds (α, β): more coverage; low precision [1] F. Bond and K. Ogura. “Combining linguistic resources to
Multilingual Lexicon from
▸ High thresholds: good precision; low coverage create a machine-tractable Japanese–Malay dictionary”. In:
▸ α ≈ 0.6, β ≈ 0.2 gives good trade-off between coverage, Language Resources and Evaluation 42 (2008), pp. 127–136.
Bilingual Lists
precision and recall [2] P. Vossen. “EuroWordNet: A Multilingual Database of
▸ Results are encouraging for such simple input data! Autonomous and Language-specific Wordnets Connected via
Especially suitable for under-resourced language pairs an Inter-Lingual-Index”. In: Special Issue on Multilingual Lian Tze Lim
▸ Future plan: Integrate multilingual lexicon into an MT Databases, International Journal of Linguistics 17.2 (2004).
Bali Ranaivo-Malançon
system with WSD and user interaction features [3] D. Tufiş, D. Cristeau, and S. Stamou. “BalkaNet: Aims, Enya Kong Tang
Methods, Results and Perspectives – A General Overview”.
Related Work In: Romanian Journal of Information Science and Technology
Special Issue 7.1 (2004), pp. 9–43. NLP-SIG, Faculty of Information Technology
▸ Many multilingual lexicon projects [2, 3]) aligned with Multimedia University, Malaysia
[4] C. Fellbaum, ed. WordNet: An Electronic Lexical Database.
Princeton WordNet [4]
⊳ Overly fine sense distinctions in Princeton WordNet
Language, Speech, and Communication. Cambridge,

▸ Pan Lexicon [5]: compute context vectors of words from


Massachusetts: MIT Press, 1998.

monolingual corpora of different languages, then


[5] M. Sammer and S. Soderland. “Building a Introduction
sense-distinguished multilingual lexicon from monolingual
▸ Bilingual MRDs are good resources for building
grouping into translation sets by matching context corpora and bilingual lexicons”. In: Proceedings of Machine
vectors via bilingual lexicons
⊳ Sense distinctions derived from corpus evidence
Translation Summit XI. Copenhagen, Denmark, 2007, multilingual lexicons
pp. 399–406. ▸ But MRDs have heterogeneous contents and structures
⊳ Produces many translation sets that contain
[6] K. Markó, S. Schulz, and U. Hahn. “Multilingual Lexical ⊳ Not all contain rich information (gloss, domain)
semantically related but not synonymous words, Acquisition by Bootstrapping Cognate Seed Lexicons”. In: (Especially so for under-resourced languages)
⊳ Different structures (sense granularity, distinctions)
e.g. ‘shoot’ and ‘bullet’ (lower precision)
⊳ 44 % precision based on evaluators’ opinions (75 % if
Proceedings of the International Conference on Recent
Advances in Natural Language Processing (RANLP) 2005. ▸ Lowest common denominator: list of source language
item → target language item(s)
inter-evaluator agreement is not required) Borovets, Bulgaria, 2005.
⊳ Does not handle multi-word expressions
▸ Construct multilingual lexicon using only bilingual lists

\documentclass[foldmark,a4paper] ▸ Markó, Schulz and Hahn [6] use cognate mappings to


[7] M. Lafourcade. “Automatically Populating Acception Lexical
Database through Bilingual Dictionaries and Conceptual
derive new translation pairs, validate by processing Vectors”. In: Proceedings of PAPILLON-2002. Tokyo, Japan, One-time Inverse Consultation [1]
parallel corpora (medical domain) Aug. 2002.
⊳ Complex terms indexed on the level of sub-words ▸ Generates a bilingual lexicon for a new language pair
[8] C. Boitet, M. Mangeot, and G. Sérasset. “The PAPILLON
e.g. ‘pseudo⊕hypo⊕para⊕thyroid⊕ism’ from existing bilingual lists

{leaflet} ⊳ 46 % accuracy for each language pair ▸ Given bilingual lexicons L 1 –L 2 , L 2 –L 3 , L 3 –L 2 , generate
project: Cooperatively Building a Multilingual Lexical
Database to Derive Open Source Dictionaries & Lexicons”.
⊳ Requires large aligned thesaurus corpora (easier to In: Proceedings of the 2nd Workshop on NLP and XML bilingual lexicon L 1 –L 3
acquire for specialised domains?) (NLPXML’02). Taipei, Taiwan, 2002, pp. 1–3. ▸ Example: JP–EN, EN–MS, MS–EN lexicons ⇒ JP–MS
⊳ Cognate-based approach not applicable for language Japanese English Malay

\author ... % Meta−information


pairs that are not closely related mark tanda
▸ Lafourcade [7]: compute contextual vectors for Contact p seal anjing laut
translation pairs based on gloss text and associated class stamp tera
labels from semantic hierarchy; compare vectors from Lian Tze Lim liantze@gmail.com
Bali Ranaivo-Malançon ranaivo@mmu.edu.my imprint
different bilingual lexicons to detect synonymy gauge
⊳ Resource requirements not available for all language Enya Kong Tang enyakong@mmu.edu.my
∣E1 ∩ E2 ∣
score(‘tera’) = 2 × =2× = 0.57
pairs, costly task of assigning class labels 2
∣E1 ∣ + ∣E2 ∣ 3+4
NLP-SIG, Faculty of Information Technology
Multimedia University, Cyberjaya, Malaysia.
http://fit.mmu.edu.my/sig/nlp/ ∴p↔ ‘tera’ is more likely to be valid

\begin{document}
\maketitle Merging Translation Triples into Sets
▸ Retain OTIC ‘middle’ language links
▸ For each ‘head’ language LI, filter only triples whose
Algorithm 1: Generating trilingual translation chains
forall the lexical items w h ∈ L 1 do
Wm ← translations of w h in L 2
Precision of 100 Random Translation Sets

0.85
α = 0.0
α = 0.2
α = 0.8
forall the w m ∈ Wm do
score exceed thresholds (See Algorithm 1)
▸ Merge all triples with common bilingual pairs

Precision
0.8
W t ← translations of w m in L 3

\section ... ▸ Malay–English–Chinese example:


ms–en Kamus Inggeris–Melayu untuk Penterjemah
en–zh XDict zh–en CC-CEDICT
forall the w t ∈ W t do
Output a translation triple (w h , w m , w t )
Wm r ← translations of w t in L 2
0.75

0.7

score(w h , w m , w t ) ←
β

... % Leaflet contents


0 0.2 0.4 0.6 0.8
∣common words in w m r ∈ Wm r and w|
(garang, ö ) 0.143
(garang, Ñ S) 0.048
∑ ▸ Precision increases with threshold parameters α and β
∣words in w m r ∈ Wm r ∣
(garang, ferocious, ö)
(garang, bold, ÑS)
(garang, fierce, ö) w∈Wm
▸ Precision generally around 0.70–0.82; max 0.86
▸ Most false positives are not ranked at top of the list
end
∑w∈Wm score(w h , w, w t )
(garang, — S) 0.048
▸ Many errors caused by incorrect POS assignments
(garang, À È) 0.125
(garang, bold, —S) score(w h , w t ) ← 2 ×
(garang, jazzy, ÀÈ) ∣Wm ∣ + ∣Wm r ∣

\end{document} (garang, ' Æ) 0.111


(garang, bold, 'Æ)
⋮ end
X ← maxw t ∈Wt score(w h , w t )
forall the distinct translation pairs (w h , w t ) do
if score(w h , w t ) ≥ αX or (score(w h , w t ))2 ≥ βX
F1 and Rand Index of Selected Translation Sets
▸ False positives will frequently arise when ‘middle’
language members are polysemous, e.g. ‘plant’, ‘target’
bengkeng then ▸ Evaluate accuracy of selected sets with polysemous
(garang, ferocious, ö) Place w h ∈ L 1 , w m ∈ L 2 , w t ∈ L 3 from all triples
Ð→
fierce ‘middle’ language members
(garang, fierce, ö) garang (w h , w ... , w t ) into same translation set
Record score(w h , w t ) and score(w h , w m , w t ) Precision =
(bengkeng, fierce, ö) TP
TP + FP
ferocious ö
else
Discard all triples (w h , w ... , w t ) Recall =
TP
Adding More Languages // The sets are now grouped by TP + FN
(w h , w t ) 2 × Precision × Recall
▸ Construct L 1 –L 2 –L 4 triples F1 =
▸ Add L 4 members to existing L 1 –L 2 –L 3 clusters with end Precision + Recall
TP + TN
RI =
common L 1 & L 2 members end
▸ Example: Malay–English–Chinese + French, using end TP + FP + FN + TN
‘ready-made’ triples from FeM Merge all sets containing triples with same (w h , w m )
Merge all sets containing triples with same (w m , w t )
bengkeng
Test Rand Index F1 Best accuracy when
fierce (cruel, ferocious, garang) word min max min max α β
garang + (féroce, fierce, garang)
Algorithm 2: Adding L k+1 to multilingual lexicon L of ‘bank’ 0.417 0.611 0.588 0.632 0.6 0.4
{L 1 , L 2 , . . . , L k }
ferocious ö ‘plant’ 0.818 0.927 0.809 0.913 0.6 0.2
Ð→

T ← translation triples of L k+1 , L m , L n generated by


‘target’ 0.821 1.000 0.902 1.000 0.4 0.2
Algorithm 1 where L m , L n ∈ {L 1 , L 2 , . . . , L k }
‘letter’ 0.709 0.818 0.724 0.792 0.8 0.2

forall the (w L m , w L n , w L k+1 ) ∈ T do


féroce
bengkeng cruel ▸ F1 and RI increases with α and β
Add w L k+1 to all entries in L that contains both w L m and
▸ But may decrease when they are too high and reject
fierce garang wLn
valid members (false negatives)
end
ferocious ö

Lim Lian Tze | mosc 2011 24 / 48


Introduction Document Types Special Material Wrapping Up

Fillable PDF Forms

\usepackage{hyperref}
... % various settings skipped
\TextField{Name:}\\
\TextField{Affiliation:}\\
\ChoiceMenu[radio=true]
{Are you a:}{Student, Academic}\\
Interest:
\CheckBox{Security}
\CheckBox{Systems}
\CheckBox{User space}\\
\TextField[multiline=true]
{Comments:}\\

Lim Lian Tze | mosc 2011 25 / 48


Introduction Document Types Special Material Wrapping Up

Fillable PDF Forms (cont’d)

Use with caution!


poppler-based viewers (evince, xpdf, okular)
Problem displaying and saving radio/check boxes correctly
Saved forms can’t be opened by other viewers
Adobe Reader
Cannot save filled form as PDF unless Acrobat is installed
Only as field-and-value text file
Can provide “Submit” button for submission to a URL
Or print hard copy of filled form!
PDF XChange Viewer
Best freeware for filling and saving LATEX-created forms
Windows only
Not OSS

Lim Lian Tze | mosc 2011 26 / 48


Introduction Document Types Special Material Wrapping Up

Flash Cards

\documentclass[avery5388,frame]
{flashcards}
\cardfrontstyle{headings}
\cardfrontfoot{Linux} Security

A digital representation of information that


\begin{document}
Certificate identifies you and is issued by Cas, which are
often a trusted third party (TTP).
\begin{flashcard}[Security]
{Certificate} Linux

... Security

\end{flashcard} Access to an object is restricted based on the


sensitivity of the object (defined by the label
MAC (Mandatory Access that is assigned), and granted through
Control) authorization (Clearance) to access that level of
\begin{flashcard}[Security] data.

{MAC ...} Linux

...
\end{flashcard}
\end{document}

Lim Lian Tze | mosc 2011 27 / 48


Introduction Document Types Special Material Wrapping Up

Examination Questions

\documentclass{exam}
...
\begin{questions}
1. What is Paul McCartney’s middle name? (5)
\question[5]
A. John B. Paul C. Ringo D. James
What is Paul McCartney's middle name?
\begin{oneparchoices} 2. What was the Beatles’ first single in 1962? (10)
\choice John \CorrectChoice Paul 3. (a) What was George’s inspiration for ‘While (5)
\choice Ringo \choice James My Guitar Gently Weeps’?
\end{oneparchoices} (b) Who guest-performed for the song and why? (5)

\question[10] What was the Beatles' first


˓→ single in 1962?
\begin{solution}Love Me Do\end{solution}

\question
\begin{parts}
\part[5] What was George's inspiration for
˓→ `While My Guitar Gently Weeps'?
\begin{solution}
He opened a random book and saw the words
˓→ ` `gently weep''.
\end{solution}
...
\end{questions}

Lim Lian Tze | mosc 2011 28 / 48


Introduction Document Types Special Material Wrapping Up

Examination Questions

\documentclass{exam}
...
\begin{questions}\printanswers
1. What is Paul McCartney’s middle name? (5)
\question[5]
A. John B. Paul C. Ringo D. James
What is Paul McCartney's middle name?
\begin{oneparchoices} 2. What was the Beatles’ first single in 1962? (10)
\choice John \CorrectChoice Paul
\choice Ringo \choice James Solution: Love Me Do
\end{oneparchoices}
3. (a) What was George’s inspiration for ‘While (5)
\question[10] What was the Beatles' first My Guitar Gently Weeps’?
˓→ single in 1962?
\begin{solution}Love Me Do\end{solution} Solution: He opened a random book
and saw the words “gently weep”.

\question
(b) Who guest-performed for the song and why? (5)
\begin{parts}
\part[5] What was George's inspiration for Solution: Eric Clapton; he wanted a
˓→ `While My Guitar Gently Weeps'? spiffy guitar solo.
\begin{solution}
He opened a random book and saw the words
˓→ ` `gently weep''.
\end{solution}
...
\end{questions}

Lim Lian Tze | mosc 2011 28 / 48


Introduction Document Types Special Material Wrapping Up

Contents

1 What are TEX, LATEX and Friends?

2 Document Types

3 Special Material

4 Wrapping Up

Lim Lian Tze | mosc 2011 29 / 48


Introduction Document Types Special Material Wrapping Up

Mathematics

(1) relates the golden ratio and the Fibonacci series.



Recall that the golden ratio, 𝜑 = 21 (1 + 5).

∑︁ (−1)n+1
𝜑=1+ (1)
n=1
Fn Fn+1

\eqref{eq:gratio} relates the golden ratio and the Fibonacci series.


Recall that the golden ratio, $\phi = \frac{1}{2} (1 + \sqrt{5})$.

\begin{equation}\label{eq:gratio}
\phi = 1 + \sum^{\infty} _{n=1}
\frac{ (-1)^{n+1} }{ F_n F_{n+1} }
\end{equation}

Lim Lian Tze | mosc 2011 30 / 48


Introduction Document Types Special Material Wrapping Up

Chemical Equations and Molecules

H
O
– –
+2 OH +2 OH 2–
Zn2+ −
↽−
−−
−−−⇀− Zn(OH)2 ↓ −
↽−
−−
−−−⇀− [Zn(OH)4 ] H C C
++2 H +2 H+
amphoteres Hydroxid Hydroxozikat
H
H

\usepackage[version=3]{mhchem} % sufficient for chemical equations


\usepackage{chemfig} % for 2−D molecule drawings
...
\ce{Zn^2+ <=>[\ce{+ 2OH-}][\ce{+ 2H+}]
$\underset{\text{amphoteres Hydroxid}}{\ce{Zn(OH)2 v}}$
<=> C[+2OH-][{+ 2H+}]
$\underset{\text{Hydroxozikat}}{\cf{[Zn(OH)4]^2-}}$ }

\chemfig{H-C(-[2]H)(-[6]H)-C(-[7]H)=[1]O}

Lim Lian Tze | mosc 2011 31 / 48


Introduction Document Types Special Material Wrapping Up

Linguistics
S

(1) %*Wen liebt seine Mutter? NP VP


Whom loves his mother
Pron V NP
‘Who does his mother love?’
He kicked Det N
(2) [[ NP He ] [ VP kicked [ NP the ball ]]] S
the ball

\usepackage{linguex,qtree}
...
\exg. \%*Wen liebt seine Mutter?\\
Whom loves his mother\\
`Who does his mother love?'

\exi. [[NP He ] [VP kicked [NP the ball ]]]S

\Tree [ .S [.NP [.Pron He ] ] [.VP [.V kicked ] [.NP [.Det the ] [.N ball ]
˓→ ] ] ]

Lim Lian Tze | mosc 2011 32 / 48


Introduction Document Types Special Material Wrapping Up

Program Listings
\usepackage{listings,xcolor}
...
\begin{lstlisting}
[language=C,columns=fullflexible,
basicstyle=\ttfamily, #include <stdio.h>
keywordstyle=\bfseries\color{red},
commentstyle=\sffamily\color{green}, /∗
stringstyle=\rmfamily\color{orange}] | Prints "hello world"
#include <stdio.h> ∗/
/* int main(void)
| Prints "hello world" {
*/ printf("hello, world\n");
int main(void)
return 0;
{
}
printf("hello, world\n");
return 0;
}
\end{lstlisting}

Lim Lian Tze | mosc 2011 33 / 48


Introduction Document Types Special Material Wrapping Up

Network Protocols

\usepackage{bytefield}
0 7 8 15
... }︃
\begin{bytefield}{16} Tag Mask
\bitheader{0,7,8,15} \\
Header
\wordgroupr{Header}
Source Destination
\bitbox{4}{Tag} & \bitbox{12}{Mask} \\
\bitbox{8}{Source} &
\bitbox{8}{Destination} Data
\endwordgroupr \\
\wordbox{3}{Data}
\end{bytefield}

Lim Lian Tze | mosc 2011 34 / 48


Introduction Document Types Special Material Wrapping Up

Life Sciences
first case (see text)

AQP1.PRO TLGLLLSCQISILRAVMYIIAQCVGAIVASAIL 112
AQP2.PRO TVACLVGCHVSFLRAAFYVAAQLLGAVAGAAIL 104
AQP3.PRO TFAMCFLAREPWIKLPIYTLAQTLGAFLGAGIV 112
AQP4.PRO TVAMVCTRKISIAKSVFYITAQCLGAIIGAGIL 133
AQP5.PRO TLALLIGNQISLLRAVFYVAAQLVGAIAGAGIL 105

second case (see text)

\usepackage{texshade} % for nucleotide and peptide alignments


...
\begin{texshade}{AQPpro.MSF}
\shadingmode{similar}
\threshold[80]{50}
\setends{1}{80..112}
\hideconsensus
\feature{top}{1}{93..93}{fill:$\downarrow$}{first case (see text)}
\feature{bottom}{1}{98..98}{fill:$\uparrow$}{second case (see text)}
\end{texshade}

Lim Lian Tze | mosc 2011 35 / 48


Introduction Document Types Special Material Wrapping Up

Circuits and SI Units


10 Ω
A
vx 3.45 × 104 V2 lm3 F−1
S
20 Ω 5Ω 5 vx 40 km/h, 85 km/h and 103 km/h
B

\usepackage{siunitx}
\usepackage[siunitx]{circuitikz}
...
\begin{circuitikz}
\draw (0,0) node[anchor=east] {B}
to[short, o-*] (1,0) to[R=20<\ohm>, *-*] (1,2)
to[R=10<\ohm>, v=$v_x$] (3,2) -- (4,2)
to[ cI=$\frac{\si{\siemens}}{5} v_x$, *-*] (4,0) -- (3,0)
to[R=5<\ohm>, *-*] (3,2)
(3,0) -- (1,0) (1,2) to[short, -o] (0,2) node[anchor=east]{A}
;\end{circuitikz}

\SI{3.45d4}{\square\volt\cubic\lumen\per\farad}
\SIlist[per-mode=symbol]{40;85;103}{\kilo\metre\per\hour}

Lim Lian Tze | mosc 2011 36 / 48


Introduction Document Types Special Material Wrapping Up

Meh, What Good is That? Can’t Use it Anywhere Else.


Actually, you can.

Lim Lian Tze | mosc 2011 37 / 48


Introduction Document Types Special Material Wrapping Up

Meh, What Good is That? Can’t Use it Anywhere Else.


Actually, you can.

\usepackage[active,tightpage]{preview}
\PreviewEnvironment{texshade}
...
\begin{texshade}
...
\end{texshade}

Run pdflatex → cropped PDF containing only contents of texshade

Lim Lian Tze | mosc 2011 37 / 48


Introduction Document Types Special Material Wrapping Up

Meh, What Good is That? Can’t Use it Anywhere Else.


Actually, you can.

\usepackage[active,tightpage]{preview}
\PreviewEnvironment{texshade}
...
\begin{texshade}
...
\end{texshade}

Run pdflatex → cropped PDF containing only contents of texshade


gs -otexshade.png -sDEVICE=png16m -r200 -dTextAlphaBits=4
-dGraphicAlphaBits=4 texshade.pdf

Lim Lian Tze | mosc 2011 37 / 48


Introduction Document Types Special Material Wrapping Up

Meh, What Good is That? Can’t Use it Anywhere Else.


Actually, you can.

\usepackage[active,tightpage]{preview}
\PreviewEnvironment{texshade}
...
\begin{texshade}
...
\end{texshade}

Run pdflatex → cropped PDF containing only contents of texshade


gs -otexshade.png -sDEVICE=png16m -r200 -dTextAlphaBits=4
-dGraphicAlphaBits=4 texshade.pdf
Multiple environments → multi-page PDF
Use -otexshade%02d.png to get texshade01.png, texshade02.png, . . .

Lim Lian Tze | mosc 2011 37 / 48


Introduction Document Types Special Material Wrapping Up

Bar Codes
ISBN 978-3-86541-114-3

L E 2 8 H S 9 Z

9 781860 742712 9 783865 411143

\usepackage{auto-pst-pdf} % Needed if running pdflatex; must use option −shell−escape


\usepackage{pstricks,pst-barcode}
...
\begin{pspicture}
\psbarcode{MECARD:N:Malaysia Open Source Conference...}{eclevel=L}{qrcode}
\psbarcode{9781860742712}{includetext guardwhitespace}{ean13}
\psbarcode{978-3-86541-114}{includetext guardwhitespace}{isbn}
\psbarcode{LE28HS9Z}{includetext}{royalmail}
\psbarcode{^453^178^121^239}{columns=2 rows=10}{pdf417}
\end{pspicture}

Lim Lian Tze | mosc 2011 38 / 48


Introduction Document Types Special Material Wrapping Up

Graph Plots
L2
10−1 Lmax
10−2

10−3

10−4

10−5

101 102 103 104


Dof

\usepackage{pgfplots}
...
\begin{tikzpicture}
\begin{loglogaxis}[xlabel=Dof]
\addplot table[x=dof,y=L2]{datafile.dat}; \addlegendentry{$L_2$};
\addplot table[x=dof,y=Lmax]{datafile.dat}; \addlegendentry{$L_\text{max}$};
\end{loglogaxis}
\end{tikzpicture}

Lim Lian Tze | mosc 2011 39 / 48


Introduction Document Types Special Material Wrapping Up

Spreadsheets
(Seriously, use a proper spreadsheet application for complex stuff.)

Year ending Mar 31 2009 2008 2007


Revenue 14580.20 11900.40 8290.30
Cost of sales 6740.20 5650.10 4524.20
Gross profit 7840.00 6250.30 3766.10

\STautoround*{2}
\begin{spreadtab}{{tabular}{l rrr}}
@Year ending Mar 31 & @2009 & @2008 & @2007\\ \hline
@Revenue & 14580.2 & 11900.4 & 8290.3\\
@Cost of sales & 6740.2 & 5650.1 & 4524.2\\ \cline{2-4}
@\emph{Gross profit} & \STcopy{>}{b2-b3} & &\\ \cline{2-4}
\end{spreadtab}

Lim Lian Tze | mosc 2011 40 / 48


Introduction Document Types Special Material Wrapping Up

Gantt Charts
2010 2011
Preliminary Project 100% complete
Objective 1
Task A
Task B
Objective 2
Task A
Task B

\usepackage{pgfgantt}
...
\begin{tikzpicture}
\begin{ganttchart}[...settings...]{16}
\gantttitle{2010}{4} \gantttitle{2011}{12} \\
\ganttbar[progress=100]{Preliminary Project}{1}{4} \\
\ganttlink[link mid=.4]{4}{2}{5}{4} \ganttlink[link mid=.159]{4}{2}{5}{7}
\ganttgroup{Objective 1}{5}{16} \\
\ganttbar[progress=4]{Task A}{5}{10} \\
\ganttlinkedbar[progress=0]{Task B}{11}{16} \\
...
\end{ganttchart}
\end{tikzpicture}

Lim Lian Tze | mosc 2011 41 / 48


Introduction Document Types Special Material Wrapping Up

Chess games

1 e4 e5 2 Nf3 Nc6 3 Bb5 a6

\usepackage[skaknew]%
8
rZblkans
{skak,chessboard}
7
ZpopZpop
...
6
pZnZ0Z0Z
\newgame 5
ZBZ0o0Z0
\mainline{1. e4 e5 2. Nf3 Nc6 3.
˓→Bb5 a6}
4
0Z0ZPZ0Z
\chessboard[smallboard]
3
Z0Z0ZNZ0
2
POPO0OPO
1
SNAQJ0ZR 
a b c d e f g h

Lim Lian Tze | mosc 2011 42 / 48


Introduction Document Types Special Material Wrapping Up

Crossword Puzzles
1

2 3 4 Across: 1 unit of measure Down: 1 𝜂 3 unit of


2 * 5 sectioning unit measure 4 nonproportional
5
font

\usepackage{cwpuzzle} \Clue{2}{AST}{\(\ast\)}
... \Clue{5}{PART}{sectioning unit}
\begin{Puzzle}{5}{3} \end{PuzzleClues}
|* |* |[1]E|X |* |. \begin{PuzzleClues}{
|[2]A|[3]S|T |* |[4]T|. \textbf{Down:} }
|* |[5]P|A |R |T |. \Clue{1}{ETA}{\(\eta\)}
\end{Puzzle} \Clue{3}{SP}{unit of measure}
\begin{PuzzleClues}{ \Clue{4}{TT}{nonproportional font}
\textbf{Across:} } \end{PuzzleClues}
\Clue{1}{EX}{unit of measure}

Lim Lian Tze | mosc 2011 43 / 48


Introduction Document Types Special Material Wrapping Up

Song Books with Guitar Tabs

C G Am F
Country road, take me home, to the place I belong.

C G F C
West Virginia, mountain momma, take me home, country road.

\usepackage{gchords,guitar}
...
\begin{guitar}
\newcommand{\CMaj}{\chord{t}{n,p3,p2,n,p1,n}{C}}
\newcommand{\Amin}...
Country [\CMaj]road, take me [\GMaj]home, ...
\end{guitar}

Lim Lian Tze | mosc 2011 44 / 48


Introduction Document Types Special Material Wrapping Up

Contents

1 What are TEX, LATEX and Friends?

2 Document Types

3 Special Material

4 Wrapping Up

Lim Lian Tze | mosc 2011 45 / 48


Introduction Document Types Special Material Wrapping Up

Summary

LATEX
a document preparation system
professional quality typesetting output

Lim Lian Tze | mosc 2011 46 / 48


Introduction Document Types Special Material Wrapping Up

Summary

LATEX
a document preparation system
professional quality typesetting output
Output artefacts
Academic: papers, theses, books
Dedicated document types
Domain-specific material

Lim Lian Tze | mosc 2011 46 / 48


Introduction Document Types Special Material Wrapping Up

Summary

LATEX
a document preparation system
professional quality typesetting output
Output artefacts
Academic: papers, theses, books
Dedicated document types
Domain-specific material
Usage scenario
Direct authoring
Automatic generation (via scripts etc)
As back-end of other applications

Lim Lian Tze | mosc 2011 46 / 48


Introduction Document Types Special Material Wrapping Up

Getting Help

Many free tutorials and e-books on the Web (beware of obsolete ones!)
Getting to Grips with LATEX. Andy Roberts.
http://www.andy-roberts.net/misc/latex/
LATEX: Beautiful Typesetting. Lim Lian Tze.
http://liantze.penguinattack.org/latextypesetting.html
LATEX and Friends. M.R.C. van Dongen.
http://csweb.ucc.ie/~dongen/LaTeX-and-Friends.pdf
The LATEX WikiBook. http://en.wikibooks.org/wiki/LaTeX
Questions?
TEX FAQ. http://www.tex.ac.uk/cgi-bin/texfaq2html
TEX.SX. http://tex.stackexchange.com/
comp.text.tex usenet group
Malaysian LATEX User Group. http://latex-my.blogspot.com/
Arrange for training

Lim Lian Tze | mosc 2011 47 / 48


Introduction Document Types Special Material Wrapping Up

Thank You

Questions?
liantze@gmail.com
http://latex-my.blogspot.com

Lim Lian Tze | mosc 2011 48 / 48

S-ar putea să vă placă și