General
When I first time wrote my paper, I spent some hours to be
familiar with Latex. My friend suggested me to look into TeXlipse and I found
that it is easier for a Java programmer as me who have used Eclipse for long
time. This article will show you how to setup and prepare to use TeXlipse with
Eclipse. Moreover, I will show some very principle syntaxes to write on Latex.
Software
Everything I need is:
- Platform: Window 7.
- Latex (core): MiKTex 2.9. (Link http://miktex.org/download)
- Eclipse: Juno (Version 4.2). (Link http://www.eclipse.org/downloads/).
- Pdf Reader: Foxit Reader 5.0.(Or whatever you have to read pdf files).
After downloading MiKTex, you install it to your system. For
instance, on my computer, I install it on C:\Program Files\MiKTeX 2.9
(MIKTEX_HOME). We do not need to add any environment variables to our system.
To install TeXlipse, we could download from the Marketplaces
or install it as new software (From Help menu of Eclipse).
Figure 1: Install
TeXlipse from the Yoxos Marketplace.
(You should restart
Eclipse after installing TeXlipse.)
Configuration
The next step is to configure Eclipse to work with TeXlipse:
Builder Settings (find paths to MiKTex) and Viewer Setting (find paths to Pdf
readers).
Builder Settings
We open menu Window à Preferences, expand
Texlipse category and choose Builder Settings.
Here you click the Browse button to find the bin directory
of MiKTex. It should be MIKTEX_HOME\miktex\bin. After that, Eclipse will map automatically programs’ paths as picture below:
Viewer Settings
This configuration is to map a (or many) pdf reader tool
with MiKTex. Click Viewer Settings of Texlipse, then remove all default viewer
configurations because I do not have any tools like that. Click the new button
to add Foxit Reader configuration. The viewer configuration panel will be
displayed:
Figure 3: Add Forxit
Reader configuration.
What we need to do is type a viewer name and browse to the
installed location. We will have result after hitting the OK button:
Hit OK to finish configuration step.
Demo
To easy work, we change perspectives to Latex. Click File à
New à
LaTeX Project:
After that, we type a name for our project. The important
option is output format. We change from default to pdf and build commands will
be changed to pdflatex.exe (on Window). You could change templates on the list
box and hit Next:
Figure 6: Choose
output formats and tempaltes.
The last step for the project creation is to type names for
output file and main tex file. Then, hit Finish:
Eclipse will run and there are some logs generated on the Console
view. If there is no error (suppose not if you configuration succeed), the
project will have a structure as below (including a pdf file):
Now you can happily work with
Latex. Every time you change the main tex file (demo.tex) and save it, the pdf
file (New paper.pdf) will be deleted and regenerated. In case you are opening
the pdf file and you try to save the tex file, Eclipse will have an error.
Therefore, make sure that there is no application opening your pdf file when
you want to modify your tex file.
Some principle syntax of Latex
Comment
% The percent sign (%) is for comments.
Heading
\section{Big Heading}
\subsection{Small Heading}
Item
\begin{enumerate} % For oder by number
\item
Number
one
\item
Number
two
\begin{itemize} % For order by bullets
\item
Bullet
one
\item
Bullet
two
\end{itemize}
\item
Number
three
\begin{description} % Description keywords
\item[Latex]
It
is great tool for writing papers.
\item[Eclipse]
It
is powerful tool for developers.
\end{description}
\end{enumerate}
Some text sizes
\emph{Italic}
\textbf{Bold}
\tiny{Tiny}
\scriptsize{Scriptsize}
\footnotesize{footnotesize}
\small{small}
\normalsize{normalsize}
\large{large}
\Large{Large}
\LARGE{LARGE}
\huge{huge}
\Huge{Huge}
\textup{TextUp}
\textit{textit}
\textsl{textsl}
\textsc{textsc}
\textmd{textmd}
\textbf{textbf}
Font families
\textrm{Roman family}\\
\rmfamily{Roman family}\\
\textsf {Sans serif family} \\
References
Here you could find more Latex syntaxes: http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/
Good tutorial, it is easy to follow. Thank you for sharing!
ReplyDelete