LaTeX on CSE

From CsWiki
Revision as of 12:23, 5 November 2007 by Osdmitryp (Talk | contribs)

Jump to: navigation, search

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.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')