0
votes
0answers
31 views

A&A template returns error \renewcommand{\Newassociation}

I got the template to make scientific papers from the Astronomy&Astrophysics official website. Since I can not compile my own document, due to an error, I tried to compile the demo that is within ...
10
votes
2answers
138 views

Conditionally use package and define command

I'm creating a class which should define a command if some package is available: \IfFileExists{eforms.sty}{ \usepackage[xetex]{eforms} \everyTextField{\textFont{GaramondNo8}\textSize{12}} ...
4
votes
1answer
425 views

Use of the comment package

In a .tex document, I'm using the comment package to produce two different versions (let's say : versionA and versionB) of the document. Each version contains different parts (it could be paragraphs, ...
8
votes
1answer
124 views

How to warn if a package hasn't been loaded

Is it possible to emit a warning if a package hasn't been loaded? If possible, I would prefer that the solution not require \usepackage{ifthen} as it couldn't emit the warning that it was missing the ...
8
votes
1answer
365 views

How to create conditionals in a document class for latex?

I am trying to write a document class highschool.cls for the high school research papers in our school based on the book.cls in order to make the format of the papers standardized. I am trying to ...
9
votes
1answer
375 views

Require a certain (or later) version of a package?

Is there a way to enforce that a certain version, or a later version, of a package is loaded when building the document? I've found that compiling a document on another platform, where the package ...
5
votes
2answers
634 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} ...
10
votes
3answers
738 views

How to implement a command that checks for loaded packages?

I use the following code to check if a package is loaded: \RequirePackage{ltxcmds} \newcommand{\IfPackageLoaded}[2]{\ltx@ifpackageloaded{#1}{#2}{}} However, sometimes I want to check if more than ...
0
votes
0answers
81 views

How to check for document class in conditionals [duplicate]

Possible Duplicate: Which documentclass is being used? I know how to use conditionals in LaTeX, but I need to check what documentclass is being used. I need to not include a package when ...
0
votes
0answers
74 views

Is there a way to optionally import a package? [duplicate]

Possible Duplicate: Conditional “if a package is available” I'm pretty lazy, and have my own .sty files which import a bunch of commonly used features. But, sometime system ...
14
votes
2answers
751 views

Conditional “if a package is available”

I'd like to do something like the following (in pseudo-TeX) \ifpackageavailable{packagefoo} \usefoo \else \usefooreplacement \fi For example, I know that a template file I wrote is used by people ...
11
votes
1answer
425 views

Loading a package conditionally

Is it possible to load some package from a .sty file only if some option is selected? (Naive approach \DeclareOption{something}{\RequirePackage{something}} doesn't work.)