Difference between revisions of "LaTeX on CSE"
From CsWiki
Line 3: | Line 3: | ||
Start an document like this: | Start an document like this: | ||
+ | |||
+ | To use Hebrew as primary language: | ||
<pre>\documentclass[12pt]{article} | <pre>\documentclass[12pt]{article} | ||
\usepackage{ucs} % package to add unicode support | \usepackage{ucs} % package to add unicode support | ||
\usepackage[utf8x]{inputenc} % adding the UTF-8 encoding | \usepackage[utf8x]{inputenc} % adding the UTF-8 encoding | ||
− | \usepackage[english,hebrew]{babel} | + | \usepackage[english,hebrew]{babel} % Hebrew is primary, English is secondary |
\begin{document} | \begin{document} | ||
שלום! | שלום! | ||
+ | |||
\begin{otherlanguage}{english} | \begin{otherlanguage}{english} | ||
− | English text with \R{\small טכסט בעברית}. | + | English text with \R{\small טכסט בעברית}. % \R{'hebrewtext'} |
And one more English. | And one more English. | ||
\end{otherlanguage} | \end{otherlanguage} | ||
Line 26: | Line 29: | ||
\usepackage{ucs} % package to add unicode support | \usepackage{ucs} % package to add unicode support | ||
\usepackage[utf8x]{inputenc} % adding the UTF-8 encoding | \usepackage[utf8x]{inputenc} % adding the UTF-8 encoding | ||
− | \usepackage[hebrew,english]{babel} | + | \usepackage[hebrew,english]{babel} English is primary Hebrew is secondary |
\begin{document} | \begin{document} | ||
Line 37: | Line 40: | ||
טכסט בעברית | טכסט בעברית | ||
\newline % new line (also \\ ) | \newline % new line (also \\ ) | ||
− | \L{and | + | \L{and English also} % \L{'englishtext'} |
\end{otherlanguage} | \end{otherlanguage} | ||
\rightline{ \R{כותבים בעברית!} } | \rightline{ \R{כותבים בעברית!} } | ||
\end{document}</pre> | \end{document}</pre> | ||
+ | |||
+ | Note that you must type in Unicode (UTF-8) character encoding. | ||
+ | There is a cute front end for LaTeX - Kile (run as 'kile') |
Revision as of 10:56, 1 November 2007
This is a short tutorial to use simple LaTeX document preparing system. See at here an example: http://www.sciencebits.com/files/computing/he_sample.tex http://www.sciencebits.com/files/computing/he_sample.pdf
Start an 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. There is a cute front end for LaTeX - Kile (run as 'kile')