43 questions linked to/from LaTeX conditional expression
8k 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.
280 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 ...
201 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 ...
39k 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 ...
26k 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
23k 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 ...
9k views

### Test whether token list is empty

Is it possible to test whether a token list register is empty without expanding it?
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 ...
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. ...
99k 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 ...
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 ...
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 ...
5k 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. ...