All Questions
105
questions
1
vote
1
answer
65
views
How does one fully expand a macro between \csname and \encsname?
The best way to ask this question is to present two MWEs, one of which works and one of which does not. Naturally, I would like to get this into the second form, but I am at a loss as to what is ...
0
votes
2
answers
72
views
Which way to alter commands is more robust/sustainable
I have a general question. If I'm writing a .cls file (or a package file, as well), what's the best way to edit standard commands like \section which are defined by the used standard class or latex....
4
votes
2
answers
64
views
Problem with macro expansion when making a custom queue container
I'm trying to make a simple queue using the etoolbox package by making my own custom macros \listfront and \listfrontpop. This is my very first time using TeX code to this level, so my understanding ...
1
vote
3
answers
94
views
Using Macro Inside Description List Label
I made a macro using xparse for formatting the month with optional day and year. Except the appended optional argument doesn't work inside a description label for the description list---unless I ...
4
votes
1
answer
218
views
Using \ifblank to check more than one parameter
I have been reading through mathtools' docs, and they provide an example that declared a paired delimiter that has a default behaviour if blank, using etoolbox:
\DeclarePairedDelimiterX\norm[1]\lVert\...
3
votes
1
answer
100
views
Use `\ifblank` as a test for `\ifstrequal`
To carry out checks on some parameters passed to an environment, I would need to:
check if the parameter is blank or not;
pass a default value or the one supplied;
compare the final value with a ...
6
votes
2
answers
234
views
Why does an empty command not return an empty string?
I want to check if a command returns something or not. I tried the following but it is not working. Why is the output of the following code false?
\documentclass{article}
\usepackage{etoolbox}
\...
0
votes
1
answer
119
views
Can you make boolean expressions in xparse?
I have a preamble I use on my assignments containing the following command using xparse:
\ProvideDocumentCommand{\integral}{s m m e{_^}}{%
\int%
\IfValueT{#4}{_{#4}}%
\IfValueT{#5}{^{#5}}%
...
2
votes
1
answer
61
views
latex macro fails to parse expression although bracket groups match
The tensor package allows the typesetting of tensors using commands like,
\[
\tensor{X}{^b^o_a_t}
\]
to produce the following expression:
Together with the physics package it is possible to ...
0
votes
1
answer
313
views
How to reduce one counter
In the MWE below, the excoutP is added to store the value of excout.
How can we only use the counter excout?
\documentclass{article}
\usepackage{etoolbox}
\usepackage{xcolor}
\...
0
votes
1
answer
37
views
Why doesn't execute my command in table?
I think the command \apptocmd from "etoolbox" package doesn't work in table. What I should to do?
MWE:
\documentclass{article}
\usepackage{etoolbox}
\newcommand{\mycmd}[1]{%
#1\apptocmd{\...
1
vote
1
answer
92
views
\iftoggledefined: Detect if newtoggle was defined
I am looking for \iftoggledefined{<toggle name>}{<true>}{<false>}. I checked the etoolbox documentation and did not see such a thing.
Based on Difference between \newbool and \...
0
votes
2
answers
146
views
Change maketitle based on string argument
I want to change the command \maketitle as follows:
If no argument is given, maketitle should be defined as
\renewcommand{\maketitle}{%
\vspace*{-70pt}
{\sffamily\slshape\bfseries faculty, }{\...
1
vote
1
answer
53
views
Custom environment that outputs a tabularx generates an error only if the etoolbox package is included
I'm dealing with a really complex table and I want to define an environment with some additional macros in order to make the table creation code more semantic. So far I've defined the environment and ...
4
votes
2
answers
394
views
Single Line Checker
I'm using caption and subcaption Packages to make more beautiful captions to my figures used in the document. So i use the following style,
\DeclareCaptionStyle{MarinoCaptionStyle}{
format=...