Escolar Documentos
Profissional Documentos
Cultura Documentos
Fairuz Abdullah
fairuz@ieee.org tuguniten@gmail.com
College of Engineering
1 / 63
Agenda
1 2
Why? Basics Package installation Typesetting Text Structuring and Cross-referencing Text Typesetting Mathematics Graphics, Figures and Tables Citations and References Journal formating
3 4 5 6 7 8
2 / 63
Why?
Agenda
1 2
Why? Basics Package installation Typesetting Text Structuring and Cross-referencing Text Typesetting Mathematics Graphics, Figures and Tables Citations and References Journal formating
3 4 5 6 7 8
3 / 63
Why?
Why?
A What is L TEX?
pronounced lay-tech or lah-tech a document preparation system: plain text + markup a macro package on top of TEX separation of content and style
Preferred by many academic journals Many, many distros (TeXLive, MiKTeX, MacTeX. . . ) More history at http://www.ctan.org/what_is_tex.html
5 / 63
Why?
6 / 63
Why?
Disclaimer
Its a hands-on demonstration of an alternative tool. Some word processors also provide mechanisms to handle same routine tasks (with varying degrees of ease, consistency and stability) Use the best tool for the task at hand. You are the best judge to decide for yourself.
7 / 63
Basics
Agenda
1 2
Why? Basics Package installation Typesetting Text Structuring and Cross-referencing Text Typesetting Mathematics Graphics, Figures and Tables Citations and References Journal formating
3 4 5 6 7 8
8 / 63
Basics
PDF previewer) TeXMaker : Another simple editor JabRef: Java-based GUI bibliography and reference manager
Optional
LaTable: visual table editor to help with complex tables GhostScript, GSView if you work with PostScript outputs
9 / 63
Basics
Congure MikTeX
We need to congure MikTeX so that it can update & install packages using UNITENs network
Fairuz Abd (TuGUNITEN) February 14, 2012 10 / 63
Basics
Proxy setting
Set proxy to tmg.uniten.edu.my with port 8080 and checked authentication box
Fairuz Abd (TuGUNITEN) February 14, 2012 11 / 63
Basics
Authentication
Basics
Package installation
13 / 63
Basics
Package installation
14 / 63
Basics
Package installation
A L TEX Workow
1 2 3 4 5 6
Create, edit, save .tex le To publish click in front of PDFLaTeX or you can press F6 Correct errors, repeat publishing (click ) again To view output, click in front of View PDF or you can press F7
15 / 63
Text
Agenda
1 2
Why? Basics Package installation Typesetting Text Structuring and Cross-referencing Text Typesetting Mathematics Graphics, Figures and Tables Citations and References Journal formating
3 4 5 6 7 8
16 / 63
Text
Paragraph breaking
Leave a blank line between text to break paragraph Multiple blank lines wont give more vertical spacing TEX determines inter-line spacing to ensure legibility
17 / 63
Text
Special Characters
# $ % & _ { } @
Fairuz Abd (TuGUNITEN)
(hash, pound) (dollar) (percent) (hat) (ampersand) (underscore) (left brace) (right brace) (tilde) (wide tilde) (open double quotes) (close double quotes) (alias)
: : : : : : : : : : : : :
Text
\textbf{bold} bold \textit{italics} italics \underline{underline} underline \textsc{Small Caps} S MALL C APS \emph{emphasis} emphasis
Commands can be nested: \texttt{\emph{Like this.}} Like this.
19 / 63
Text
Font Sizes
Font size changing commands relative to base font size given in documentclass option
{\tiny Text} Text {\scriptsize Text} Text {\footnotesize Text} Text {\small Text} Text {\normalsize Text} Text {\large Text} Text {\Large Text} Text {\LARGE Text} {\huge Text} {\Huge Text}
Text
Text
Text
February 14, 2012 20 / 63
Text
List-like Environments
Bulleted Lists
Numbered Lists
Description Lists
21 / 63
Structure
Agenda
1 2
Why? Basics Package installation Typesetting Text Structuring and Cross-referencing Text Typesetting Mathematics Graphics, Figures and Tables Citations and References Journal formating
3 4 5 6 7 8
22 / 63
Structure
Sectioning Commands
article: section, subsection, subsubsection. book: part (not usually used), chapter, section, . . .
\documentclass{article} \begin{document} \section{Introduction} Introduce your topic here. \section{Background} A line or two. \subsection{Related Work} Review others work. \subsection{Problems} Unresolved issues. \end{document}
Fairuz Abd (TuGUNITEN) February 14, 2012 23 / 63
Structure
Cross-referencing
\documentclass{article} \begin{document} \section{Introduction}\label{sec:intro} Introduce your topic here. \section{Background} \label{sec:background} Mention section \ref{sec:intro} again. \subsection{Related Work} \label{sec:related} Review others work. \subsection{Problems} \label{sec:problems} In section \ref{sec:related} on page \pageref{sec:related}\ldots \end{document}
Fairuz Abd (TuGUNITEN) February 14, 2012 24 / 63
Structure
Other Goodies
Author information (in preamble) \author: Name(s) of authors \title: Title of the article/book/report \date: Specify a date
Other custom elds for respective journals, conference styles (see later)
25 / 63
Structure
Footnote: ...why?\footnote{why not?} Margin notes: ...why?\marginpar{why not?} Auto-generate title: \maketitle Auto-generate TOC: \tableofcontents (\listoffigures,\listoftables well try later)
Try \documentclass{scrartcl} for a modern look Non-English: e.g. \usepackage[bahasam]{babel} (Remove aux les before typesetting if you modify this line!) PDF hyperlinks and bookmarks: hyperref package
26 / 63
Maths
Agenda
1 2
Why? Basics Package installation Typesetting Text Structuring and Cross-referencing Text Typesetting Mathematics Graphics, Figures and Tables Citations and References Journal formating
3 4 5 6 7 8
27 / 63
Maths
(1) relates the golden ratio and the Fibonacci series. Recall
1 that the golden ratio, = 2 (1 + 5).
= 1+
(1)
Source: http://mathworld.wolfram.com/GoldenRatio.html
Fairuz Abd (TuGUNITEN) February 14, 2012 28 / 63
Agenda
1 2
Why? Basics Package installation Typesetting Text Structuring and Cross-referencing Text Typesetting Mathematics Graphics, Figures and Tables Citations and References Journal formating
3 4 5 6 7 8
29 / 63
30 / 63
Figures
\begin{figure}[hbt!]\centering \includegraphics[width=.3\textwidth]{logouniten} \caption{UNITEN s logo} \label{fig:uniten:logo} \end{figure} Figure \ref{fig:uniten:logo} depicts UNITEN s logo.
31 / 63
Tabular Material
\begin{tabular}{| l | c || r |} \hline one & two two & three three tree \\ \hline one one & two two two & three \\ \hline one one one & two & three three \\ \hline\hline \multicolumn{2}{|l||}{In the end} & What?! \\ \hline \end{tabular}
(http://tug.ctan.org/tex-archive/support/latable/)
Fairuz Abd (TuGUNITEN) February 14, 2012 32 / 63
Tables
\begin{table}[hbt!]\centering \caption{Sample table}\label{tab:sample} \begin{tabular}{| l | c || r |} \hline one & two two & three three tree \\ \hline one one & two two two & three \\ \hline \end{tabular} \end{table} Table \ref{tab:sample} is a very simple example.
33 / 63
References
Agenda
1 2
Why? Basics Package installation Typesetting Text Structuring and Cross-referencing Text Typesetting Mathematics Graphics, Figures and Tables Citations and References Journal formating
3 4 5 6 7 8
34 / 63
References
latex-refs.bib
@ARTICLE{knuth:1984, author = {Donald E. Knuth}, title = {Literate programming}, journal = {The Computer Journal}, year = {1984}, volume = {27}, number = {2}, pages = {97--111}, address = {Oxford, UK}, publisher = {Oxford University Press} }
http://jabref.sourceforge.net
35 / 63
References
\documentclass{article} \bibliographystyle{plain} \begin{document} \cite{latex:companion} is a useful book. Knuth introduced the literate programming paradigm while developing \TeX\ \cite{knuth :1984}. \bibliography{latex-refs} \end{document}
36 / 63
References
plain
acm
unsrt
ieeetr
37 / 63
References
alpha
38 / 63
Journal formating
Agenda
1 2
Why? Basics Package installation Typesetting Text Structuring and Cross-referencing Text Typesetting Mathematics Graphics, Figures and Tables Citations and References Journal formating
3 4 5 6 7 8
39 / 63
Journal formating
IEEE Transactions
\documentclass{IEEEtran} \usepackage{graphicx} \author{Lim Lian Tze and Another Author} \thanks{This work was received January 20, 2010; revised January 30, 2010.} \thanks{Lim Lian Tze is with the Multimedia University. Another Author is with Another University. See http://fit.mmu.edu.my/sig/nlp/ for contact details.} \title{My First Paper} \IEEEpubid{0000--0000/00\$00.00 \copyright 2007 IEEE} \begin{document} \maketitle \begin{abstract} This should be a succinct paragraph summarising your paper.
Fairuz Abd (TuGUNITEN) February 14, 2012 40 / 63
Journal formating
\section{Introduction} ...
%% Use IEEEtran bibliography style
\bibliographystyle{IEEEtran} \bibliography{bibliography-file}
%% Author biographies
\begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in]{lltgrayscale}}] {Lim Lian Tze} is currently a Ph.D.\ student at the Multimedia University studying Natural Language Processing.
Fairuz Abd (TuGUNITEN) February 14, 2012 41 / 63
Journal formating
\end{IEEEbiography} \begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in]{ another-grayscale}}] {Another Author} is Associate Professor at Another University with a research interest in Natural Language Processing. \end{IEEEbiography} \end{document}
42 / 63
Journal formating
\author{Joe Richardson,$^{1,*}$ Antoinette Wrighton,$^2$ and Jennifer Mayfield$^{2,3}$} \address{$^1$Peer Review Department, Optical Society of America, \\ 2010 Massachusetts Avenue, NW,
Fairuz Abd (TuGUNITEN) February 14, 2012 43 / 63
Journal formating
\begin{abstract}Authors should note the new affiliation, reference, and reference callout styles introduced as of 2007. See \texttt{osastyle.tex} for full details. \end{abstract} \ocis{000.0000, 999.9999.}% REPLACE WITH CORRECT OCIS CODES FOR YOUR ARTICLE
% NOTE: \ocis{} IS ALIASED TO \pacs{} BUT MUST % FORMAT THE TERMS CORRECTLY FOR EACH JOURNAL
Fairuz Abd (TuGUNITEN) February 14, 2012 44 / 63
Journal formating
\maketitle
45 / 63
Journal formating
\setcounter{page}{1} %First page \def\pages{1--5} %Total pages \def\thevol{1} %Vol.Number \def\thenumber{1} %Vol. SubNumber \def\theyear{2004} %Year of publication \def\thedoi{20040001} %DOINumber \begin{document}
46 / 63
Journal formating
Journal formating
\and
%Address of third author
\received{$\clubsuit$%<date to be completed by publisher } \keywords{%<insert some Keywords } \titlerunning{%<insert a shorttitle } \authorrunning{%First author, second author
Fairuz Abd (TuGUNITEN) February 14, 2012 48 / 63
Journal formating
\subsection{%Chapter 1.1 }
%Text
\subsubsection{%Chapter 1.1.1
Fairuz Abd (TuGUNITEN) February 14, 2012 49 / 63
Journal formating
\begin{figure}[t]%Onecolumn gure on top of the page \begin{figure}[b]%Onecolumn gure at the bottom of the page \begin{figure}[h]%Onecolumn gure right here (if possible) \caption{%<insert gure caption (optional) } \end{figure}
%%%%%%%%%%%%%%%Twocolumn gures (use "{gure*}"
50 / 63
Journal formating
\begin{table}[t]%Onecolumn table on top of the page \begin{table}[b]%Onecolumn table at the bottom of the page \begin{table}[h]%Onecolumn table right here (if possible) \caption{%<insert table caption (optional) }
%Tabletext
\end{table}
%%%%%%%%%%%%%%%Twocolumn tables (produced with "{table*}"
\end{table*}
%%%%%%%%%%%%%%%%Bibliography environment%%%%%%%%%%%%%%%
Fairuz Abd (TuGUNITEN) February 14, 2012 51 / 63
Journal formating
52 / 63
Journal formating
IOP
\documentclass[12pt]{iopart} \newcommand{\gguide}{{\it Preparing graphics for IOP journals}}
%Uncomment next line if AMS fonts required %\usepackage{iopams}
\begin{document} \title[Author guidelines for IOP journals in \LaTeXe]{How to prepare and submit an article for publication in an IOP journal using \LaTeXe} \author{} \address{IOP Publishing, Dirac House, Temple Back, Bristol BS1 6BE, UK} \ead{custserv@iop.org} \begin{abstract}
53 / 63
Journal formating
IOP (contd)
\end{abstract}
%Uncomment for PACS numbers title message %\pacs{00.00, 20.00, 42.10} % Keywords required only for MST, PB, PMB, PM, JOA, JOB? %\vspace{2pc} %\noindent{\it Keywords}: Article preparation, IOP journals % Uncomment for Submitted to journal title message %\submitto{\JPA} % Comment out if separate title page not required
Journal formating
IOP (contd)
\bibitem{book1} Goosens M, Rahtz S and Mittelbach F 1997 {\it The \LaTeX\ Graphics Companion\/} (Reading, MA: Addison-Wesley) \bibitem{eps} Reckdahl K 1997 {\it Using Imported Graphics in \LaTeX\ } (search CTAN for the file epslatex.pdf ) \end{thebibliography} \end{document}
55 / 63
Journal formating
Elsevier
\documentclass[preprint,12pt]{elsarticle}
%% Use the option review to obtain double line spacing %% \documentclass[authoryear,preprint,review,12pt]{elsarticle} %% Use the options 1p,twocolumn; 3p; 3p,twocolumn; 5p; or 5p,twocolumn %% for a journal layout: %% \documentclass[nal,1p,times]{elsarticle} %% \documentclass[nal,1p,times,twocolumn]{elsarticle} %% \documentclass[nal,3p,times]{elsarticle} %% \documentclass[nal,3p,times,twocolumn]{elsarticle} %% \documentclass[nal,5p,times]{elsarticle} %% \documentclass[nal,5p,times,twocolumn]{elsarticle} %% For including gures, graphicx.sty has been loaded in %% elsarticle.cls. If you prefer to use the old commands %% please give \usepackage{epsg}
56 / 63
Journal formating
Elsevier (contd)
%% The amssymb package provides various useful mathematical symbols
\usepackage{amssymb}
%% The amsthm package provides extended theorem environments %% \usepackage{amsthm} %% The lineno packages adds line numbers. Start line numbering with %% \begin{linenumbers}, end it with \end{linenumbers}. Or switch it on %% for the whole article with \linenumbers. %% \usepackage{lineno}
Journal formating
Elsevier (contd)
%% use the tnotetext command for theassociated footnote; %% use the fnref command within \author or \address for footnotes; %% use the fntext command for theassociated footnote; %% use the corref command within \author for corresponding author footnotes; %% use the cortext command for theassociated footnote; %% use the ead command for the email address, %% and the form \ead[url] for the home page: %% \title{Title\tnoteref{label1}} %% \tnotetext[label1]{} %% \author{Name\corref{cor1}\fnref{label2}} %% \ead{email address} %% \ead[url]{home page} %% \fntext[label2]{} %% \cortext[cor1]{} %% \address{Address\fnref{label3}} %% \fntext[label3]{}
\title{}
58 / 63
Journal formating
Elsevier (contd)
%% use optional labels to link authors explicitly to addresses: %% \author[label1,label2]{} %% \address[label1]{} %% \address[label2]{}
\end{abstract} \begin{keyword}
%% keywords here, in the form: keyword \sep keyword %% PACS codes here, in the form: \PACS code \sep code
59 / 63
Journal formating
Elsevier (contd)
%% MSC codes here, in the form: \MSC code \sep code %% or \MSC[2008] code \sep code (2000 is the default)
\end{keyword} \end{frontmatter}
%% \linenumbers %% main text
\section{} \label{}
%% The Appendices part is started with the command \appendix; %% appendix sections are then done as normal sections %% \appendix %% \section{} %% \label{}
Fairuz Abd (TuGUNITEN) February 14, 2012 60 / 63
Journal formating
Elsevier (contd)
%% If you have bibdatabase le and want bibtex to generate the %% bibitems, please use %% %% \bibliographystyle{elsarticlenum} %% \bibliography{<your bibdatabase>} %% else use the following coding to input the bibitems directly in the %% TeX le.
\begin{thebibliography}{00}
%% \bibitem{label} %% Text of bibliographic item
Journal formating
Elsevier (contd)
62 / 63
Journal formating
Credit roll
Credit goes to Lim Lian Tze (USM) for the slides content and formatting
A This presentation is created with LTEX with Beamer package using
THANK YOU!
63 / 63