Linked Questions

1
vote
0answers
6k views

What does \fi means? [duplicate]

I want to know the meaning of \fi in LaTeX. I don't understand the use. And don't find an easy definition online.
4
votes
2answers
265 views

Is it possible to make \usepackage depend on paper size? [duplicate]

I currently have a document (.tex source files), where I define the paper size and one sided design as class options. I use the KOMA-Script class scrbook. in A4 format for printing on usual printers ...
4
votes
0answers
197 views

Where‎ ‎do‎ I start ‎learning‎ conditional tests ‎in ‎LaTeX‎?‎ [duplicate]

Possible Duplicate: LaTeX conditional expression I've already taken a look at ‎books‎ such as "‎Te‎X for the Impatient", but its examples aren't clear enough to me. What‎ book/tutorial ‎do‎ you ...
99
votes
4answers
38k views

Why is the ifthen package obsolete?

In the LaTeX companion, the authors recommend to use the package ifthen for complex conditional. But in his answer to LaTeX conditional expression Will Robertson doesn't mention it, and in the ...
61
votes
6answers
25k views

If Then Else for odd page/even page

How to use if-then-else structure in LaTeX? I need an example of odd and even page. if odd then command 1 else command 2
60
votes
4answers
21k views

How to form “if … or … then” conditionals in TeX?

I feel really stupid for asking this, but how do you form more complex if conditionals in TeX? I'm looking for something like: \ifnum\x=1 OR \ifnum\x=14 {do this} \else {do that} \fi I don't ...
31
votes
6answers
9k views

Test whether token list is empty

Is it possible to test whether a token list register is empty without expanding it?
23
votes
5answers
11k views

Are there any “if” commands like “\ifnum” in LaTeX?

Are there any commands containing "if", similar to \ifnum, preferably in LaTeX (rathar than TeX)? For example, is there anything like \ifstring? (I am not after \ifstring only, I want to know which ...
20
votes
6answers
4k views

Split a string and apply an operation to each segment (or “word”)

I'm currently writing a tutorial for some software, and I'd like to refer to the shortcuts used in this program. These shortcuts should be notable, i.e. displayed in a different color or font style. ...
19
votes
1answer
89k views

LaTeX \if condition

I am using \if condition in a custom command in my LaTeX document. I would like to know where I can find some good explanation about \if command. I followed a Wikibooks \if page but it's just an ...
19
votes
4answers
4k views

Producing different versions of a document

I am writing a documentation for a software environment which will be composed of several subfile put together using the \include command. The thing is, I would like to be able to output different ...
21
votes
2answers
4k views

How do I conditionally execute something based on a documentclass option?

I'd like to conditionally do some things (like input a file) depending on if a specific class option was passed. For example, I'd like to have an "instructor" option to the class that would input a ...
10
votes
2answers
4k views

Drawing Lattice/Trellis Graphs using PGF/TikZ

I am trying to draw a graph containing lattice points and vectors. I wish it to look something like this: I am not sure how to go about it, however, I would ideally like to be able to use PGF/TikZ. ...
11
votes
5answers
252 views

Best way to have two kinds of formattings for my documents?

I would like to produce two kinds of formattings for my documents. The 1st formatting will use colors. This is typically for reading on a screen. The 2nd formatting will use gray colors for printing. ...
8
votes
2answers
3k views

\if@ statement explanation

I'm trying to tweak some .cls to fit my needs, and I'd really appreciate it if someone could explain me these statements: \if@radseminar% ... \else ... \fi If I understand correctly, it will match @...

15 30 50 per page