[OS X TeX] Re: Some beginner questions

Ferguson, Don fergdc at uleth.ca
Mon May 10 06:16:56 CEST 2010


Greetings  "Ross Moore" <ross at ics.mq.edu.au>
On 07/05/2010 at 02:50 you wrote concerning
Re: [OS X TeX] Some beginner questions


Hello Ross,

RM>> Documentclass specification:
RM>> ===========================
RM>> I've changed the \documentclass line to
RM>> 
RM>> \documentclass[12pt,fleqn,leqno,draft]{amsbook}
RM>> 
RM>> and although there is no complaint about «amsbook» I'm just  
RM>> guessing that there is such a document class. Seems to be the case  
RM>> because in the .log file there was a warning about «draft» and  
RM>> «\includegraphics» having some sort of conflict. Eventually the  
RM>> draft will be deleted, and, at this time, I'm not using the
RM>>    \includegraphics
RM>> thing at this point.

RM> In that case you can dispense with the 'draft' option.
RM> With computers as fast as they are these days, you never really
RM> need it anymore anyway.

I did not put it in for "speed up" but because in the event that  '\hbox' (I think) is overfull or underfull, then when "draft" applies, TeX puts thick bars at the right margin to point out where the problem occurs. I think I'll stay with draft until I'm more competant with TeXShop.
 

RM> It was only ever a way to avoid doing some of the most time-consuming
RM> operations until the final run, to pull all the bits together.
RM> Nowadays it only saves a few seconds on huge jobs having 100s
RM> of pages.

Good to know. Thanks.


RM>> The Address lines:
RM>> =================
RM>> I wanted the author's address set up as three lines, so the source  
RM>> reads:
RM>> 
RM>> \address{first line\\
RM>>          second line\\
RM>>          email address}
RM>> 
RM>> But when typeset, everthing is in uppercase including «email  
RM>> address» and the address is presented on a single line. Why are the  
RM>> newlines ignored?

RM> \\ is not equivalent to "newline".
RM> It is just a macro name that can be linked to anything you want.

It's not!! Well ..... okay.  :-)


RM> In the "amsart" style, when addresses are placed at the end of
RM> the document, the AMS don't want to have the address over many lines.
RM> (This could result in extra pages in their publications.)
RM> So they make it do nothing, or perhaps a single space.

RM> To bypass this, you could try:

RM>>>> \address{first line\newline\indent
RM>>>>          second line\newline\indent
RM>>>>          email address}

It worked! Well, now the address is left-alligned instead of centered, but I'll work on that later.


RM>> Is it possible to specify a mix of uppercase and lowercase? Does  
RM>> \verbatim come in use here?

RM> This is a possible hack that seems to work:

RM>>>> \address{{\normalsize\rm first line\strut\newline\indent
RM>>>>          second line\strut\newline\indent
RM>>>>          email address}}

With or without the \strut it worked! However, the address lines are not centered, but maybe there were not intended to be.


RM> The purpose of the  \strut  is to force wider line-separation,
RM> since the AMS uses \footnotesize (or similar) at this point.
RM> Try it without the '\strut's to see the difference.

Yes, I could see a very slight change when '\strut' was removed. Prefer the spacing when '\strut' is present. Threw in a \begin{center} ... \end{center} but did not like the result. Anyway, your suggestion is now part of my (amsbook} template. Thanks for that! Looks much better to me. How did you ever come across the solution???


RM>> The Date line:
RM>> =============
RM>> Under the address, the date was specified, but it never appears on  
RM>> the title page. Does not matter whether I use
RM>> 
RM>> \date{\today}
RM>> 
RM>> or
RM>> 
RM>> \date{6 April 2010}
RM>> 
RM>> in either case, no date appears???

RM> Again, this is because the AMS do not put in the date
RM> with their printed publications.
RM> Each journal has a date of issue, which applies to
RM> all the articles; so there is no point in putting it
RM> on each one individually.

Very good! Made that change too.  :-) But, since I am using {amsbook} is that date convention reasonable? In the case of {amsart} I agree.

 
RM>> The guillemets guys
RM>> ===================
RM>> I like to use these « and » guys, but when the relevant codes
RM>> 
RM>> \guillemotleft   and   \guillemotright
RM>> 
RM>> were employed, the .log file complained about T1 encoding.  
RM>> Following Tobias Oetiker, I put
RM>> 
RM>> \usepackage{T1]{fontenc}
RM>> 
RM>> in the preamble. The « and » guys now appear. Is that the proper  
RM>> solution?

RM> Seems fine to me.

Yep, seems to be working fine.


RM>> Wide Bar Over
RM>> =============
RM>> If A and B represent points, then in geometry one often uses  
RM>> something akin to
RM>> 
RM>>    _A B_
RM>> 
RM>> except that the underline should be an overline (overbar).

RM> \overline{AB}

OH NO!!!! Not that easy! Yes, it works.


RM>> I wonder if I've missed something!?!?!?

RM> Have you examined any tables of available commands?

You can be sure that I have, and spent a lot of time searching, but have yet to find your suggestion in tables! Found it now! Thank you. 


