
我想將項目符號放在向下箭頭符號的頂部。有人可以幫我解決這個問題嗎?
\documentclass{article}
\usepackage{graphicx}
\begin{document}
The transition is represented with $\mathrel{\bullet}\downarrow $ arrow.
\end{document}
Edit1:實際上我想在向下箭頭符號的頂部附加項目符號,沒有任何間隙。
答案1
我真的不知道我在做什麼,但有一個\ooalign
建議\mathchoice
:
\documentclass{article}
\newcommand\bulletarrow{%
\mathchoice
{{\ooalign{\raise0.8ex\hbox{$\bullet$}\cr$\downarrow$}}}
{{\ooalign{\raise0.8ex\hbox{$\bullet$}\cr$\downarrow$}}}
{{\ooalign{\raise0.65ex\hbox{$\scriptstyle\bullet$}\cr$\scriptstyle\downarrow$}}}
{{\ooalign{\raise0.5ex\hbox{$\scriptscriptstyle\bullet$}\cr$\scriptscriptstyle\downarrow$}}}%
}
\begin{document}
The transition is represented with $ \bulletarrow_{\bulletarrow_{\bulletarrow}} $ arrow.
\end{document}
有關更多信息,\ooalign
請參閱egregs 回答另一個問題。
答案2
我只是想分享這個方法。這些項目被堆疊起來以達到所需的效果,並且套件\ThisStyle{...\SavedStyle...}
的巨集scalerel
會自動將當前的數學樣式匯入巨集中,否則數學樣式會遺失。
長度\LMpt
是一個長度單位,在參數內部使用,在和\ThisStyle
中為 1pt ,但在 中縮放為 0.7pt ,在 中縮放為 0.5pt ,以便相對堆疊長度保持成比例\textstyle
\displaystyle
\scriptstyle
\scriptscriptstyle
\documentclass{article}
\usepackage{stackengine}
\usepackage{scalerel}[2014/03/10]
\def\specsym{\ThisStyle{\stackon[-1\LMpt]{$\SavedStyle\downarrow$}{$\SavedStyle\bullet$}}}
\begin{document}
This is the symbol: \specsym,
$\specsym$ $\scriptstyle\specsym$ $\scriptscriptstyle\specsym$
\end{document}
\mathord
如果您希望僅在數學模式下使用該宏,則可以在 a 中使用該宏(謝謝,egreg)。
也要感謝 azetina,他在回答中就 的使用提出了很好的觀點stackengine
。語法如
\stackon[-1\LMpt]{$\SavedStyle\downarrow$}{$\SavedStyle\bullet$}
很容易形象化和解釋。它的缺點是,如果您在文件中將堆疊用於其他函數,則此語法可能會無意中受到各種stackengine
預設值設定的影響,例如對齊等\stackengine
。不受套件預設值變更的影響。在當前情況下,這意味著更遲鈍,但也更受保護的語法:
\stackengine{-1\LMpt}{$\SavedStyle\downarrow$}{$\SavedStyle\bullet$}{O}{c}{F}{F}{S}
答案3
使用該stackengine
包:
\documentclass{article}
\usepackage{amsmath}
\usepackage{stackengine}
\newcommand{\bulletarrow}{%
\setstackgap{S}{-0.25ex}%
\mathrel{\Shortstack{{$\bullet$} {$\downarrow$}}}}
\begin{document}
$\bulletarrow$
\end{document}
使用該命令的另一個可能的定義\stackengine
是:
\stackengine{-0.25ex}{$\downarrow$}{$\bullet$}{O}{c}{F}{T}{S}
答案4
您可以使用\overset
來自amsmath
:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
The transition is represent with $\overset{\bullet}{\downarrow}$ arrow.
\end{document}