6
votes
5answers
141 views

newcommand with optional superscript

In my thesis i need to use quite often the partial differential fraction like \frac{\partial^\alpha x}{\partial y^\alpha }} I therefore defined the command ...
11
votes
1answer
106 views

Size of indices (sub- and super- scripts)

I've been looking around for a way to change the size of indices (all through the manuscript). I found a lot of stuff, which could work, but I refuse to use without understandind. (See for example ...
1
vote
2answers
211 views

Spacing depending on optional subscripts and superscripts

I am totally new to LaTeX (use it for 2 days), so I am sorry if this has already been asked, but I spent the last 6 hours searching for a solution, but to no avail. (I stumbled upon a package xpeek ...
7
votes
4answers
151 views

How can I capture both superscripts and subscripts after a macro

This question piggy-backs on the answer to Capture a macro's subscripts/superscripts by the macro by egreg. I'm attempting to use the xparse package to create some macros and I'd rather not have ...
7
votes
1answer
115 views

Can I detect whether my macro is being used inside a subscript or superscript?

I defined this macro: \newcommand{\foldeq}[1]{\sim_{#1}} Later on, I noticed that when it's used inside a subscript, it looks a little bit hard to tell whether it's $\sim f$ or $\sim_f$. ($\sim f$ ...
2
votes
1answer
232 views

relative hspace in newcommand

I'm trying to create a symbol of a gray triangle with a black border. I managed to do so using: \newcommand{\factor}{{\color{gray} \blacktriangledown}\hspace{-1.6ex}\triangledown} However, the two ...
4
votes
2answers
227 views

Can super/sub-scripts bind more tightly than macro expansion?

By "bind more tightly" I refer to the order in which operations are carried out by default. Experimenting shows that if \ab is ab and \cd is cd then \ab^\cd is ab^cd. I would like it to be ...