4

I would like that the transpose in the following has the same height in both examples, is there a possibility to make the transpose sign ignore the boxes above the charater?

\documentclass{article} 
\usepackage{amsmath} 
\begin{document} 

\newcommand{\vect}[1]{\mathbf{#1}}
\newcommand{\vA}{\vect{A}}
\newcommand{\dvect}[1]{\vect{\dot{#1}}}

\begin{align}
    {_\mathrm{K}}\dvect{\hat{\vA}}^\top \quad {_\mathrm{K}}\dvect{\vA}^\top \quad\quad {_\mathrm{K}}\vA^\top
\end{align}
\end{document}
    {_\mathrm{K}}\dvect{\vA}^\top \quad {_\mathrm{K}}\vA^\top
\end{align}
\end{document}

enter image description here

  • Do you want the dot to be bold? Changing your definition of \dvect to \newcommand{\dvect}[1]{\dot{\vect{#1}}} seems to have less problem with superscript placement. – campa Nov 20 '15 at 11:56
  • Try the standard form for the transpose: a roman prescript exponent {}^{\mathrm t\mkern-1.5mu}A. The \prescript command from mathtoolscan do that too. – Bernard Nov 20 '15 at 12:09
  • dot needs to be bold :-) – Gabriel Nov 20 '15 at 14:59
4

I suggest you create a dedicated macro called, say, \tran to act as the transpose operator. It's no problem to set it up in such a way that its height above the baseline is invariant to what characters may precede it.

If you want to use the \top symbol to denote the transpose, I would suggest you reduce its size via a \scriptscriptstyle directive.

Depending on the math font family you use, you want to fine-tune the spacing adjustments made before and after the transpose symbol.

enter image description here

\documentclass{article}
\usepackage{amsmath}

\newcommand{\vect}[1]{\mathbf{#1}}
\newcommand{\vA}{\vect{A}}
\newcommand{\dvect}[1]{\vect{\dot{#1}}}

% "\tran": transpose operator
\newcommand\tran{\mkern-1mu{}_{}^{\scriptscriptstyle\top}\mkern-4mu}

\begin{document}
    \begin{align*}
    &{_\mathrm{K}}\dvect{\hat{\vA}}^\top \quad {_\mathrm{K}}\dvect{\vA}^\top \quad
     {_\mathrm{K}}\vA^\top \quad
     \Gamma^{\top}\Gamma \quad H^{\top}H \\
    &{_\mathrm{K}}\dvect{\hat{\vA}}\tran \quad
     {_\mathrm{K}}\dvect{\vA}\tran \quad
     {_\mathrm{K}}\vA\tran \quad
     \Gamma\tran \Gamma \quad H\tran H
     \end{align*}
\end{document}

Addendum: If you wanted to (a) raise the transpose symbol a bit more relative to the example code above and (b) shift it a bit more to the left (so that it's closer to the symbol that precedes, you might use the following version of the \tran macro:

\newcommand\tran{\mkern-2mu\raise1.25ex\hbox{$\scriptscriptstyle\top$}\mkern-3.5mu}

Relative to the version shown in the MWE, the symbol is shifted 1mu (equivalent to one third of a thin-space) more to the left, and it's also placed a bit higher up.

  • can we also make it such that the operator is at the same height, but as close to A as possible, not after some subscripts or so...? – Gabriel Nov 20 '15 at 15:14
  • @Gabriel - It's certainly possible to shift the transpose symbol further to the left. That might produce a better look for letters such as A and L, but would risk creating bad collision in the case of letters such as T, W, and M. Which letter, or letters, are most likely to occur in your document in conjunction with a transpose symbol? For sure, I wouldn't increase the current left-shift beyond 2mu (its value in the example above is 1mu). – Mico Nov 20 '15 at 15:18
  • 1
    @Gabriel - I've posted an addendum, with some alternative code for the \tran macro. – Mico Nov 20 '15 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.