Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Any LaTeX experts around?

Any LaTeX experts around?
Thread Tools
biscuit
Mac Enthusiast
Join Date: Jul 2002
Location: London, UK
Status: Offline
Reply With Quote
Feb 16, 2005, 08:49 AM
 
Hi all,

I'm looking at converting my PhD thesis into LaTeX because I'm fed up of figures moving about in Word. I've managed to get most things working the way I want, but there are a few bits I'm stuck with so I thought I'd call on MacNN's collective expertise for help. Here are the bits I'd like to be able to do:

� I've got BibTeX installed to do references, but it insists on the reference list being called "Bibliography"; I need it to be called "References". Is this set in the document class file? Also, it doesn't include this in the table of contents.
� The reference list also needs to be in alphabetical order. I'm using the natbib package for author-date style references, but the "order-in-which-they-appear" style is confusing in this case.
� Is there a way to have all instances of a word formatted a certain way? I'm thinking of species names (E. coli being E. coli) and some sub/superscripts (always having the cam in P450cam subscript).
� Can I force pagination to start on the very first page? This is a requirement of my Uni, but I'd probably get away without doing it.
�In relation to the above, my ToC should really include entries for Abstract, List of Figures and so on.
�Last of all, I don't suppose there's a way for LaTeX to keep track of abbreviations in the way it keeps track of figures and tables? I have to have an abbreviations list at the start too.

Of course, all this is just a way to avoid actually writing the damn thing. But it really would be handy to be able to edit it without then having to adjust figures all the time.

Many thanks,

biscuit
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Feb 16, 2005, 09:05 AM
 
I can't think of any way to do these four things without some fairly serious work, but none of them are insurmountable either. To be honest, I'd suggest bring make into the mix.

To deal with your first two points: "References" versus "Bibliography" and the word order, you're probably going to need to make your own bibliography style. This said, modifying the natbib style you're currently using for this shouldn't be too difficult; I'd think that these would be fairly simple to change. Unfortunately, I don't know how to do it.

To deal with the species names and such, you will need to mark them up in LaTeX by defining commands (perhaps something like \species for species names) which put the text into italics and then using these commands on every species name. If you don't want to search through your whole document and do this manually, but you know the names of all the species involved, you could do this with find/replace in most text editors.

