Hi there!
I have a document in LaTeX. It's a product userguide. Now I need to make another document for a branded version of the same product.
I.e. now guide name is "Big Apple: user guide" and new document will be "Big Orange: user guide". The Content of the document is the same, exept figures and product names. But it must be the same .tex file with some kind of triggers or macros or something else.
So I want to get an opportunity to configure document building.
For example: if I want to build "big apple guide" I use one variant of building (switch a key or smth.). If I want to build "big orange guide" I just set a special "orange" trigger, which changes product names and figures.
Any ideas how this can be done in LaTex?
General ⇒ Build two different versions of one document
-
- Posts: 4
- Joined: Mon Mar 28, 2016 1:57 pm
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Build two different versions of one document
You could use package etoolbox and define a new boolean flag, or a toggle. Test the boolean and define macros.
Code: Select all
Code, edit and compile here:
\ifbool{general}{%do general stuff\renewcommand{\productname}{big orange}}{%else, do special stuff\renewcommand{\productname}{big apple}}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.