2

Building on this answer, I created symbols that looks like curly \ll and \gg with a dot on top, as follows.

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\DeclareFontFamily{U}{mathb}{\hyphenchar\font45}
\DeclareFontShape{U}{mathb}{m}{n}{
<-6> mathb5 <6-7> mathb6 <7-8> mathb7
<8-9> mathb8 <9-10> mathb9
<10-12> mathb10 <12-> mathb12
}{}
\DeclareSymbolFont{mathb}{U}{mathb}{m}{n}
\DeclareMathSymbol{\llcurly}{\mathrel}{mathb}{"CE}
\DeclareMathSymbol{\rrcurly}{\mathrel}{mathb}{"CF}
\newcommand\dotllcurly{\mathrel{\dot{\llcurly}}}
\newcommand\dotrrcurly{\mathrel{\dot{\rrcurly}}}
\begin{document}
$a\dotllcurly b, c\dotrrcurly d$
\end{document}

Curly ll and gg with a dot on top

However, when I added these definitions to an existing document with a rather long preamble, the result was as follows (notice the dots' different relative positions).

The same as above when added to a long preamble

Is there a way to change the definitions of \dotllcurly and \dotrrcurly as to fix the relative position of the dots to appear as they do in the first picture?

3
  • @AlanMunn: Maybe there is an explicit way to specify the position of the dot relative to the underlying symbol. In the code sample listed above the positioning is done implicitly, and is therefore affected by the pre-existing definitions in the preamble. – Evan Aad Mar 31 '18 at 19:47
  • Well, what about first finding out what pre-existing definitions influence the result? Did you tamper with \dot, perhaps? – egreg Apr 1 '18 at 8:51
  • @egreg: If I tampered with \dot, it was not intentional. My preamble is quite long and it would take me a lot more time to try to figure out what influenced the result, than to use one of the excellent solutions provided in the answers below. – Evan Aad Apr 1 '18 at 12:03
4

The following example uses \cdot for the dot and positions it relative to the width of the symbol and the height of the math axis. Math style are supported.

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\DeclareFontFamily{U}{mathb}{\hyphenchar\font45}
\DeclareFontShape{U}{mathb}{m}{n}{
  <-6> mathb5 <6-7> mathb6 <7-8> mathb7
  <8-9> mathb8 <9-10> mathb9
  <10-12> mathb10 <12-> mathb12
}{}
\DeclareSymbolFont{mathb}{U}{mathb}{m}{n}
\DeclareMathSymbol{\llcurly}{\mathrel}{mathb}{"CE}
\DeclareMathSymbol{\rrcurly}{\mathrel}{mathb}{"CF}

\makeatletter
\newcommand*{\dotllcurly}{%
  \mathrel{%
    \mathpalette\@dotxxcurly\llcurly
  }%
}
\newcommand*{\dotrrcurly}{%
  \mathrel{%
    \mathpalette\@dotxxcurly\rrcurly
  }%
}
\newcommand*{\@dotxxcurly@x}{.225}
\newcommand*{\@dotxxcurly@y}{1.1}
\newcommand*{\@dotxxcurly}[2]{%
  % #1: math style
  % #2: \llcurly or \rrcurly
  \sbox0{$#1#2\m@th$}% box0 -> symbol
  \sbox2{$#1\vcenter{}$}% \ht2 -> math axis
  \rlap{%
    \hbox to \wd0{%
      \ifx#2\llcurly
        \kern\@dotxxcurly@x\wd0 %
      \else
        \hfil
      \fi
      \raise\@dotxxcurly@y\ht2\hbox{$#1\cdot\m@th$}%
      \ifx#2\rrcurly
        \kern\@dotxxcurly@x\wd0 %
      \else
        \hfil
      \fi
    }%
  }%
  \box0 %
}

\makeatother

\begin{document}
  \[ a\dotllcurly b, c\dotrrcurly d
     \quad
     \scriptstyle
     a\dotllcurly b, c\dotrrcurly d
     \quad
     \scriptscriptstyle
     a\dotllcurly b, c\dotrrcurly d
  \]
\end{document}

Result

Fine tuning, see macros:

  • \@dotxxcurly@x: Factor is multiplied with the width of the symbol and specifies the position of the dot relative to the point/tip of the symbol.

  • \@dotxxcurly@y: Factor is multiplied with the height of the math axis and specifies the raise amount of the dot.

3

A stackengine approach using scalerel to work across the various math styles:

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\DeclareFontFamily{U}{mathb}{\hyphenchar\font45}
\DeclareFontShape{U}{mathb}{m}{n}{
<-6> mathb5 <6-7> mathb6 <7-8> mathb7
<8-9> mathb8 <9-10> mathb9
<10-12> mathb10 <12-> mathb12
}{}
\DeclareSymbolFont{mathb}{U}{mathb}{m}{n}
\DeclareMathSymbol{\llcurly}{\mathrel}{mathb}{"CE}
\DeclareMathSymbol{\rrcurly}{\mathrel}{mathb}{"CF}
\usepackage{stackengine,scalerel}
\newcommand\dotllcurly{\mathrel{\ThisStyle{\ensurestackMath{%
  \stackengine{-2\LMpt}{\SavedStyle\llcurly}{\SavedStyle\cdot}{O}{c}{F}{F}{S}}}}}
\newcommand\dotrrcurly{\mathrel{\ThisStyle{\ensurestackMath{%
  \stackengine{-2\LMpt}{\SavedStyle\rrcurly}{\SavedStyle\cdot}{O}{c}{F}{F}{S}}}}}
\begin{document}
$a\dotllcurly b, c\dotrrcurly d$

$\scriptstyle a\dotllcurly b, c\dotrrcurly d$

$\scriptscriptstyle a\dotllcurly b, c\dotrrcurly d$
\end{document}

enter image description here

1
  • 1
    I've accepted Heiko's answer, because they answered first and I find their answer satisfactory. However your answer is fantastic too. – Evan Aad Mar 31 '18 at 20:32

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.