lilypond-user
[Top][All Lists]
Advanced

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

Re: justified paragraphs in bookTitleMarkup


From: Thomas Morley
Subject: Re: justified paragraphs in bookTitleMarkup
Date: Fri, 18 Jul 2014 13:45:00 +0200

2014-07-18 12:57 GMT+02:00 Urs Liska <address@hidden>:
> Hi,
>
> I still don't seem to understand this markup stuff sufficiently :-(
>
> Please consider the attached file. It has a custom header field defined as
> \markup \justify and uses this field in \bookTitleMarkup.
>
> This concats the complete markup to one justified paragraph. However I would
> like to achieve a solution where this field can be interpreted markdown-like
> as three paragraphs.
>
> I tried several things but nothing gave me what I need.
> \justify-field gives a nice result but that makes it impossible to use a
> \markup (including the formatting) as the field value.
> What basically works is defining it as
> field = \markup \column {
>   \justify { first paragraph }
>   \justify { second paragraph }
>   \justify { third paragraph }
> }
> but this additionally requires me to add manual space between the
> paragraphs.
>
> I want to provide a clean interface to entering this multiparagraph field
> values in the header that can output justified output by paragraph.
>
> Any ideas?
>
> Would it be possible to define a markup-command that takes a string as
> argument, parses it markdown-like (including some basic formatting) and
> returns a \markup suitable for use in \bookTitleMarkup (or elsewhere in a
> score)? I think this would be a great enhancement in general.
>
> Best
> Urs


Does justify-string what you want?

\header {
  desc = \markup \justify-string
    #"When working on a score it is often necessary to mark the state of
    development on a given intermediate state (printout or shared PDF).
    Instead of simply adding a date it can be very useful to add information
    about the Git revision if the document is in a version control repository.

    This module provides markup commands that retrieve information about the
    current Git repository. It is not only possible to get information about
    the current commit but also whether the repository is in a clean state
    (i.e. whether the score represents the state of a commit or contains
    modifications in the working tree).

    A generic command can be used to issue arbitrary Git commands.
    For a list of defined commands see the usage example."
}

\paper {
  bookTitleMarkup = \markup {
     \fromproperty #'header:desc
  }
}

{ c' }


Cheers,
  Harm



reply via email to

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