7
votes
1answer
90 views

How can I set up my custom class to load a different class depending on the class option(s) passed?

I have written class files in the past. One of them is even up on CTAN. But that was ages ago, and I am rusty today. I am trying to roll a new class file for my University. I am being a little ...
10
votes
1answer
113 views

Pass conditional options to documentclass

I'd like to pass options to \documentclass basing on the compiler it runs, something in the lines \documentclass[if latex then use dvipdfm else nothing]{beamer} My motivation is that there're ...
0
votes
0answers
31 views

conditional usepackage given documentclass [duplicate]

Possible Duplicate: Which document class is being used? How would I conditionally usepackage{enumitem} if the document class is memoir (but not beamer)? Could I use the etoolbox ...
5
votes
2answers
635 views

If document class is equal to something then do not use package

I am trying to create a file which includes common packages and macros I use. It is something like this. commonDefinitions.tex \interdisplaylinepenalty=2500 \usepackage{algorithmic} ...
8
votes
1answer
482 views

How do I configure fonts and package options for different engines?

I would like to be able to rely on the code in my document class to respond correctly to whether it is being rendered using pdfLaTeX or XeTeX engines. The editor I'm using (LyX) does this using ...
0
votes
1answer
298 views

conditional commands in .sty file, conditional on \documentclass [duplicate]

Possible Duplicate: Which document class is being used? I'd like to include conditional formatting in a .sty file, conditional on the document class of the document that invokes it. For ...
0
votes
0answers
79 views

If-then in a document style for specific document classes [duplicate]

Possible Duplicate: Which documentclass is being used? I want to make a style that would include some specific instructions if the document is using the memoir class, but I don't want those ...
15
votes
3answers
424 views

What's the use of the @compatibility condition?

All of the standard LaTeX document classes (article, book and report) declare some basic functionality and parameters based on the condition @compatibility. Here's an extract from from article.cls ...
1
vote
1answer
828 views

How to configure fancyhdr depending on the document class [duplicate]

Possible Duplicate: How to configure theorems depending on the document class? I would like to have if the book class is loaded but if the article class is loaded. Can I do this with some ...
4
votes
2answers
461 views

How to configure theorems depending on the document class?

I would like to have \newtheorem{teo}{Teorema}[chapter] if the book class is loaded but \newtheorem{teo}{Teorema}[section] if the article class is loaded. Can I do this with some sort of ...
13
votes
2answers
1k views

Doing something only when the draft option is on?

I would like to do some stuff that is only enabled when the draft option is given in \documentclass[draft]{article}. How would I go about doing this?
49
votes
6answers
2k views

Which document class is being used?

Is there a way to programmatically determine which document class is in effect? I'd like to be able to write conditional macros that behave differently depending on which document class is currently ...