emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Org-babel-lilypond always renders full pages


From: Oliver Heck
Subject: Re: Org-babel-lilypond always renders full pages
Date: Tue, 31 Mar 2020 16:54:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

Thanks, Jonathan, but the first advise does not work.

Where would I put the elisp code you proposed?

Oliver

On 31.03.20 15:43, Jonathan Gregory wrote:
Hi Oliver

On 30 Mar 2020, Oliver Heck <address@hidden> wrote:

Hi Jonathan,

that works fine. Thank you!

Can I set this as default header somewhere in the org file or will I
have to include it to every snippet (I will have a lot of them).

Oliver

You can use the Noweb Reference Syntax[1]

#+name: paper
#+begin_src text :exports none
\paper{ oddFooterMarkup=##f }
#+end_src

#+name: Lilypond
#+begin_src lilypond :file test.png
<<paper>>
\relative c'' { c d e f }
#+end_src

You can also append the extra header to the
org-babel-default-header-args:lilypond variable:

(advice-add 'org-babel-lilypond-set-header-args :filter-return
            (lambda (_mode)
              (setq org-babel-default-header-args:lilypond
                    (append org-babel-default-header-args:lilypond
                            '((:epilogue . "\\paper{ oddFooterMarkup=##f 
}"))))))


On 30.03.20 01:58, Jonathan Gregory wrote:
Hi

On 29 Mar 2020, Oliver Heck <address@hidden> wrote:

Hi,

I am trying to use org-babel-lilypond and basically got it running.
But somehow I always get full lilypond pages back instead of a small
snippet.
This is what I have in my org-file:

#+NAME: Lilypond
#+BEGIN_SRC lilypond :file test.png
    \relative c'' { c d e f }
#+END_SRC


I read through the documentation on
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html
but cannot find a clue.

Any idea what I am doing wrong here?

Cheers,
Oliver

The lilypond manual suggests using \paper variables to reduce the white
space around the score. In particular, you should set oddFooterMarkup
and oddHeaderMarkup to false.

\paper{
    indent=0\mm
    line-width=120\mm
    oddFooterMarkup=##f
    oddHeaderMarkup=##f
    bookTitleMarkup = ##f
    scoreTitleMarkup = ##f
}

http://lilypond.org/doc/v2.18/Documentation/usage/lilypond-output-in-other-programs

--
Jonathan


--


--
Jonathan

Footnotes:
[1]  https://orgmode.org/manual/Noweb-Reference-Syntax.html


--
--
If you are thinking without writing, you only think you are thinking. (Leslie Lamport)



reply via email to

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