Difference between revisions of "LaTeX on CSE"

From CsWiki
Jump to: navigation, search
Line 54: Line 54:
 
     latex file.tex
 
     latex file.tex
 
See that is no errors and to view a result run  
 
See that is no errors and to view a result run  
     xdvi file.tex
+
     xdvi file.dvi
 
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:
     dvips file.tex
+
     dvips file.dvi
     dvipdf file.tex
+
     dvipdf file.dvi
 
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 16:48, 28 January 2010

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 a result run

    xdvi file.dvi

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

    dvips file.dvi
    dvipdf file.dvi

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