1

I would like to produce a small caps sans serif font letter t in math equation mode to typeset transpose. However, A^{\mathsf{\textsc{t}}} is not working. Any ideas?

  • Welcome to TeX.SE! We kindly suggest you to show a full minimal working example (MWE) on what you have worked so far, so we can help you further with your problem. – Cragfelt Nov 25 '17 at 23:48
  • Computer Modern Sans lacks small caps. Besides, \mathsf would have no influence over \textsc. – egreg Nov 25 '17 at 23:48
  • just use ^\mathsf{T} unlike \text.., \mathsf will get smaller in superscript, if you really want it smaller then ^{\scriptscriptsyle\mathsf{T}} – David Carlisle Nov 25 '17 at 23:56
2

Computer Modern Sans Serif lacks small caps (and Latin Modern too). Besides, a \textsc command inside \mathsf would not produce sans serif, because \mathXX commands don't accumulate.

If you don't need this in subscripts or superscripts, you can do by

\newcommand{\trans}{^{\scriptscriptstyle\mathsf{T}}}

Complete example:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\trans}{{\scriptscriptstyle\mathsf{T}}}

\begin{document}

Output: $A^{\trans}$

Comparison: $A^{\textsc{t}}$

Subscript: $\mathcal{X}_{A^{\trans}}$

\end{document}

enter image description here

As you see, the output in subscripts is suboptimal.

A different implementation:

\documentclass{article}
\usepackage{amsmath}
\usepackage{pict2e}

\makeatletter
\newcommand{\trans}{}% for safety
\DeclareRobustCommand{\trans}{\mathpalette\aberdysh@trans\relax}
\newcommand{\aberdysh@trans}[2]{%
  \begingroup
  \settoheight\unitlength{$\m@th#1{x}$}%
  \begin{picture}(1,1)
  \squarecap
  \Line(0.05,1)(0.95,1)
  \Line(0.5,0)(0.5,1)
  \end{picture}%
  \endgroup
}
\makeatother

\begin{document}

$\trans\scriptstyle\trans\scriptscriptstyle\trans$

Output: $A^{\trans}$

Comparison: $A^{\textsc{t}}$ $A^{\scriptscriptstyle\mathsf{T}}$

Subscript: $\mathcal{X}_{A^{\trans}}$

\end{document}

You may want to experiment with \roundcap instead of \squarecap.

enter image description here

  • 1
    isn't there a symbol \top that provides this shape? – barbara beeton Nov 27 '17 at 4:06
0

I ended up using the following alternative.

\makeatletter
\newcommand*{\transpose}{%
  {\mathpalette\@transpose{}}%
}
\newcommand*{\@transpose}[2]{%
  % #1: math style
  % #2: unused
    \small \raisebox{1.37\depth}{$\m@th#1\intercal$}%
}
\makeatother

\newcommand*{\tran}{^{\mkern-1.5mu\transpose}}
\newcommand*{\traninv}{^{-\mkern-1.5mu\transpose}}

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.