Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to write my 'Matura work' for school in LaTeX. Therefore I am using MacTeX and TeXShop and normally it works fine.

But I am really annoyed with running all these different engines like LaTeX, BibTeX, makeindex, pdftex by hand. I don't really understand this stuff and at the moment I don't have enough time to learn.

Is it possible to do all this stuff with just one click?

How can I do this?

ps. for my glossaries I use this:

#!/bin/sh

bfname=$(dirname "$1")/"`basename "$1" .tex`"

makeindex -s "$bfname".ist -t "$bfname".alg -o "$bfname".acr "$bfname".acn
makeindex -s "$bfname".ist -o "$bfname".gls -t "$bfname".glg "$bfname".glo
share|improve this question
4  
Yes it is possible! TeXShop should come with that Perl latexmk script. You can alway write your own Makefile but realistically speaking you have to know something about TeX work flow to use TeX. –  Predrag Punosevac Jan 16 '12 at 15:56
2  
Possible duplicate: Tools for automating document compilation. –  qubyte Jan 16 '12 at 15:58
3  
latexmk is what I'd go with -- it's in TeXShop's disabled engines folder by default, but easily enabled. Some more information here, you should be able to check TeXShop's documentation on how to enable other engines (no immediate access to MacTeX for me right now). –  Mike Renfro Jan 16 '12 at 17:34
9  
@RobinVa Answering your own question is fine (and indeed encouraged). So that other people find the site easy to navigate, and so good answers can be voted for, waiting a little while then posting an answer is better than editing questions to include the answer. It would be really good if you come back after a few hours and post an answer. –  Joseph Wright Jan 16 '12 at 18:00
5  
You can be really annoyed that you have to run all these different engines but it's not going to help you. Learning how to use some software usually takes time and it usually doesn't always work the way you want it, unless you can afford paying somebody to implement the software for you. As suggested by Mike Renfro, you may want to try latexmk. It's the second next thing to LaTeX by autopilot. –  Marc van Dongen Jan 16 '12 at 18:59
show 4 more comments

1 Answer 1

up vote 7 down vote accepted

(Robin's answer moved from the question area)

Here a short abstract of "Latexmk For TeXShop.pdf" by Herbert Schulz (herbs2@mac.com). Reading this and following the explained steps solved my problem. I don't own the right of this text! If you own the rights of this text and aren't ok with the citation contact me, so i can delete it. thx.

1 What is latexmk?

Compiling a tex file containing cross-references, bibliographic references and/or indexes is a multi-pass process; i.e., you’ve got to run (pdf/xe)latex multiple times with possible inter- mediate runs of bibtex and/or makeindex until all references are resolved. The latexmk perl program, rewritten and presently maintained by John Collins1, automates this multi-pass process. By default it first runs (pdf/xe)latex on a source file, determines file dependencies by exam- ining the log and aux files produced by the run and then automatically runs bibtex2 and/or makeindex, if needed, and the correct number of additional runs of (pdf/xe)latex to generate the bibliography, index and cross-references. Recent versions of latexmk also work correctly with the nomencl package as well as the glossary and glossaries packages and other packages that produce multiple bibliographies or indexes.

2 Quick Start!

This section will get you started quickly. Unless you are trying to customize the behavior of the supplied engines or want to use the more esoteric engines this really is all you need!

2.1 Quick Install.

To activate the latexmk engine files simply move all the files with extension .engine from ~/ Library/TeXShop/Engines/Inactive/Latexmk/ two folder levels up, to ~/Library/TeXShop/ Engines/, and (re-)start TEXShop. (Note: ~/Library/ is the Library folder in your HOME folder.) When you click on the popup engine menu on the Source toolbar the newly enables engines names should appear; see Figure (1) to see how that menu changes. Note: the engine names will not appear in the Typeset Menu.

2.2 Quick Use.

At the top of your Source file place the line

% !TEX TS-program = pdflatexmk

to use the pdflatexmk engine which will use pdflatex to typeset your document. Substitute latexmk or xelatexmk for pdflatexmk to use latex or xelatex to typeset your Source. From then simply using Typeset→Typeset (Cmd-T) will run through the complete process of fully typesetting your document.

share|improve this answer
    
I forgot to do it by myself. Thy a lot. –  Robin de Bois Jan 24 '12 at 9:34
    
Just to let everyone know, I have no problem with the quote from my documentation given above. Good Luck, Herb Schulz –  Herb Schulz May 13 '13 at 11:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.