RM>> Vector Drawings
RM>> ===============
RM>> I've been reading Oetiker's manual on LaTeX2e and somewhat  
RM>> overpowered by his discussion of "Producing Mathematical Graphics".  
RM>> I don't know Mac software yet. Is there not some vector drawing  
RM>> program that could be used on the iMac and the resulting drawings  
RM>> saved as EPS or PostScript or ....? If there is, I'd appreciate a  
RM>> hint. Need to be able to create simple, coloured drawings to  
RM>> augment my work.

<<snip>>
RM> Eventually you may end up using Xy-pic or Tikz .
RM> After that you'll probably not switch again.
RM> Both have rather large learning curves, but can produce
RM> wonderful outputs, in a fully programmable way.

Okay, I'll start looking for Xy-pic and Tikz. I assume they were part of the MacTeX download.


RM>> Trial.aux interference
RM>> ======================
RM>> I had a source file Trial.tex in which various simple constructs  
RM>> were being tried out. When I opened Trial.tex earlier today, it  
RM>> would not typeset. The complaint from the .log file referred to  
RM>> Trial.aux and complained that
RM>> 
RM>> \begin{document}
RM>> 
RM>> was missing. Well, in Trial.tex the line «\begin{document}» was  
RM>> evident! Finally I noticed the reference to Trial.aux! I also  
RM>> observed that when Trial.aux was opened, the controlling process  
RM>> was ConTeXt not LaTeX!!! So I deleted Trial.aux and then Trial.tex  
RM>> could be typeset. I've noticed the complaint
RM>> 
RM>>    "the line \begin{document} is missing"
RM>> 
RM>> before. Is this a symptom of some dumb beginner error? What's the  
RM>> error?

RM> This occurs either:

RM>    1. if you process with LaTeX  a document not written for LaTeX;

AaaH HaH! That was it! I had dumped an Ascii file into TeXShop with LaTeX in command.


RM>   2.  your coding tries to put something on the page
RM>       before \begin{document} has been encountered.

No! I did not make that move.  :-)


RM>    In LaTeX *all* actually content must come *after*
RM>    \begin{document} .

RM>    The part before this is called the "preamble".
RM>    It is used to *declare* information, such as what
RM>    extra packages to load, your own personal commands,
RM>    and Metadata -- such as author, title, address, etc.

Yes, I've picked that up, but thanks for the reminder.


RM>> Inserting Ascii text into TeXShop
RM>> =================================
<<snip>>
RM>> Now what? First I dragged the icon for «Mechanics.txt» into the  
RM>> TeXShop window. That did not work as a line
RM>> 
RM>> \input{«complicated & strange path to Mechanics.txt»}

RM>   You shouldn't need the braces.
 
RM>> appeared but no Ascii text.
RM>> 
RM>> Well eventually I clumsily copied the Ascii text into the TeXShop  
RM>> window, but surely there is a neat way to do this!!!

RM> What's clumsy about  Select All, then Copy and Paste?

Not bad at all, now that I understand why the \input guy will not work!  :-) See comment below.


RM>>  I tried using
RM>> 
RM>>    \input{«full path to the file Mechanics.txt»}

I'm not sure about the braces, but there was a collage of stuff that preceeded the filename and did not make any sense to me, at the time.

RM> If the path is accurate then it should have found the file for \input .
RM> But you don't need a full path. Just a relative one will do.
RM> Indeed just the basename, if it is in the same directory:
RM> so  \input Mechanics.txt
RM> ought to be sufficient.

Okay, and that is what I was NOT doing; i.e., I did NOT try the simple 
   \input Mechanics.txt
I remember reading somewhere of not using absolute paths, but rather using relative ones. This must be one of those cases.

RM> Try without the braces if it doesn't work with them.

Now I understand what went wrong! I just experimented a moment ago using the form you suggested. It did not work because: 

The Ascii file in question had been prepared without any thought of being used in TeXShop. Consequently, it was full of errors when regarded as a .tex file. So TeXShop refused to place the text into the .tex file and complained via the .log file about the first error it encountered. Okay, that is fair enough!

So, unless one wants to go via the \verbatim route, then my bumbling was not so bad after all. As you objected, load the Ascii guy into TextEdit, highlight all the text, and then dump it into the TeXShop window via the clipboard. Well .... it seems simple now. 


RM>> but that was no better.
RM>> 
RM>> Should I have started off with a PDF or PostScript version of  
RM>> «Mechanics.pgs»?

Answering own question: No, that's not needed! But after reading another reply .... I'm not so sure!


RM> That depends upon just what is in that file, and what you want to see.
RM> It it is the ASCII programming source, then you'll need a kind
RM> of verbatim environment. There are several packages that do this.
RM> e.g.  listings  and  verbatim  and  fancyverb .

Okay, I understand that now.

<<snip>>
RM>> Any enlightenment will be appreciated.

RM> Hope this helps,

Helps? HELPS? That was great! Cannot thank you enough. Much appreciated. Every day TeX becomes easier to use, and wow what a program.


Cheers  Don (Green Dragon)
-- 





More information about the macostex-archives mailing list