1,344 reputation
418
bio website
location
age
visits member for 2 years, 10 months
seen Nov 25 '12 at 12:02

Sep
17
awarded  Nice Question
Sep
17
comment Consume/absorb a token
@BrunoLeFloch I'm not sure what you mean. Suppose I remove A using Heiko's code and I want to insert it right back(as if I never removed it)... will your code do that? Obviously, I would just use ifnextchar for the same behavior but that isn't the point. The point about changing cat codes was simply so one could easily insert a special token like \!inserttoken{\} would insert a ` into the stream without throwing an error BUT ` would have the catcode that was used before the macro call.
Sep
17
comment Consume/absorb a token
Thanks. Could you also include the opposite, insert a single char using the current catcodes(But redefine them locally to get things to work) for completeness if it is not too difficult?
Sep
17
accepted Consume/absorb a token
Sep
16
asked Consume/absorb a token
Sep
14
comment How to center one node exactly between two others with TikZ?
The code was only hypothetical. Not meant to be working code(just enough to get the point across). Anyways, your method works. Thanks.
Sep
14
accepted How to center one node exactly between two others with TikZ?
Sep
14
asked How to center one node exactly between two others with TikZ?
Sep
14
comment ignoring chapter easily
and I was also able to plug in play into my project without having modify anything but insert the \includeonly macro! Just what I wanted!
Sep
14
comment ignoring chapter easily
That looks like it does the job! I really appreciate it. It makes it very easy to remove chapters if necessary.
Sep
14
comment ignoring chapter easily
If using \iffalse and \fi are complicated you can chose just to ignore all the chapter tokens. There is no real reason to use \iffalse and \fi if using macros. I used them because it is required, or some variant, when having to do it by hand.
Sep
14
comment ignoring chapter easily
There is a \fi macro trick, do you know about it?
Sep
14
comment ignoring chapter easily
Essentially all it boils down to is checking if a chapter number is in the included chapters list and if it isn't we surround everything in the the chapter with a \iffalse and \fi(exactly how one would do it manually). (one doesn't even need to do this... possibly just ignoring the chapter has the same effect).
Sep
14
revised ignoring chapter easily
added 583 characters in body
Sep
14
comment ignoring chapter easily
huh? It definitely is possible. Your macro must be logical enough to realize it is the last chapter! (the same type of logic must prevent a \fi from the first chapter. I'll ammend my questio with some pseudo code.
Sep
14
comment ignoring chapter easily
(Note that the behavior you have of your example is correct but instead of inserting the \iffalse and \fi's you delete them)
Sep
14
comment ignoring chapter easily
your example should look like \chapter[mc]{my chapter} .... \chapter[mc2]{my chapter 2} .... \chapter[mc3]{my chapter 3} at the bottom.
Sep
14
accepted ignoring chapter easily
Sep
14
comment ignoring chapter easily
I think this is on the right track but you misinterpreted my question slightly. I do not want to have to explicitly use \iffalse and \fi. I want it to be automatically inserted. What you have will work so I have marked it as correct but please try and fix it.
Sep
13
comment ignoring chapter easily
@jon um, one requires using external files and one doesn't... HUGE difference in my book... and that's what count's.