Difference between revisions of "LaTeX on CSE"

From CsWiki
Jump to: navigation, search
Line 1: Line 1:
 
This is a short tutorial to use simple ,multi language LaTeX document preparing system.
 
This is a short tutorial to use simple ,multi language LaTeX document preparing system.
See at here an example:  
+
See at here an example: <br>
 
[http://www.sciencebits.com/files/computing/he_sample.tex LaTeX example]<br>
 
[http://www.sciencebits.com/files/computing/he_sample.tex LaTeX example]<br>
 
[http://www.sciencebits.com/files/computing/he_sample.pdf Output file]<br>
 
[http://www.sciencebits.com/files/computing/he_sample.pdf Output file]<br>
Line 52: Line 52:
 
Save the file with some name and 'tex' extension like <file.tex>
 
Save the file with some name and 'tex' extension like <file.tex>
 
Then run:
 
Then run:
latex file.tex
+
    latex file.tex
 
See that is no errors and to view an result run <br>
 
See that is no errors and to view an result run <br>
xdvi file.tex
+
    xdvi file.tex
 
<br>
 
<br>
 
To convert dvi file to Post Script or to pdf use dvips or dvipdf commands:
 
To convert dvi file to Post Script or to pdf use dvips or dvipdf commands:
 
<br>
 
<br>
dvips file.tex
+
    dvips file.tex
 
<br>
 
<br>
dvipdf file.tex
+
    dvipdf file.tex
 
<br>
 
<br>
 
There is a cute front end for LaTeX - Kile (run as 'kile')
 
There is a cute front end for LaTeX - Kile (run as 'kile')

Revision as of 12:21, 5 November 2007

This is a short tutorial to use simple ,multi language LaTeX document preparing system. See at here an example:
LaTeX example
Output file

Start You document like this:

To use Hebrew as primary language:

\documentclass[12pt]{article}
\usepackage{ucs}   % package to add unicode support
\usepackage[utf8x]{inputenc}  % adding the UTF-8 encoding
\usepackage[english,hebrew]{babel}     % Hebrew is primary, English is secondary

\begin{document}
שלום!

\begin{otherlanguage}{english}
        English text with \R{\small טכסט בעברית}.     % \R{'hebrewtext'}
        And one more English.
\end{otherlanguage}

    כותבים בעברית!
\end{document}


Or if you want English as primary language


\documentclass[12pt]{article}
\usepackage{ucs}   % package to add unicode support
\usepackage[utf8x]{inputenc}  % adding the UTF-8 encoding
\usepackage[hebrew,english]{babel}       English is primary Hebrew is secondary

\begin{document}

Sample for English and Hebrew \\ %  new line

\centerline{ \R{שלום!} }

\begin{otherlanguage}{hebrew}
        טכסט בעברית
        \newline        % new line (also \\ )
        \L{and English also}         % \L{'englishtext'}
\end{otherlanguage}

\rightline{ \R{כותבים בעברית!} }
\end{document}

Note that you must type in Unicode (UTF-8) character encoding.

Save the file with some name and 'tex' extension like <file.tex> Then run:

    latex file.tex

See that is no errors and to view an result run

    xdvi file.tex


To convert dvi file to Post Script or to pdf use dvips or dvipdf commands:

    dvips file.tex


    dvipdf file.tex


There is a cute front end for LaTeX - Kile (run as 'kile')