这都在标题中:我想要一个\bow
在音节上方显示弓的命令,就像在那些页面上一样:
如果@Tobi 以外的人想尝试,则\bow
包文档中所示的定义metrix
如下(版权Tobias Weh
):
\NewDocumentCommand { \bow } { O{0pt} m O{0pt} }
{
\begin{tikzpicture}[
baseline = (l__metrix_syllable_node_\int_use:N \l__metrix_process_int.base),
every~metrix~bow
]
\node [every~metrix~syllable~node]
(l__metrix_syllable_node_\int_use:N \l__metrix_process_int)
{ #2 };
\draw [shorten~< = #1, shorten~> = #3]
($(l__metrix_syllable_node_\int_use:N \l__metrix_process_int.base~west)+
(\usemetrixvar{bowshortening},\usemetrixvar{bowshift})$)
to [out=-45, in=225,looseness=\usemetrixvar{bowlooseness}]
($(l__metrix_syllable_node_\int_use:N \l__metrix_process_int.base~east)+
(-\usemetrixvar{bowshortening},\usemetrixvar{bowshift})$);
\end{tikzpicture}
}
平均能量损失
\documentclass{article}
\usepackage{metrix}
\begin{document}
\metrics{ _ u u _ | _ _ | _ | _ u u _ | _ _ }
{flos ve-te-ris | vi-ni | \bow{meis} | na-ri-bus ob{-} | {-}iec-tust}
\end{document}
答案1
这是反转的版本out=-45, in=225
,即 ,out=45, in=-225
水平镜像船头。然后可以使用 (全局)调整垂直位置\setmetrixvar{bowshift}{1.5ex}
。不过看起来有点局促。
\documentclass{article}
\usepackage{metrix}
\ExplSyntaxOn
\NewDocumentCommand { \topbow } { O{0pt} m O{0pt} }
{
\begin{tikzpicture}[
baseline = (l__metrix_syllable_node_\int_use:N \l__metrix_process_int.base),
every~metrix~bow
]
\node [every~metrix~syllable~node]
(l__metrix_syllable_node_\int_use:N \l__metrix_process_int)
{ #2 };
\draw [shorten~< = #1, shorten~> = #3]
($(l__metrix_syllable_node_\int_use:N \l__metrix_process_int.base~west)+
(\usemetrixvar{bowshortening},\usemetrixvar{bowshift})$)
to [out=45, in=-225,looseness=\usemetrixvar{bowlooseness}]
($(l__metrix_syllable_node_\int_use:N \l__metrix_process_int.base~east)+
(-\usemetrixvar{bowshortening},\usemetrixvar{bowshift})$);
\end{tikzpicture}
}
\ExplSyntaxOff
\begin{document}
\setmetrixvar{bowshift}{1.5ex}
\metrics{ _ u u _ | _ _ | _ | _ u u _ | _ _ }
{flos ve-te-ris | vi-ni | \topbow{meis} | na-ri-bus ob{-} | {-}iec-tust}
\end{document}