lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Very short lilypond snippets in LaTeX


From: David Kastrup
Subject: Re: Very short lilypond snippets in LaTeX
Date: Tue, 21 Jun 2011 12:35:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

"address@hidden" <address@hidden> writes:

> I am lilypond-booking a latex document where I endeavor to insert
> short snippets into fragments of text :
>
> The dynamic should be between
> \begin{lilypond}
> \markup { \dynamic "ppp" }
> \end{lilypond}
> and
> \begin{lilypond}
> \markup { \dynamic "pp" }
> \end{lilypond}
> .
>
> The typeset result is not nearly as nice as \markup { The dynamic
> should be between \dynamic "ppp" and \concat { \dynamic "pp" .} }.
> I'd like to achieve this, but in LaTeX w/o too much hard-coded
> tweakery.  Thoughts?

Images don't inherently have a baseline/descenders.  That's a real mess,
but you can't really get around that, or the results will look awful.

The Emacs/AUCTeX WYSIWYG extension preview-latex
<URL:http://www.gnu.org/software/auctex/preview-latex.html> outputs
messages to the console in the rendering process so that Emacs can pick
up the baseline info (as well as bounding box info).  The output is done
to a given baseline (starting at the famous 1in,1in point) without
regard of page boundaries.  That way, the postprocessing can render to
the right area.  Different options for relaying the bounding box are
invoked with the auctex and lyx options to the preview package, and the
bounding box is relayed to PostScript specials or PDF box dimensions
using the tightpage option.

When not going through PostScript, the tool dvipng can pick up the
baseline info from the PostScript specials nevertheless, and use a
variety of methods for getting it out again: printed info on stdout, or
padding the graphics until the baseline is at the center, and so on.  It
is worth taking a look at some of the options it implements.

Note that none of this directly helps for your problem, since you don't
need to get the baseline info out of LaTeX, but out of Lilypond.
Nevertheless, there might be some food for thought here.

> The reason I can't use the native lilypond is because all of this is
> going into a table, and I don't want to go down the slippery slope of
> reimplementing latex in lilypond thru markup commands.

Without the baseline, embedded in-line graphics look awful.  You need to
add it by hand (using \raisebox or similar), or devise an automatic
process for getting at it.  There is really no acceptably looking
alternative when writing material with descenders, and dynamics
definitely have descenders.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]