[OS X TeX] More basic questions

Maarten Sneep maarten.sneep at xs4all.nl
Sun Jan 30 23:49:15 CET 2005


On 30 jan 2005, at 21:24, cormullion wrote:

> 1 Is LATEX built on top of TEX to the extent that you can use both TEX 
> and LATEX instructions together? The documents I’ve read tend to 
> assume one or the other - I’ve not seen them mixed - at least, I 
> wouldn’t know whether I have or not.

Most of the time, the high-level LaTeX commands can produce what you 
need. Sometimes a little understanding of the TeX commands is helpful, 
but for most it takes a long time to hit the wall in LaTeX. That said, 
I occasionally use some TeX commands when writing somewhat more 
complicated LaTeX Macros. Most of the time, you're better of relying on 
macros others have written. I'd advise you to learn how to search on 
this web-site to find the LaTeX package to scratch your itch.

So, while TeXnically you can use the TeX commands, I'd say that most of 
the time you're better off with LaTeX (especially when it comes to 
error descriptions and such).

> 2 Is there any ‘installed’ documentation or reference material that is 
> ‘part of’ the installation? I’m happy to Google things but wonder 
> whether there’s something closer to home that’s part of the install.

I'm not sure if that is part of the TeX-fat.dmg file you've used. In 
i-Installer it is an optional part, because of the download size. You 
could try "texdoc grfguide" in the terminal. If you get a description 
of the graphics packages, I think you have at least some of the 
documentation. Since you're on dial-up, I guess you didn't install all 
the manuals.

> 3 How do I know which packages I have? I don’t know my way around 
> TEX-related directories too well at present.

To see if a particular package is installed, you can use the kpsewhich 
command-line tool. You can also use this to verify that a package you 
installed yourself can be found by LaTeX. Try 'kpsewhich graphics.sty' 
and you'll get the full path to the graphics package. If there is no 
response, the package is not installed, cannot be found, or you made a 
typo. Note that you have to give the full name (.sty for packages, .cls 
for document classes).

You could also use the Finder, start from /Library/teTeX (there should 
be a link at that location pointing to a normally invisible location 
where all of TeX lives).

All installed packages are contained within
     /usr/local/teTeX/share/texmf.tetex/tex/latex
     /usr/local/teTeX/share/texmf.local/tex/latex
     /usr/local/teTeX/share/texmf.gwtex/tex/latex
make a listing of the directorier and files within those, and you'll 
have some idea of what's available. On my system, about 257, plus the 
packages I installed myself.

> 4 All the commands that people use in their various examples appear to 
> exist in the same namespace. How can you tell which commands come from 
> which packages? Eg, if I see a command “\makebox”, how do I know what 
> package or system it’s part of?

Get a good book, start here: http://www.esm.psu.edu/mac-tex/refs.shtml

If you're really unsure: start with the plain article class, and if it 
works there, it is most likely part of the core LaTeX system. If it 
fails, it is part of some package, and adding them one by one will tell 
you exactly which one (loading order may be important).

> 5 I’ve noticed that in TeXShop it makes sense to put a line at the 
> beginning (eg %&program=xelatex). This doesn’t seem to be very 
> standard, since it rarely appears in the examples I see (which fail 
> for various reasons). Is it a documented standard?

Actually it is something to avoid, as it will conflict with other 
systems, and may even prevent typesetting from the command-line or 
within BBEdit. What is standard (and that is why this may fail) is if 
you put %&latex as the first line, the plain tex application will know 
it needs to load the latex macros before proceeding. The same works for 
other formats (or rather: used to work, as tex is linked to, well, tex, 
whereas the other formats are using pdfetex, which will break this nice 
scheme (to some extend).

My advice, do not rely on any %& lines, but write a normal comment as 
to which format to use, just to remind yourself if you come back to a 
project a few years from now.

> 6 How easy is it to change - say - the book class in Latex so that:
>     - the title matter is left-justified rather than centred
   Not so easy, I usually design my title-pages separately, but I think 
there are packages out there
   that do this with ease. Others here may have better ideas on that.

>     - all fonts are - say - Times Roman and Helvetica
   Easy: add
     \usepackage{mathptmx}
     \usepackage[scaled=.90]{helvet}
     \usepackage{courier}
   to the preamble of your document, and your fonts are changed to 
times, helvetica and courier.
   For good measure, add
     \usepackage[T1]{fontenc}
     \usepackage{textcomp}
   as well.
>     - all headings are Helvetica
   Easy, if the titlesec and titletoc packages works as advertised.
>     - section and subsection headings are _not_ numbered, but chapters 
> are?
   Very easy, but it depends on the exact documentclass you use. For the 
standard book class:
     add \setcounter{secnumdepth}{0} to the preamble (higher numbers 
will continue the numbering to deeper levels)
related: \setcounter{tocdepth}{1} will limit the table of contents to 
chapters and sections.

> Making some or all of these changes would allow me to produce 
> documents in TEX that conform well to the existing standards I follow.

I would suggest you get comfortable with putting content in LaTeX 
first, and worry about the layout later. LaTeX is powerful enough to be 
able to produce most design specifications you care to throw at it, 
although sometimes in a different document class (as opposed to a 
standard documentclass, enhanced with many packages).

While writing, please suppress the urge to use \textit{} directly in 
your text, but label a phrase as what it is or needs: \emph{} is for 
emphasis, but you can make your own: 
\newcommand*{\Trademark}[1]{\textsf{#1\texttrademark}} defines a 
command \Trademark{}, that sets all the text you define as a trademark 
in a sans-serif font, with an added ™. You you want it in bold sans 
serif later on, this is easy.

If you describe the type of documents you produce, we might be able to 
suggest further packages for your writing pleasure.

Maarten
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list