tweh / metrix Goto Github PK
View Code? Open in Web Editor NEWA LaTeX package to typset prosodic/metric symbols above verses.
A LaTeX package to typset prosodic/metric symbols above verses.
It should be possible to add signs, e.g. quotes, without changing the alignment of the symbols.
\metrics{„do-mum ro-ma-num“}{u u _ _ u}
On option is a command like \mEsc{<„>}
(“metrix escape”) that adds a shifting to the symbol (inside of \metrix_print_syllable:n
).
This is related with issue #3, and can be a more general approach of hyphen escaping.
If used inside of a normal line \metrics
should take enough vertical space to place the symbols.
It would be great to be able to place an inverted \bow above letters to mark resolution (e.g. in Old English poetry), so a new command exactly like \bow but with the following differences/features:
(i) placed above the letters
(ii) with a downward opening
(iii) no clash with stress marks above
Since only the vowels are effected by the accents/metric the according symbols should be aligned above the vowel and leading consonants should be ignored when positioning.
When escaping a hyphen like this
\metrics{_ _}{vi-{-ni}}
the hyphen will be part of the node and the centering of the symbol isn’t perfect …
Add feature on \metrics
to repeat the lat sequence of metric symbols in combination with new syllables.
E.g.
\metrics{_ uu_ _ _|_ _uu _ _ _ } {flos ve-te-ris vi-ni | meis na-ri-bus ob-iec-tust}
\metrics+{flos ve-te-ris vi-ni | meis na-ri-bus ob-iec-tust}
instead of
\metrics{_ uu_ _ _|_ _uu _ _ _ } {flos ve-te-ris vi-ni | meis na-ri-bus ob-iec-tust}
\metrics{_ uu_ _ _|_ _uu _ _ _ } {flos ve-te-ris vi-ni | meis na-ri-bus ob-iec-tust}
The test wether the number of syllable and symbol match, should work in this case too.
An environment version could be possible:
\begin{Metricverses}{_ uu_ _ _|_ _uu _ _ _}
flos ve-te-ris vi-ni | meis na-ri-bus ob-iec-tust \\
flos ve-te-ris vi-ni | meis na-ri-bus ob-iec-tust \\
\end{Metricverses}
in this case every line must be processed separately and should end with \\
. Maybe a processing as {tabular}{l}
in the background works.
Add an option (e.g. starred version of \metrics
) to print the syllable hyphens in the output.
It would be great to have the possibilty to put stress accents on the top of the long/short markers just like the package metre did, e.g. in this example here:
The x symbol is a little to low compared with the elementum longum
The small break symbol should not be aligned between symbols but between syllables. (from Bill via e-mail)
\documentclass[12pt, openany]{book}
\usepackage{metrix}
\pagestyle{empty}
\newcommand{\fakesep}{
\raisebox{.83em}{{\rule{.04em}{6.47pt}}}\hspace{-3.6pt}
}
\setlength{\parskip}{10mm}
\begin{document}
In this one, the separator in the word aurarum is over the u, but should be more to the left
\metrics{ _ u u ' _ _ ' _ _ ' _ u u ' _ u u ' _ _ }
{quod fa-cit au-ra-{r\bow{um e}st} et cus-pi-de ful-get a-cu-ta}
In this one, I replaced the separator with my little ``fakesep'' hack code, and the separator is further left
\metrics{ _ u u ' _ _ _ _ ' _ u u ' _ u u ' _ _ }
{quod fa-cit au-ra-\fakesep{r\bow{um e}st} et cus-pi-de ful-get a-cu-ta}
without bow
\metrics{ _ u u ' _ _ ' u _ _ ' _ u u ' _ u u ' _ _ }
{quod fa-cit au-ra-rum est et cus-pi-de ful-get a-cu-ta}
\end{document}
A line like
\metrics{_ _ _ u u _ _ _ _ _ u u _ _}
{Qu\acct{i}n \acct{e}t mer-c\acct{u}-ri-um mu-t\acct{a}-to n\acct{o}-mi-ne d\acct{i}-cunt}
is quite confusing so a shorter way for accents would be nice to have. E.g. by using active characters:
\acct{a} ——> °a
\acct{ae} ——> °{ae}
\lng{a} ——> _a
\lng{ae} ——> _{ae}
\brv{a} ——> ^a
\brv{ae} ——> ^{ae}
The above line would become
\metrics{_ _ _ u u _ _ _ _ _ u u _ _}
{Qu°in °et mer-c°u-ri-um mu-t°a-to n°o-mi-ne d°i-cunt}
Additionally active characters for bows would be also great:
coel\bow{um e}st ——> coel(um e)st
In that case only (
has to be active and )
part of the parameter definition.
What about fine tuning in this cases?
It should be no problem if \let
is used, except for \bow
…
Commands to (de)activate this for regular text would be also good to have
\activatemetrixaccents
… \deactivatemetrixaccents
\metrixaccents{<text with active chars>}
\activatemetrixbows
… \deactivatemetrixbows
\metrixbows{<text with active chars>}
In general the should be two package options to explicitly active the active characters to prevent bad interactions with other packages:
active-accents = <true|false>
active-bows = <true|false>
Check interaction with babel
’s active characters!
Make it possible to say e.g. 4=<2-5>colored highlight
.
Typeset a melody line above of syllables/words with
\melody[<highlights>]{<melody>}{<syllables>}
and a melody without syllables
\melodyline<*>[<highlights>]{<melody>}{<syllables>}
with a starred version to typeset a smaller version, i.e. use a smaller base unit.
The <melody>
list constist of numbers, e.g. {0 0 1 0 2 2 0 0 0}
would print something like
_ _
_ / \
_ _ / \ _ / \ _ _ _
In the normal version the number should be absolute (i.e. always relative to 0) but
both macros should get a “plused” version (\melody+
/\melodyline+
) to make the melody numbers relative. The above example then would be {0 0 1 -1 2 0 -2 0 0}
.
Add a TikZ style every melody
and different styles like soft sloped
, hard sloped
, rectangular
, smoothed
etc.
There is a third elementum indifferens symbol, which has longum over breve. The abbreviation for it could be _u
.
Looks like this: ⏒
Hi, it would be great to have line numbering like in the verse package
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.