## LaTeX forum ⇒ Text Formatting ⇒ Conditional Formatting using ifthen Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Posts: 4
Joined: Sat Oct 06, 2012 5:05 am

### Conditional Formatting using ifthen

I am attempting to create a master document for creating multiple choice mathematics assessments. I want to be able to create two versions, the student version, and the teacher version. The student version should format all choices the same. The teacher version should indicate the correct answer choice by bold-facing the correct choice. I have seen this done, but it has been many years. I have attempted the following;


Where I have inserted --??--, I cannot determine what to put. I want this to change by commenting out some signal line to produce one of the versions, while not commenting out the signal line produces the other.

I would be appreciative of any assistance.
Last edited by cgnieder on Fri Dec 27, 2013 1:26 pm, edited 1 time in total.

Tags:

Posts: 4
Joined: Sat Oct 06, 2012 5:05 am
I solved it. It is really quite simple. I used the following code;


to set the correct choice to red if the boolean is set to true, and to print normally if the boolean is set to false.
Last edited by cgnieder on Fri Dec 27, 2013 1:27 pm, edited 1 time in total.