Reputation
21,581
Next tag badge:
86/100 score
20/20 answers
Badges
39 79
Newest
 Nice Answer
Impact
~353k people reached

21h
comment Highlighting items in a list
texdoc source2e will open the pdf file containing the source code of the latex format. @for source code is found in my copy on page 51, corresponding to File f: ltcntrl.dtx Date: 2014/04/21 Version v1.0h. There is also \@tfor.
1d
revised How to write a code to find the Pythagorean Triples
made a note that current xintgcd has a dependency on xint
1d
answered Automatically removing, after compilation, parts of text enclosed in certain strings
1d
revised combine and etoc
two words added
1d
revised combine and etoc
added fix for etoc+combine+book class compatibility
2d
revised combine and etoc
added 187 characters in body
2d
answered combine and etoc
2d
revised How to get the name of first and last section of a chapter?
added handling of empty chapters and use of etoc 1.08 \etociffirst conditional
2d
comment What's the best practice way to test whether parameter is empty?
@unbonpetit Thanks. I had in my files another approach which could distinguish #1= nothing or some space tokens from the other cases, and then in the former case one could do \if\relax #1\relax. After seeing the question and Ulrich's answer with its very impressive (non e-TeX) universal solution I decided to make an effort into revamping my earlier method and find a better way to separate in one go empty #1 from the other cases.
2d
comment Insert Table of Contents in chapter
The non-starred \localtableofcontents obey memoir's convention to create (by default) for each TOC a chapter like entry in the .toc file. This creates a bit of havoc, which can be circumvented via issuing (after the global TOC): \etocmemoirtoctotocfmt {section}{\contentsname} to have the .toc file contain a section, not a chapter entry. The starred variants obey again memoir's convention to not create a .toc entry. In both cases issuing \etocarticlestyle after the main toc is recommended in order to use section headings and not chapter headings as per memoir default.
2d
comment How to remove a chapter from a local ToC
@muk.li The strange warning will be removed from etoc version 1.08g.
2d
comment Reducing fraction using LaTeX 3
@Manuel I would if the question made it clear that numbers with more than ten digits (or decimal mark and decimal digits) were involved ... yours is perfectly fine and sufficient and there are already quite a few other answers. Slightly simpler: \frac{\xintNum{#1/\gcd}}{\xintNum{#2/\gcd}}, and, again assuming that #1 and #2 are guaranteed to be given as integers, \xintiiGCD has less overhead than \xintGCD (the latter accepts fractional inputs which it truncates to integers).
2d
answered Visual table of contents (tikz mindmap) - Problem in output
2d
comment combine and etoc
The warning issued by etoc under class memoir will be a simple informative message, which will cause less alarm, starting with version 1.08g.
2d
comment What's the best practice way to test whether parameter is empty?
I see now that you meant I was implying using them was an advantage to the macro author ; well it is always advantage to allow oneself more tools... I agree about e-TeX. I knew about Ulrich's macro which impressed me a lot when he taught it to me on a usenet forum. Less \expandafter's means less expansion steps, thus, potentially, perhaps some speed gain. \IfNoTokens expands always in exactly three steps.
2d
revised What's the best practice way to test whether parameter is empty?
added alternative using active backslash as forbidden token
2d
comment What's the best practice way to test whether parameter is empty?
@clemens do you mean some kind of disadvantage? I wasn't implying that, it was only for description. One could try to make some speed comparisons (I have not and I have no idea how this would compare to the e-TeX \detokenize approach). Yes (as mentioned in my list) \IfNoTokB is a forbidden token, I believe this to be an unavoidable defect of my constraints (expandability and no use of \string nor \detokenize) ; one may make the forbidden token very unlikely in normal contexts, like an active T or ` \ ` for example (the latter would create complications in writing up the macro).
2d
comment Insert negative of \widthof into \hspace without defining a newlength
@DavidCarlisle perhaps the Q's title should be modified because already \hspace{\widthof{$-$}} does not work.
2d
comment Reducing fraction using LaTeX 3
command \xintIrr from xintfrac (no need then to load extra package xintgcd) does the job: \xintIrr{278922/74088} expands to 6641/1764. To typeset as a TeX fraction, there is typesetting macro \xintFrac (using LaTeX's \frac under the hood), thus \newcommand*\reducedfrac [2]{\xintFrac{\xintIrr{#1/#2}}} should do the job.
2d
answered What's the best practice way to test whether parameter is empty?