Alternatively, if you bundle everything into make, you could use a sed script to do a bunch of global find/replaces on your original LaTeX source into an intermediate file, and then actually use LaTeX on the intermediate file rather than your own. The process would be not unlike compiling software. However, this would require knowledge of sed (which isn't hard to pick up) and make (which is hard to pick up). It would also require the Developer Tools to be installed on your machine. This sort of approach is highly geeky but ridiculously powerful.

As for the abbreviations list: this is theoretically possible inside LaTeX, but I'm afraid I don't have a clue where to begin (perhaps in the macro source for the table of contents, but I don't know where that is either). The ifthen package (which provides some programming constructs) might be a place to start, though. In any case, this would probably require that you mark up abbreviations; have you done this? If not, then if you have your own list of abbreviations you could do something similar to what I suggested for the species names.

There may be better solutions then what I've discussed here. I'm not exactly a LaTeX wizard, though I've been working on mastering it.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
biscuit  (op)
Mac Enthusiast
Join Date: Jul 2002
Location: London, UK
Status: Offline
Reply With Quote
Feb 16, 2005, 09:26 AM
 
Many thanks for the reply Millenium. I think learning make and sed is more work than I'm willing to take on. The bits I like about LaTeX are the 'for free' stuff, like numbering sections and figures, and generating the ToC and List of figures automagically. Not to mention putting figures in sensible places. As I mentioned in my original post, time spent doing this is time away from actually writing my thesis; the whole thing is really an indulgence on my part.

I haven't marked abbreviations at all. It would probably be easier to make a table myself. I think the same goes for the other formatting. I'm going to have to go through the whole thing with a fine-tooth comb anyway so it can just form part of that sweep. Unless there's a way to define a command that will enter specific text in a specific way, a bit like \latex and \tex do. Then I could have \p450cam give me the right thing...

I did try altering one of the bibliography styles to get et al. in italics (why isn't it in italics anyway!?!?). However, BiBTeX complained that it couldn't find the style. I had it in the same folder as the other natbib styles, is that right?

As I said, this is all a bit of an indulgence. I should just get on and with writing and wrestle with Word when the time comes.

Thanks again for your help Millenium

biscuit
     
LowLander
Fresh-Faced Recruit
Join Date: Apr 2003
Location: The Netherlands
Status: Offline
Reply With Quote
Feb 16, 2005, 09:40 AM
 
Point 5 can be done with:

\addcontentsline{toc}{sec_name}{entry text}

where sec_name is chapter, section or subsection. This determines how it is formated in the table of contents.

e.g. Put this after the \listoffigures command

\addcontentsline{toc}{chapter}{List of figures}

For point 6 you could use the glossary I guess, but you have to mark these items in the text.
     
philm
Mac Elite
Join Date: May 2001
Location: Manchester, UK
Status: Offline
Reply With Quote
Feb 16, 2005, 10:15 AM
 
Originally posted by biscuit:
I'm looking at converting my PhD thesis into LaTeX because I'm fed up of figures moving about in Word.
I always have my images in Word in the 'In line with text' wrap style which means they do not move around and their positioning is managed as if they are text - centre justified etc. Otherwise, Word does what you want: numbering, TOC etc. Maybe give Word another try.
     
JKT
Professional Poster
Join Date: Jan 2002
Location: London, UK
Status: Offline
Reply With Quote
Feb 16, 2005, 10:29 AM
 
For scientific writing, and your third point, I would highly recommend getting TypeIt4Me. It's a system-wide text auto-insertion tool. For example, for your E. coli needs you could define e.g the abbreviation "ec" when inputted to auto-expand to < i >E. coli< /i > for you (sorry, I don't know LaTeX, so I'm using html coding instead as the example). Believe me, it is a huge time saver for words that are easy to mis-type and/or are overly long or complex. When I was writing my thesis, I used it to define things like phosn for phosphorylation, and for the TLAs for the various protein and gene names I had to type throughout (so e2 was for eIF2, e3 for eIF3, blah, blah, blah). The biggest mistake of my life so far was to use Word to write my thesis so I applaud your abandoning it.

Search for it at Verisontracker or MacUpdate.
     
biscuit  (op)
Mac Enthusiast
Join Date: Jul 2002
Location: London, UK
Status: Offline
Reply With Quote
Feb 16, 2005, 11:12 AM
 
Thanks for the replies to all. Just to keep you updated, I changed the name of the Bibliography with:

\renewcommand\bibitem{References}

I also got my bibtex style to work by putting it in the same folder as the tex file itself, so now my et al's are in italics.

LowLander, thanks for the tip. I've done that now, but LaTeX doesn't put these entries in the right order or append the correct page number.

philm: I have used Word's wrapping features before, but it never behaves how I expect. I think it's because I put my figures in text boxes in order to keep the captions with them. Is that a bad practice? As for generating ToCs and section numbering, I had a sneaking suspicion Word could do it, but I've never come across it. Is it linked up with "Master Documents" as I suspect? I've been meaning to give that a try; at the moment all my chapters are in separate files.

JKT: Now that sounds very interesting, thanks. I remember a similar utility from OS 9, but hadn't realised there was an X version. I'll give it a whirl.

Many thanks once again. I'm going to try proof read the whole thing this afternoon to counter-balance morning (& early afternoon) of tinkering...

biscuit
     
Richard Edgar
Dedicated MacNNer
Join Date: Sep 2002
Status: Offline
Reply With Quote
Feb 16, 2005, 12:16 PM
 
First off, if your university is particularly picky about certain things (like anyone's ever going to read it....), then they may well provide a suitable style file.

For scientific writing, and your third point, I would highly recommend getting TypeIt4Me. It's a system-wide text auto-insertion tool. For example, for your E. coli needs you could define e.g the abbreviation "ec" when inputted to auto-expand to < i >E. coli< /i > for you
I would strongly recommend that you don't do this, but use the \newcommand capability of LaTeX itself. That way, if you decide to change how such things are formatted, you don't have to search through the entire document (which will probably be split over several files). Page numbers can be adjusted with \setcounter{page}{number}.

I would suggest using make to simplify the build process. It doesn't nee d to be anything fancy - just enough to run latex, bibtex and latex again. I did do something slightly fancy, putting each chapter in its own directory, with a customised makefile and PERL script, so that each chapter could be built separately too, which made for quicker drafting.

As for natbib... I thought it always sorted by author and then year in the bibliography list. For the title, the documentation (always worth reading) mentions the \bibsection command.
     
LowLander
Fresh-Faced Recruit
Join Date: Apr 2003
Location: The Netherlands
Status: Offline
Reply With Quote
Feb 16, 2005, 12:25 PM
 
Then try to put the

\addcontentsline{toc}{chapter}{List of figures}

just before the

\listoffigures

That should give the right page number. If it still does not work, have a look at http://www.texnik.de/tocloft/TOC.phtml
     
philm
Mac Elite
Join Date: May 2001
Location: Manchester, UK
Status: Offline
Reply With Quote
Feb 16, 2005, 12:37 PM
 
Originally posted by biscuit:


philm: I have used Word's wrapping features before, but it never behaves how I expect. I think it's because I put my figures in text boxes in order to keep the captions with them. Is that a bad practice? As for generating ToCs and section numbering, I had a sneaking suspicion Word could do it, but I've never come across it. Is it linked up with "Master Documents" as I suspect? I've been meaning to give that a try; at the moment all my chapters are in separate files.

Captioning is easy in Word and it looks after the correct numbering of your images. Select the picture and go Insert...Caption...

You can also use Autotext for common terms which you want to abbreviate to make typing quicker.

For table of contents, you really need to spend a little time defining Heading styles to reflect the way you want these to appear in your thesis. The ToC looks for Headings throughout the text and presents these as one list at the start of the document (or wherever). A little time at this stage for your thesis styles will reap rewards later. I have all my headings assigned to keyboard short-cuts. cmd-opt 1 turns the text into Heading 1 style, cmd-opt 2 for Heading 2 etc. Makes documents very easy to format nicely and quickly. All the numbering is automatically done if you assign 'Numbering' to your heading styles.

If you have chapters in separate files, you will need to set up a Master document. I haven't done this since my PhD thesis in 1994 - written on a IIsi and printed from a SE/30.

I don't see myself as a Word advocate particularly, and it is rather unfashionable, but there are lots of things which can be done very well in Word.
     
biscuit  (op)
Mac Enthusiast
Join Date: Jul 2002
Location: London, UK
Status: Offline
Reply With Quote
Feb 16, 2005, 03:54 PM
 
Thanks once again for the good advice. Richard, thanks for the tip on \newcommand. I have been reading the documentation and various online guides, but I'm really rushing things a lot. That and the \bibsection command passed me by.

I'll give that a try LowLander, thanks. But I'm beginning to think philm is right. I think I've dismissed Word's features due to years of small frustrations and a semi-secret MS aversion. I've been using Word for years and years, but I have never got to grips with the way it does headings and so on. I suppose that's just laziness. However, a good chunk of my thesis is already written in Word, so it is probably worth investigating the advanced features. Strange that I didn't mind learning a bit of LaTeX though, I must be even more subconsciously anti-MS than I thought

I'll keep the LaTeX version going as a bit of a side-project, because the output is still nicer than Word...

biscuit
     
Amorya
Mac Elite
Join Date: Mar 2001
Location: England
Status: Offline
Reply With Quote
Feb 16, 2005, 09:53 PM
 
Originally posted by Richard Edgar:
First off, if your university is particularly picky about certain things (like anyone's ever going to read it....), then they may well provide a suitable style file.
Even if you don't, you may be able to find one on the net. The psychology one has alphabetical references (and with the title 'References'), for example. Try one specific to your subject area.


Amorya
What the nerd community most often fail to realize is that all features aren't equal. A well implemented and well integrated feature in a convenient interface is worth way more than the same feature implemented crappy, or accessed through a annoying interface.
     
Richard Edgar
Dedicated MacNNer
Join Date: Sep 2002
Status: Offline
Reply With Quote
Feb 17, 2005, 04:36 AM
 
The things I really like about LaTeX are:
a) The quality of the output
b) The portability
c) The fact that my thesis including all diagrams zips down to about 700k

I would also add that, the last time I tried Word (about five years ago now), I couldn't get it to keep its cross-references accurate either. Learning LaTeX was very worthwhile.
     
biscuit  (op)
Mac Enthusiast
Join Date: Jul 2002
Location: London, UK
Status: Offline
Reply With Quote
Feb 17, 2005, 06:15 AM
 
My Uni doesn't supply a LaTeX style, not even in the CS dept. as far as I can tell. I don't think they're really that fussy about the rules, but it's better to be on the right side of them. I've got just about everything working how it should now though.

I've had another look at Word and sure enough it can do most of the things I need. It still makes things a bit tricky IMO and I haven't got it to look quite right yet. But then, in the spirit of TeX, I should worry about the look later and get on with writing. What I haven't found yet is a way to link in-text references to figures or tables to their captions. LaTeX is very good for that.

Oh, and Richard, you were right about natbib, it was already putting the reference list in alphabetical order by author. I was rushing through things and jumped to the wrong conclusion.

I still think it's worth my while to learn LaTeX, I just wish I'd taken the plunge months ago. That way there'd be no conversion hassles.

biscuit
     
philm
Mac Elite
Join Date: May 2001
Location: Manchester, UK
Status: Offline
Reply With Quote
Feb 17, 2005, 06:53 AM
 
Originally posted by biscuit:
What I haven't found yet is a way to link in-text references to figures or tables to their captions.
You mean like:

"The results from this experiement can be seen in Table 12".

If you have your table captioned using Insert...Caption..., you write:

"The results from this experiment can be een in "

then, Insert...Cross Reference..., select Table and 'Only label and number' and indicate the table your want to refer to. If you insert an earlier table later on, all the numbering will sort itself out.
     
biscuit  (op)
Mac Enthusiast
Join Date: Jul 2002
Location: London, UK
Status: Offline
Reply With Quote
Feb 17, 2005, 07:32 AM
 
Thanks for that philm, that's just what I was after. I really should have explored Word a bit more...

Maybe I need one of those "Word for Dummies" books.

biscuit
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 05:10 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,