构建于这个答案,我创建了看起来像卷曲的\ll
并且\gg
顶部有一个点的符号,如下所示。
\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}
但是,当我将这些定义添加到具有相当长的序言的现有文档中时,结果如下(请注意点的不同相对位置)。
\dotllcurly
有没有办法改变和的定义\dotrrcurly
以固定点的相对位置,使它们像在第一张图片中一样出现?
答案1
以下示例使用\cdot
点并相对于符号的宽度和数学轴的高度定位它。支持数学样式。
\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}
微调,参见宏:
\@dotxxcurly@x
:因子与符号的宽度相乘,并指定点相对于符号的点/尖端的位置。\@dotxxcurly@y
:因子与数学轴的高度相乘,并指定点的上升量。
答案2
一种适用于各种数学风格的stackengine
方法:scalerel
\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}