| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 1 year, 6 months |
| seen | Nov 25 '12 at 12:02 | |
| stats | profile views | 92 |
|
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. |
|
Sep 13 |
comment |
ignoring chapter easily @Werner: I do not care about that but about speeding up compile time... |
|
Sep 13 |
comment |
ignoring chapter easily Why does everyone try to rewrite my question into asking about something else instead of just giving me a solution? As I said, I'm not interested in using \include and it's my business as to why I do not want to use external files... and that should be good enough! |
|
Sep 13 |
asked | ignoring chapter easily |
|
Sep 11 |
comment |
Allow macro to end without new line The first one updated one does print(to pdf though) the EOL's. The second one does not show any EOL's characters. In any case, how would one get it to work with lua? I need the exact same behavior of the working case using TeX's def. The whole point of the macro is to pass the argument to lua "unharmed". I've tried modifying your macro's to do this but they all fail in some way. |
|
Sep 11 |
comment |
Allow macro to end without new line The issue with xparse's verbatim is that it doesn't seem to keep EOL's. The result is "thisisatest" which is unacceptable. I did modify it to change the catcodes and endlinechar similar to the original but it throws an error. I imagine xparse's "+v" processes the argument before you get a chance to modify the catcodes and such and there is no easy way to get it to work well. |
|
Sep 11 |
accepted | Allow macro to end without new line |
|
Sep 11 |
asked | Allow macro to end without new line |
|
Sep 11 |
accepted | Unmodified Source Code |
|
Sep 10 |
revised |
Unmodified Source Code deleted 48 characters in body |
|
Sep 10 |
answered | Unmodified Source Code |