# Differences

This shows you the differences between two versions of the page.

 fuss:latex [2016/01/15 10:22]office [Hide Sections at Compile Time Using a Conditional] fuss:latex [2017/02/22 18:30] (current) Both sides previous revision Previous revision 2016/01/27 07:32 office [Hide Sections at Compile Time Using a Conditional] 2016/01/15 10:22 office [Hide Sections at Compile Time Using a Conditional] 2016/01/15 10:21 office [Regenerate LaTeX Format] 2015/07/29 00:00 office [Update To LaTeX2e] 2015/07/28 23:19 office [Update To LaTeX2e] 2015/07/28 23:18 office [Change Font inside Verbatim Environment] 2015/01/09 05:34 external edit2014/12/08 19:01 office [Using non-Latin Characters] 2014/01/15 20:02 external edit2013/12/25 00:24 office [Using non-Latin Characters for Latex and Bibtex] 2013/12/25 00:23 office 2013/05/09 19:27 external edit Next revision Previous revision 2016/01/27 07:32 office [Hide Sections at Compile Time Using a Conditional] 2016/01/15 10:22 office [Hide Sections at Compile Time Using a Conditional] 2016/01/15 10:21 office [Regenerate LaTeX Format] 2015/07/29 00:00 office [Update To LaTeX2e] 2015/07/28 23:19 office [Update To LaTeX2e] 2015/07/28 23:18 office [Change Font inside Verbatim Environment] 2015/01/09 05:34 external edit2014/12/08 19:01 office [Using non-Latin Characters] 2014/01/15 20:02 external edit2013/12/25 00:24 office [Using non-Latin Characters for Latex and Bibtex] 2013/12/25 00:23 office 2013/05/09 19:27 external edit Line 1: Line 1: + ====== Installing Tex Live Under Windows ====== + The TeX Live install bundle found at [[http://​www.tug.org/​texlive/​windows.html|TeX Live Windows installation]] makes perl crash under Windows. The workaround is to use some other perl bundle. Currently there are two major perl distributions,​ [[http://​www.activestate.com/​activeperl/​downloads|Active State Perl]] (our favorite) and [[http://​strawberryperl.com/​releases.html|Strawberry Perl]]. To work around the problem: + + - Install either Active State Perl or Strawberry Perl from the links above. + - Right click the ''​install-tl.bat''​ file from the [[http://​www.tug.org/​texlive/​acquire-netinstall.html|install-tl.zip]] and select ''​Edit''​ so the installer dos code shows up. + + Change the following lines: + ​ + + rem Use TL Perl + set "​path=%~dp0tlpkg\tlperl\bin;​%path%"​ + set "​PERL5LIB=%~dp0tlpkg\tlperl\lib"​ + ​ + ​ + to the following: + ​ + + rem Use TL Perl + rem set "​path=%~dp0tlpkg\tlperl\bin;​%path%"​ + rem set "​PERL5LIB=%~dp0tlpkg\tlperl\lib"​ + ​ + ​ + which comments out the TeX Live installer perl settings and uses the system-wide perl you installed in the first step. + + ====== Using non-Latin Characters ====== + + The most elegant way is to use UTF8 encodings for both the bibliography file and the document. UTF8 has to be supported by the operating system and the editor (popular latex editors allow you to change the character encoding in their preferences). Then add in the preamble: + + + \usepackage[utf8]{inputenc} + \usepackage[T2A]{fontenc} + \usepackage[russian,​english]{babel} + + ​ + + this will render UTF8 (keyboard-generated) characters exactly as they are. The third line allows you to specify languages used in the document. + + ====== Change Font inside Verbatim Environment ====== + + This can be done by surrounding the ''​verbatim''​ environment by ''​begingroup''​ and ''​endgroup''​ and then using ''​fontsize''​ to select the font size and the line spacing. + + + \begingroup + \fontsize{8pt}{10pt}\selectfont + \begin{verbatim}  ​ + This font is 8pt. + \end{verbatim}  ​ + \endgroup + ​ + + The first parameter to ''​fontsize''​ is the font size (''​8pt''​) and the second parameter represents the line spacing (''​10pt''​). + + ====== Update To LaTeX2e ====== + + LaTeX2e is the current LaTeX version and usually has to be installed on top of an initial install. For example, on the Amiga, the ''​PasTeX''​ LaTeX distribution can be updated by copying over the files from LaTeX2e in the ''​texmf''​ directory as described. + + First, we need to get [[http://​www.ctan.org/​tex-archive/​macros/​latex/​base|the latest LaTeX distribution from CTAN]]. We are only interested in the ''​base''​ directory which we can download. + + Then unpack the ''​base''​ directory: + + tar -zxpvf base.tar.gz + ​ + + which will produce a ''​base''​ directory containing all the necessary files. Some of these files have to be installed into the local latex distribution which is by convention referred to ''​texmf''​ where all the LaTeX files are placed. + + Now, unpack the distribution to generate the LaTeX format files: + + cd base + initex unpack.ins + initex latex.ltx + ​ + + From the ''​base''​ directory, copy all the required files: + + cp latex.fmt latex.log /​usr/​share/​texmf/​web2c + cp *.fd *.cls *.clo *.sty *.def *.tex /​usr/​share/​texmf/​tex/​latex/​base + cp *.ist /​usr/​share/​texmf/​makeindex + ​ + + and then test the installation using the provided ''​ltxcheck.tex'':​ + + mkdir tmp + cd tmp + cp ../​ltxcheck.tex ./ + latex ltxcheck.tex + ​ + + ====== Regenerate LaTeX Format ====== + + Find the ''​latex.ltx''​ file which is usually located under ''​texmf/​tex/​latex/​base/​latex.ltx''​. Change directory to the first directory up (in this case ''​base''​). Then issue: + + initex latex.ltx + ​ + and copy the resulting ''​latex.fmt''​ and ''​latex.log''​ to ''​texmf/​web2c''​. + + ====== Hide Sections at Compile Time Using a Conditional ====== + + First we create the conditional:​ + + \newif\ifanswers + ​ + + then we create a toggle: + + \answerstrue % comment out to hide answers + ​ + + which will show the text in case it is not commented. + + Finally, any block that should not appear on the page can be surrounded by ''​\ifanswers''​ and ''​\fi'':​ + + + \ifanswers + The solution is here! + \fi + ​ + + ====== Number Sets ====== + + Number sets can be displayed using the ''​amsfonts''​ or the ''​amssymb''​ packages. + + ^ Latex ^ Description ^ + | ''​\mathbb{P}''​ | prime numbers $\mathbb{P}$ | + | ''​\mathbb{W}''​ | whole numbers $\mathbb{W}$ | + | ''​\mathbb{N}''​ | natural numbers $\mathbb{N}$ | + | ''​\mathbb{Z}''​ | integers $\mathbb{Z}$ | + | ''​\mathbb{I}''​ | irrational numbers $\mathbb{I}$ | + | ''​\mathbb{Q}''​ | rational numbers $\mathbb{Q}$ | + | ''​\mathbb{R}''​ | real numbers $\mathbb{R}$ | + | ''​\mathbb{C}''​ | complex numbers $\mathbb{C}$ |