From 83d9bb4119eca716b3746ba7c6dd0aaa66ead9a6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 3 Sep 2015 00:06:29 +0000 Subject: metrix (2sep15) git-svn-id: svn://tug.org/texlive/trunk@38280 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/metrix/metrix.dtx | 143 ++++++++++++++++------- 1 file changed, 98 insertions(+), 45 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/metrix/metrix.dtx b/Master/texmf-dist/source/latex/metrix/metrix.dtx index bd3a188d659..7ae0f8c50b5 100644 --- a/Master/texmf-dist/source/latex/metrix/metrix.dtx +++ b/Master/texmf-dist/source/latex/metrix/metrix.dtx @@ -27,8 +27,8 @@ % } \def\metrixFileName{metrix} \def\metrixFileDescription{Typset prosody/metric symbols.} -\def\metrixFileDate{2015/07/23} -\def\metrixFileVersion{1.1a} +\def\metrixFileDate{2015/09/02} +\def\metrixFileVersion{1.2} % %<*driver> \documentclass[full,english]{l3doc} @@ -77,6 +77,9 @@ \MakeShortVerb{\+} } +\makeatletter +\def\meta@font@select{\itshape\rmfamily} +\makeatother \IndexPrologue{ \section*{Index} @@ -163,7 +166,7 @@ % \subsection{Feedback} % Any feedback on \metrix/ is appreciated. You may use its GitHub repository at % \url{https://github.com/tweh/metrix} to request features and report bugs or -% send me an e-mail (\mail{mail@tweh.de}). +% send me an e-mail (\mail{mail@tobiw.de}). % % Please note that I don?t speak latin myself and fo that the examples in this manual % may be wrong---as long as they show how to use the package I don't consider such @@ -451,6 +454,27 @@ % \acct{ae}\enskip\textit{\acct{ae}}\enskip\textsl{\acct{ae}}\hfill\mbox{}} % \par\normalsize % +% \subsubsection*{Fine Tuning} +% To make some fine tuning for a certain accent possible the three macros actually got +% some additional, \emph{optional} arguments: +% {\par\medskip\noindent\ttfamily +% \cs{brv}+(+\meta{coordinate}+)+\Arg{vowel}\\ +% \cs{lng}+(+\meta{coordinate}+)+\oarg{left length}\Arg{vowel}\oarg{right length}\\ +% \cs{acct}+(+\meta{coordinate}+)+\Arg{vowel}\par} +% +% \medskip +% Where \meta{coordinate} must be a valid \TikZ/ coordinate and can be used to move +% the accent. In addition to that the accent produced by \cs{lng} can be extended +% with \meta{left/right length} by a certain amount. +% +% \begin{example} +% Prevent collision between accent and descender of an \textit{f}. +% \begin{verbatim} +% \itshape somn\acct(-0.05em,-0.45ex){i}fero +% \end{verbatim} +% \itshape somn\acct(-0.05em,-0.45ex){i}fero +% \end{example} +% % \begin{function}[EXP]{\bow} % \begin{syntax} % \cs{bow}\Arg{syllables} @@ -464,6 +488,23 @@ % mult\bow{um i}lle or d\bow{ei}nde % \end{example} % +% \subsubsection*{Fine Tuning} +% To make some fine tuning for a certain bow possible the macro actually has +% some additional, \emph{optional} arguments: +% {\par\medskip\noindent\ttfamily +% \cs{bow}+(+\meta{coordinate}+)+\oarg{left length}\Arg{syllable}\oarg{right length}\par} +% +% \medskip +% Where \meta{left/right length} can be used to shorten the bow by a certain amount. +% +% \begin{example} +% Prevent collision between accent and bow. +% \begin{verbatim} +% c\acct{oe}-l\bow{um \acct{e}}[2pt]st +% \end{verbatim} +% c\acct{oe}-l\bow{um \acct{e}}[2pt]st +% \end{example} +% % \section{Environments} % \begin{function}{symbolline} % This environment can be used to display a line of stand alone symbols. @@ -1910,79 +1951,91 @@ } % \end{macrocode} % \end{macro} -% \begin{macro}{\lng} -% This macro prints the longa accent above it's argument. +% \begin{macro}[updated=2015/09/02]{\lng} +% \changes{v1.2}{2015/09/02}{Finetunig for \protect\cs{lng}.} +% This macro prints the longa accent above its argument. % \begin{macrocode} -\NewDocumentCommand { \lng } { m } +\NewDocumentCommand { \lng } { D(){0,0} O{0pt} m O{0pt} } { \begin{tikzpicture}[baseline=(l_@@_syllable_node.base),every~metrix~accent] - \node [every~metrix~syllable~node] (l_@@_syllable_node) {#1}; + \node [every~metrix~syllable~node] (l_@@_syllable_node) {#3}; \begin{pgfinterruptboundingbox} - \draw - ($(l_@@_syllable_node.north) - - (\usemetrixvar{lngminlength}/2,0) - +(\usemetrixvar{accentxshift},\usemetrixvar{lngshift}) - + (\tl_use:N \l_@@_internal_itcorrection_tl,0)$) - -- - ($(l_@@_syllable_node.north) - + (\usemetrixvar{lngminlength}/2,0) - +(\usemetrixvar{accentxshift},\usemetrixvar{lngshift}) - + (\tl_use:N \l_@@_internal_itcorrection_tl,0)$) - - ($(l_@@_syllable_node.north~west) - +(\usemetrixvar{lngshortening}+\usemetrixvar{accentxshift},\usemetrixvar{lngshift}) - + (\tl_use:N \l_@@_internal_itcorrection_tl,0)$) - -- - ($(l_@@_syllable_node.north~east) - +(-\usemetrixvar{lngshortening}+\usemetrixvar{accentxshift},\usemetrixvar{lngshift}) - + (\tl_use:N \l_@@_internal_itcorrection_tl,0)$) - ; + \draw [shorten~< = -#2, shorten~> = -#4] + ($(l_@@_syllable_node.north) + - (\usemetrixvar{lngminlength}/2,0) + +(\usemetrixvar{accentxshift},\usemetrixvar{lngshift}) + + (\tl_use:N \l_@@_internal_itcorrection_tl,0) + + (#1)$) + -- + ($(l_@@_syllable_node.north) + + (\usemetrixvar{lngminlength}/2,0) + +(\usemetrixvar{accentxshift},\usemetrixvar{lngshift}) + + (\tl_use:N \l_@@_internal_itcorrection_tl,0) + + (#1)$) + ; + \draw [shorten~< = -#2, shorten~> = -#4] + ($(l_@@_syllable_node.north~west) + +(\usemetrixvar{lngshortening}+\usemetrixvar{accentxshift},\usemetrixvar{lngshift}) + + (\tl_use:N \l_@@_internal_itcorrection_tl,0) + + (#1)$) + -- + ($(l_@@_syllable_node.north~east) + +(-\usemetrixvar{lngshortening}+\usemetrixvar{accentxshift},\usemetrixvar{lngshift}) + + (\tl_use:N \l_@@_internal_itcorrection_tl,0) + + (#1)$) + ; \end{pgfinterruptboundingbox} \end{tikzpicture}% } % \end{macrocode} % \end{macro} -% \begin{macro}{\brv} -% This macro prints the brevis accent above it's argument. +% \begin{macro}[updated=2015/09/02]{\brv} +% \changes{v1.2}{2015/09/02}{Finetunig for \protect\cs{brv}.} +% This macro prints the brevis accent above its argument. % \begin{macrocode} -\NewDocumentCommand { \brv } { m } +\NewDocumentCommand { \brv } { D(){0,0} m } { \begin{tikzpicture}[baseline=(l_@@_syllable_node.base),every~metrix~accent] - \node [every~metrix~syllable~node] (l_@@_syllable_node) {#1}; + \node [every~metrix~syllable~node] (l_@@_syllable_node) {#2}; \begin{pgfinterruptboundingbox} - \draw ($(l_@@_syllable_node.north)+(-0.15,0) - + (\usemetrixvar{accentxshift},\usemetrixvar{brvshift}) - + (\tl_use:N \l_@@_internal_itcorrection_tl,0)$) - arc [start~angle=0, end~angle=180, radius=-0.15]; + \draw ($(l_@@_syllable_node.north)+(-0.15,0) + + (\usemetrixvar{accentxshift},\usemetrixvar{brvshift}) + + (\tl_use:N \l_@@_internal_itcorrection_tl,0) + + (#1)$) + arc [start~angle=0, end~angle=180, radius=-0.15]; \end{pgfinterruptboundingbox} \end{tikzpicture} } % \end{macrocode} % \end{macro} -% \begin{macro}{\brv} -% This macro prints the dot accent below it's argument. +% \begin{macro}[updated=2015/09/02]{\acct} +% \changes{v1.2}{2015/09/02}{Finetunig for \protect\cs{acct}.} +% This macro prints the dot accent below its argument. % \begin{macrocode} -\NewDocumentCommand { \acct } { m } +\NewDocumentCommand { \acct } { D(){0,0} m } { \begin{tikzpicture}[baseline=(l_@@_syllable_node.base),every~metrix~accent] - \node [every~metrix~syllable~node] (l_@@_syllable_node) {#1}; + \node [every~metrix~syllable~node] (l_@@_syllable_node) {#2}; \begin{pgfinterruptboundingbox} - \fill ($(l_@@_syllable_node.south) - + (0,\usemetrixvar{dotshift})$) - circle [radius=1.25\pgflinewidth]; + \fill ($(l_@@_syllable_node.south) + + (0,\usemetrixvar{dotshift}) + + (#1)$) + circle [radius=1.25\pgflinewidth]; \end{pgfinterruptboundingbox} \end{tikzpicture} } % \end{macrocode} % \end{macro} -% \begin{macro}{\bow} +% \begin{macro}[updated=2015/09/02]{\bow} +% \changes{v1.2}{2015/09/02}{Finetunig for \protect\cs{bow}.} % This macro prints the bow below it's argument. % \begin{macrocode} -\NewDocumentCommand { \bow } { m } +\NewDocumentCommand { \bow } { O{0pt} m O{0pt} } { \begin{tikzpicture}[baseline=(l_@@_syllable_node.base),every~metrix~bow] - \node [every~metrix~syllable~node] (l_@@_syllable_node) {#1}; - \draw ($(l_@@_syllable_node.base~west)+ + \node [every~metrix~syllable~node] (l_@@_syllable_node) {#2}; + \draw [shorten~< = #1, shorten~> = #3] + ($(l_@@_syllable_node.base~west)+ (\usemetrixvar{bowshortening},\usemetrixvar{bowshift})$) to [out=-45, in=225,looseness=\usemetrixvar{bowlooseness}] ($(l_@@_syllable_node.base~east)+ (-\usemetrixvar{bowshortening},\usemetrixvar{bowshift})$); -- cgit v1.2.3