emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: stardiviner <numbchild@gmail.com>
To: numbchild@gmail.com
Cc: Oliver Heck <oliver.heck@posteo.de>, emacs-orgmode@gnu.org
Subject: Re: Org-babel-lilypond always renders full pages
Date: Mon, 30 Mar 2020 13:58:37 +0800	[thread overview]
Message-ID: <87y2rigz8y.fsf@gmail.com> (raw)
In-Reply-To: <871rpaievd.fsf@gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


stardiviner <numbchild@gmail.com> writes:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
>
> You might want to try this:
>
> #+begin_src emacs-lisp
> (add-to-list 'org-babel-default-header-args:lilypond
>              '((:prologue . "\paper{
>   indent=0\mm
>   line-width=120\mm
>   oddFooterMarkup=##f
>   oddHeaderMarkup=##f
>   bookTitleMarkup = ##f
>   scoreTitleMarkup = ##f
> }")))
> #+end_src
>

I found this custom setting lilypond header arguments will not work. Because this code function:

#+begin_src emacs-lisp
(defun org-babel-lilypond-get-header-args (mode)
  "Default arguments to use when evaluating a lilypond source block.
These depend upon whether we are in Arrange mode i.e. MODE is t."
  (cond (mode
         '((:tangle . "yes")
           (:noweb . "yes")
           (:results . "silent")
           (:cache . "yes")
           (:comments . "yes")))
        (t
         '((:results . "file")
           (:exports . "results")))))

(defun org-babel-lilypond-set-header-args (mode)
  "Set org-babel-default-header-args:lilypond
dependent on ORG-BABEL-LILYPOND-ARRANGE-MODE."
  (setq org-babel-default-header-args:lilypond
        (org-babel-lilypond-get-header-args mode)))
#+end_src

It always reset and return one result of two conditions.

I think this is a bug.

> Oliver Heck <oliver.heck@posteo.de> writes:
>
>> 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
>>
>> On 30.03.20 01:58, Jonathan Gregory wrote:
>>> Hi
>>> On 29 Mar 2020, Oliver Heck <oliver.heck@posteo.de> 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
>>> 
>>
>> -- 
>
>
> - -- 
> [ stardiviner ]
>        I try to make every word tell the meaning what I want to express.
>
>        Blog: https://stardiviner.github.io/
>        IRC(freenode): stardiviner, Matrix: stardiviner
>        GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
>       
> -----BEGIN PGP SIGNATURE-----
>
> iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6BhTYUHG51bWJjaGls
> ZEBnbWFpbC5jb20ACgkQG13xyVromsP5FAf/cxuPIpA7asX7esGCgZo3p+xJEbaj
> sblsus9U586m6uwrGDyCAlNFCTsIFNx5cby1HKHQ7pI5EswrQxu7rve4qpqspqbI
> ifw615Q5Q6cwCEPC1DTSQp6w7m6qHrDu1TrgL8bhvgPciaf9GH9uHszpuYi259R4
> /66iyCyYEK55JAfFmoYpXhMoY1PsUHt2E8/PCHnbkys8Cbg1b2P9IUCNHq2XoiF2
> 1vFoGtVHGaGx48bmqztg/J4xTkJpj0VgeEMF3d/reT05ToZsYoa4mCFj/TWv+6q7
> /zahVFf1KempQgM1KLbBvfRXzw8J8h9f2N9rCurdtFnr/03T2T5uEx+zqw==
> =9fTG
> -----END PGP SIGNATURE-----


- -- 
[ stardiviner ]
       I try to make every word tell the meaning what I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      
-----BEGIN PGP SIGNATURE-----

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl6Bio0UHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsOTyAf/ZfHNkxoCvCFYI8RoPF6Wp0Ye26/a
5pTDWBSY3qwVx7r9MH3fHArV6I5fUomkxi+wMrclXxAaPX91xoKwCHJ5ZeOmLXHx
pFygrW4odWC3wWA/5vmeM3VC5j16AJfWpqCWeCRa4ylUAJK4YTTAc9BKVqeOjR7S
Vt7GW8cLOCUaRfM7ZSgNkhNcryS/a2ImotOdxLCTzZ9j1Y+IlPCjDyAWzBT1sdIL
e4qhqr9mYjbGhh07FBweUKT6qQEFev2ZDbq6DJIsA7MK9SigpcGkU3b34J6ake3o
HymaRkhiTIRgbdspE5j5LCH0ecwoJGpgv1GpFHlcVZPEtHobATzlUj2pUA==
=0S80
-----END PGP SIGNATURE-----

  parent reply	other threads:[~2020-03-30  5:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-29 21:11 Org-babel-lilypond always renders full pages Oliver Heck
2020-03-29 23:58 ` Jonathan Gregory
2020-03-30  4:34   ` Oliver Heck
2020-03-30  5:35     ` stardiviner
2020-03-30  5:54       ` Oliver Heck
2020-03-30  5:58       ` stardiviner [this message]
2020-03-31 13:48         ` Jonathan Gregory
2020-03-31 21:36           ` adam
2020-04-01  9:02             ` Oliver Heck
2020-04-01 23:23               ` adam
2020-04-02  8:35           ` stardiviner
2020-04-02 22:56             ` Jonathan Gregory
2020-04-05  3:10               ` stardiviner
2020-04-06 21:39                 ` Nick Dokos
2020-03-31 13:43     ` Jonathan Gregory
2020-03-31 14:54       ` Oliver Heck
2020-03-30  6:55   ` Oliver Heck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2rigz8y.fsf@gmail.com \
    --to=numbchild@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=oliver.heck@posteo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).