All Questions
271
questions
1
vote
0
answers
14
views
Information about surrounding text [duplicate]
I'm trying to define a command which raises an issue about spaces.
Basically, I want to have a single command for these two :
\documentclass{article}
\newcommand{\Cinf}{$C^\infty$ }
\newcommand{\...
0
votes
0
answers
20
views
Custom command for words with diacritics [duplicate]
I am writing a report which is often using the word "Sierpiński". Since I do not want to write \'n everytime, I made a custom macro:
\newcommand{\sierpinski}{Sierpi\'nski}
The problem ...
2
votes
1
answer
59
views
Adaptive parentheses in the definition of a command: how to avoid odd space
I'm trying to improve a command with adaptive parentheses, but I don't know how to avoid an unexpected blank space between the operator and the first parenthesis.
I already had a problem with this ...
0
votes
1
answer
46
views
Conditional Spacing Based On Macro Argument
Consider the following macro:
\newcommand{\interpretation}[1]{\left[ #1 \right]_{\mathcal{N}}}
This gives the following output on argument a:
So far, so good.
Now, suppose for example that I pass in ...
1
vote
2
answers
129
views
How to define a command that can be used as a superscript without {} and that can have a subscript
I have used \theta hundreds of times in my document. Now I decided that I would like all thetas to be in red color.
So I would like to redefine the command \theta to create a red theta.
MWE:
\...
6
votes
2
answers
154
views
Why do optional arguments of commands affect spacing of \mathcolor
I am very surprised that simply adding an optional argument to the definition of my command changes the spacing in formulas in combination with \mathcolor. Why does this happen? How can this be fixed?
...
1
vote
0
answers
48
views
New environment as a single box [closed]
I am making my new environment for headings. It is as follows:
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\begin{document}
\newlength{\headspace}
\setlength{\headspace}{3mm ...
0
votes
0
answers
110
views
CurVe document class: reduce the extra horizontal space between the key and its content in a \entry* row
I am using CurVe document class to create my CV.
I want to know if there is anyway to reduce the extra horizontal space between the key and value in one entry (\entry*[...]...). As shown by Figure 1, ...
0
votes
0
answers
392
views
Adding "Relevant Courses" Section with proper formatting to Jake's Resume Template
I am a beginner in Latex, and am trying to create a resume using the "Jake's Resume" template (https://www.overleaf.com/latex/templates/jakes-resume/syzfjbzwjncs). I am currently trying to ...
3
votes
2
answers
52
views
Title Format ruining itemize spacing
I use title format to change the look of my section commands and so on, after making a new section for some reason the spacing used by itemize is being ruined and it is not leaving the proper amount ...
0
votes
0
answers
47
views
\NewDocumentCommand changes spacing in math mode
\documentclass{article}
\def\trsp{^\top}
\NewDocumentCommand{\tr}{e{^_}}{{^\top\IfValueT{#1}{#1}}}
\begin{document}
$\mathbf{x}_1^{\top}$ versus $\mathbf{x}_1\trsp$ versus $\mathbf{x}_1\tr$
\end{...
1
vote
0
answers
43
views
Defined braced macro [duplicate]
Consider the following MWE:
\documentclass{article}
\newcommand{\foo}{foo}
\begin{document}
test \foo bar
test {\foo} bar
test {\foo}.
\end{document}
My goal is to define \foo in such a way ...
2
votes
2
answers
102
views
Storing the unknown contents of a macro in a clist
[edited after egreg's answer] I want to store macros and their contents as pairs macro {macro contents} in a clist. The macros will be defined elsewhere, by the user or in another package, and will ...
1
vote
1
answer
37
views
Detect space after active character does not handle trailing formatting macro
There's an active character * (can be anything, asterisk just used for demonstration purposes).
If the character following * is a space, write \marginpar{foo}, otherwise write \marginpar{bar}. This ...
0
votes
1
answer
123
views
How to get gray background to top to bottom?
I really like this CV (the first screenshot) and the closest I have been able to find is this one (the second screenshot). The complete source code is here.
If I delete the first tcolorbox section and ...