# Tag Info

12

Your \newif command is inside a \iffalse so it is not seen, and \ifitsme is now either not an "if" at all, or if the \newif has been executed earlier, the \ifitsme behind the \newif counts too and you have one "if" too much: This works: \documentclass{article} \begin{document} \newif\ifitsme \iffalse \ifitsme hello \fi \fi \end{document} This fails \...

12

As you correctly say, when you do pdflatex test.dtx, the file is read with % a comment character. When TeX finds \DocInput, it will basically ignore % at the start of lines and make ^^A a comment character. So your input is essentially % \iffalse meta-comment ^^A This /iffalse \documentclass{ltxdoc} \def\showfi{\immediate\write0{{/fi\ on line \the\...

2

I don't believe doc can be so customized without producing your own version that looked for other characters. For example, the \xmacro@code macro in doc is defined to look explicitly for % \end{macrocode}. \catcode\!=\catcode\% ^^A In this section there must not be ^^A any exclamation marks. ...

2

That comma is inserted automatically by makeindex, so you can't (in an elegant way) put an \efill (which, for the record, is \hfill\nopagebreak) after the comma in the TeX side of the thing. I'll give you a few possible solutions, depending on exactly how you want to achieve that. If you want that in all entries (correct way): You have to create a custom ...

1

Combining the answer of Phelype Oleinik and that of David Carlisle and their helpful comments I was able to do the following. The first block sets the preamble universally. \obeyspaces \def\metadata{% ======================================================================\newline \jobname (Version \fileversion - \filedate) \...

1

I don't know if this answer will be useful for because they deviate from the path you chose. But, if I understood your question correctly, I think this is easier than replacing text inside a macro. This is how I set things up in a class I wrote. First some preliminaries. Nothing interesting here: \catcode`\@=11% \def\projectname{test}% \input docstrip.tex \...

Only top voted, non community-wiki answers of a minimum length are eligible