6

How do I typeset a caron or inverted circumflex as a character on its own in math-mode, rather than as a diacritic above another character? I need to do this because I want to use it as a superscript, like . This is when describing a pair of functions: f^ and .

2
  • Out of curiosity, what are you using this for? It's a nice idea. Dec 9, 2014 at 17:07
  • @ssdecontrol typesetting examples from Barwise &Seligmans book on Channel Theory.
    – jaybee
    Dec 10, 2014 at 12:11

3 Answers 3

5

Something like this?

enter image description here

\documentclass{article}
\usepackage{amsmath} % for \text macro
\begin{document}
$f\text{\v{}}$ $f\text{\^{}}$ $f\text{\u{}}$ $f\text{\={}}$  $f\text{\.{}}$ $f\text{\"{}}$
\end{document}
4
  • Thanks! I also need a subscript in places, but neither $f\text{\v{}}_T$ or $f_T\text{\v{}}$ look right -- any ideas?
    – jaybee
    Dec 9, 2014 at 9:49
  • @jaybee - Would ${f\text{\v{}}}_{\mkern-14mu T}$ be acceptable? The point of this admittedly not-so-pretty-looking approach is that the position of the caron isn't changed from the case without the subscript T.
    – Mico
    Dec 9, 2014 at 10:01
  • Ugly but effective, thanks again :)
    – jaybee
    Dec 9, 2014 at 10:23
  • @jaybee - Just out of curiosity: Do you maybe want the accent characters to be placed a bit higher up than I do in my code?
    – Mico
    Dec 9, 2014 at 11:05
4

Adjust the amount of lowering (now 0.5ex) to suit your need.

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand\post@accent[2]{%
  \mbox{\fontsize{#2}{\z@}\selectfont\raisebox{-0.5ex}[\dimexpr\height-0.5ex][0pt]{$\m@th\,#1{}$}}%
}
\newcommand{\definepostaccent}[2]{%
  \newcommand{#1}{\mathchoice{}{}{\post@accent{#2}{\f@size}}{\post@accent{#2}{\sf@size}}}%
}
\makeatother

\definepostaccent{\pcheck}{\check}
\definepostaccent{\pbreve}{\breve}

\begin{document}
Standard size

$f^{\pcheck}>f^{\pcheck}_{T}$ 

$f^{\pbreve}<f^{\pbreve}_{T}$

Subscript

$X_{f^{\pcheck}-f^{\pbreve}_{x}}$
\end{document}

enter image description here

Explanation

After \definepostaccent{\pcheck}{\check}, the macro \pcheck is defined to do

\mathchoice{}{}{\post@accent{\check}{\f@size}}{\post@accent{\check}{\sf@size}}

This means that \pcheck must be used only in superscripts; it will print a box where

  1. the suitable font size is set: \f@size in first level superscripts, \sf@size in second level superscripts, which correspond to the normal font size and the superscript font size;

  2. The box contains a 0.5ex lowered box which is given its natural height (\height-0.5ex) and zero depth

  3. The lowered box contains the math accent, slightly shifted right.

Using ^{\pcheck} guarantees that a subscript will be printed in its usual position.

2

May I suggest an alternative approach: Use $\vee$ and $\wedge$ as superscripts, like $f^\vee$ and $f^\wedge$.

Solution using $\vee$ and $\wedge$ as superscripts

1
  • Good call! Much simpler and though the symbols are bigger it looks fine as far as I'm concerned.
    – jaybee
    Dec 9, 2014 at 15:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .