booyaa dot org
  • Adverts

  • 123-reg sucks!

    123-reg screwed up the renewal of my domain (booyaa.org). To read all about it click here

  • Link Exchange

    Allotment Vegetable Growing Allotment diaries, photographs, advice about growing vegetables, fruits and herbs with a forum for chatting on the plot.
  • Meta

  • « How to configure WebDAV on Apache and Domino | Home | booyaa.org »

    Installing LaTeX in Windows

    By booyaabooyaabooyaa | March 14, 2005


    i’ve spent the weekend trying to understand the mechanics off latex to help lou out. i’ll write down what i found out here..

    ===== latex =====
    so first we’ve got to get latex, miktex is defacto win32 version of latex.
    * grab the setup program from here
    * now whilst the installation instructions are a little out of date (some of the setup screens don’t match the current setup proggie) i recommend it.
    * the setup program works two fold, you pick size of the distribution (small/large/total); it downloads all the packages that come with that “size” distribution, then it installs them locally. personally i’d pick the “small” package and work from there.

    about those two directories created by miktex (assuming you chose the default values)
    c:\textmf - where the standard distribution packages live (i.e. packages that came with small/large/total)
    c:\localtexmf - where your own packages, fonts etc live

    ===== postscript =====
    while you’re here make sure you download [[http://www.cs.wisc.edu/~ghost/gsview/get43.htm|ghostview]] (you’ll need [[http://www.cs.wisc.edu/~ghost/doc/AFPL/get704.htm|ghostscript]] too). i wouldn’t bother since it’s loaded with nag wear and for the sake of proofing tex files (i.e. rendering) yap (the dvi viewer that comes with miktex) will suffice. furthermore winedt (see below) has an option to write dvi’s out to pdf files.

    ===== winedt =====
    then you want an editor, lou told me that everyone was using winedt so you can get it here
    * grab a copy from [[http://www.winedt.com/download.html|here]].
    * again follow the [[http://www.winedt.com/install.html|instructions]] and make sure you run the tex wizard.

    ==== using winedt’s tex features (this assumes you ran the tex wizard) ====
    to compile the file you’re currently editing (assumes you’re editing a .tex file) - ctrl-shift-l
    to view your dvi file (assumes your last compile worked) - ctrl-shift-v
    to convert your dvi file to pdf - click the dvi2pdf icon (no shortcut have been defined)

    ===== how to install packages =====
    ==== parsetree ====
    lou had to make some pretty tree diagrams and told me that there was a package called parsetree.sty. you can get a copy of it [[http://www.essex.ac.uk/linguistics/clmt/latex4ling/trees/parsetree/parsetree.sty|here]].

    * create “latex” in c:\localtexmf\tex\
    * copy parsetree.sty to your newly created directory.
    * in winedt: accessories -> miktex options -> roots tab -> refresh fndb (make sure c:\localtexmf is highlighted when you do this)
    * click ok until all the windows disappear

    note about brackets and special characters: parsetree is math’s mode so you’ll need to use $\langle$ and $\rangle$ to represet < and > instead of text mode \less and \greater. yes the “$” are vital so that spacing is correct. you’re a bit shagged if you need parens since they’re fundamental to this package so you’ll have to use the literal form as discussed here (search for ’special’.

    ==== nice set of fonts you got there love ====
    switching fonts:

    \fontfamily{palatino}
    \selectfont

    switching back to the default font:

    \fontfamily{\rmdefault}
    \selectfont

    setting the default font for the document:

    \renewcommand{\familydefault}{palatino}

    using usepackage with fonts:\\
    i was able to discover that some fonts that could be referenced immediately live in c:\texmf\tex\latex\psnfss. these seem to be incomplete because mappings for roman/sans/typewriter get flashed up when you’re compiling your tex file. ymmv.

    note about fonts:\\
    to really use fonts you need to grok mapping the fontfamily, default, boldface and italics. there is a utility to convert ttf (win32 fonts) the process seems scarey though. you can have a look for yourself here (look under march 7th entry).

    right i’m spent…sure i missed out other stuff..

    oh okay here’s what you might need to do if you wanted to write your own package…
    swag.sty:

    \ProvidesPackage{swag}[2003/01/12 bag-o-swag - a bunch of useful functions]

    % Bag O' Swag - A package of useful functions
    % Caretaker: mark sta-ana (nakedlinedancer@yahoo.com)
    % Release : v1.3143 (heh)

    %\strike{x} - strikes through tex
    %ripped from Stellenbosch LaTeX Users Group Forum - http://www.dsp.sun.ac.za/latex/
    \newlength{\strikewidth}
    \newlength{\strikelength}
    \setlength{\strikewidth}{1pt}

    \newcommand{\strike}[1]{%strikethrough
    \settowidth{\strikelength}{#1}%
    #1\hspace{-\strikelength}%
    \rule[0.5ex]{\strikelength}{\strikewidth}%
    }

    follow the instructions earlier for how to install a package. here's demo code to you the \strike function
    demo.tex:
    \documentclass{article}
    \usepackage{swag}

    \begin{document}
    \strike{ph33r}
    \end{document}

    Topics: Uncategorized |

    Comments

    Subscribe without commenting