0

I currently have the following:

\DeclareMathOperator{\A}{A} $1$-$\A$ $1\text{-}\A$ $B_{1\text{-}\A}$ 

$1$-$\A$ is okay, while $1\text{-}\A$ and $B_{1\text{-}\A}$ puts unnecessary space between "-" and "A". I want to remove this space, but for $B_{1\text{-}\A}$ I cannot simply end and restart the $$ as in $1$-$\A$. How can I do this?

2
  • 1
    What are the - and the \text{-} supposed to mean here? Commented Feb 14 at 13:39
  • 1
    What does mean the - in your document? This is hyphen character which isn't normally used in math formulas. If you mean "minus", use hyphen character without \text and it changes to minus character automatically. What does mean \A in your document? You declared it as Op (operator), so you want to use it typically with special limits and with spaces around it. You can't be surprise that there is space around it. If you mean it as ordinary character, declare Ord, not Op. Commented Feb 14 at 13:40

1 Answer 1

2

That's expected: with 1\text{-}\A you have

Ord Ord Op

and the rules of TeX insert a thin space between an Ord atom and an Op atom.

My impression is that either

  • you don't want \A to be a math operator, or
  • you want to define \DeclareMathOperator{\oneA}{1-A}

I've discussed elsewhere the difference between \operatorname (which is what \DeclareMathOperator defines abbreviations of) and \mathrm.

If you have a “family” of operators of the form “*-A”, where * can be anything, you can define

\newcommand{\xA}[1]{\operatorname{#1-A}} 

so you can call \xA{1}.

If you want to keep the complicated 1\text{-}A (but I recommend you not to), nullify the operator nature of \A:

1\text{-}{\A} 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.