How to generate a minimally sized pdf

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to generate a minimally sized pdf

Ivanov Dmitry
In LaTeX I can use the paper only fitting the contents by using standalone class. Lilypond always creates an A4 document for me. I tried the following code:

\version "2.16.0"  % necessary for upgrading to future LilyPond versions.
\paper {
  indent = 0\mm
  line-width = 110\mm
  oddHeaderMarkup = ""
  evenHeaderMarkup = ""
  oddFooterMarkup = ""
  evenFooterMarkup = ""
}

\relative c' {
  c d e f g a b c
}


But it didn't help. How can I use something like "\documentclass{standalone}" from LaTeX in lilypond?

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: How to generate a minimally sized pdf

Karl Hammar
Ivanov Dmitry:
> In LaTeX I can use the paper only fitting the contents by using standalone
> class. Lilypond always creates an A4 document for me. I tried the following
> code:
...
> But it didn't help. How can I use something like
> "\documentclass{standalone}" from LaTeX in lilypond?

 There is no auto paper size, it's A4 or something you set, see:

http://lilypond.org/doc/v2.18/Documentation/notation/paper-size-and-automatic-scaling

Hälsningar,
/Karl Hammar

-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sverige
0173 140 57



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: How to generate a minimally sized pdf

jeffery shivers
In reply to this post by Ivanov Dmitry
Hi Ivanov,

On Sun, May 28, 2017 at 6:01 PM, Ivanov Dmitry <[hidden email]> wrote:
> In LaTeX I can use the paper only fitting the contents by using standalone
> class. Lilypond always creates an A4 document for me. I tried the following
> code:
>
> [...]

I believe other people have inquired about auto-cropping and
such in the past, too! Might be worth searching the archives (or just
googling to get there faster).

By the way, how are you compiling this? (i.e. command line, frescobaldi, other?)

--

Jeffery Shivers
 jefferyshivers.com
 soundcloud.com/jefferyshivers

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: How to generate a minimally sized pdf

David Wright
In reply to this post by Ivanov Dmitry
On Mon 29 May 2017 at 01:01:02 (+0300), Ivanov Dmitry wrote:
> In LaTeX I can use the paper only fitting the contents by using standalone
> class.

Sounds as if you want pdfcrop in the texlive distribution.

Cheers,
David.

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: How to generate a minimally sized pdf

Ivanov Dmitry
In reply to this post by jeffery shivers
On 5/29/17, Jeffery Shivers <[hidden email]> wrote:

> I believe other people have inquired about auto-cropping and
> such in the past, too! Might be worth searching the archives (or just
> googling to get there faster).
>
> By the way, how are you compiling this? (i.e. command line, frescobaldi,
> other?)

I am running this in the command line:

$lilypond file.ly

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: How to generate a minimally sized pdf

Ivanov Dmitry
In reply to this post by jeffery shivers
On 5/29/17, Jeffery Shivers <[hidden email]> wrote:

> I believe other people have inquired about auto-cropping and
> such in the past, too! Might be worth searching the archives (or just
> googling to get there faster).

I tried this:

$lilypond -dpreview  file.ly

And it worked: gave me "file.preview.pdf", that was auto-cropped. Idea
taken from here:

https://superuser.com/questions/96970/lilypond-is-there-a-way-to-auto-crop-the-paper

Thank you.

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: How to generate a minimally sized pdf

David Wright
On Mon 29 May 2017 at 10:26:51 (+0300), Ivanov Dmitry wrote:

> On 5/29/17, Jeffery Shivers <[hidden email]> wrote:
>
> > I believe other people have inquired about auto-cropping and
> > such in the past, too! Might be worth searching the archives (or just
> > googling to get there faster).
>
> I tried this:
>
> $lilypond -dpreview  file.ly
>
> And it worked: gave me "file.preview.pdf", that was auto-cropped. Idea
> taken from here:
>
> https://superuser.com/questions/96970/lilypond-is-there-a-way-to-auto-crop-the-paper
>
> Thank you.

Happy that you're happy.

But the advantage of pdfcrop is that it works whereas -dpreview
doesn't. (There happens to be an active thread here on that matter¹.)

You also add a tool to your armoury that you can use on many
other² PDFs, LilyPond related or not, including ones that
you didn't produce yourself.

¹
http://lists.gnu.org/archive/html/lilypond-user/2017-05/msg00515.html

²Obviously not PDFs that are actually just wrapped images, and it
doesn't like completely blank pages.

Cheers,
David.

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user