Skip to main content

All Questions

Tagged with
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{\...
Louis Lascaud's user avatar
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 ...
misogrumpy's user avatar
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 ...
Lorenzo Carozzo's user avatar
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 ...
alex's user avatar
  • 1
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: \...
Jakob's user avatar
  • 1,003
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? ...
Jakob's user avatar
  • 1,003
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 ...
Vladimir's user avatar
  • 589
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, ...
Sun Haozhe's user avatar
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 ...
Yash 's user avatar
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 ...
xyz04's user avatar
  • 137
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{...
James Pritts's user avatar
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 ...
antshar's user avatar
  • 4,652
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 ...
Andrew Parsloe's user avatar
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 ...
aker's user avatar
  • 15
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 ...
Sandra Schlichting's user avatar

15 30 50 per page
1
2 3 4 5
19