Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(50)

Issue 225040043: Embed LilyPond source files inside generated PDF (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 years, 12 months ago by Valentin Villenave
Modified:
5 years, 1 month ago
Reviewers:
dak
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Embed LilyPond source files inside generated PDF This feature has been requested by Samuel Da Mota, who even wrote a patch in 2012. Unlike his approach, this attempt is fully integrated in Lily’s pipeline and does not involve external programs (namely bash and the Java-based pdftk). What I’m using internally is the pdfmark EMBED feature, unlike Reinhold’s comment on issue 2643 which involved ANN (and therefore led to a visible modification of the PDF). It should be handled by most PDF viewers, and even those who don’t should degrade gracefully. One caveat though: EMBED is not handled by the old version of GhostScript we’re still bundling; it requires a newer version. I also had to mess with some of the source code and create a new ly:source-files function. It involves a mixture of Scheme and C++ code (no smobs though), as well as one new toplevel variable. By default all files in DATADIR will be disregarded (ly/*-init.ly etc.), but there’s a boolean switch in case one would need them too.

Patch Set 1 #

Patch Set 2 : (Syntax consistency nitpick) #

Total comments: 14

Patch Set 3 : Some improvements (but problems still exist) #

Patch Set 4 : Use mark ___ pdfmark instead of [ ____ pdfmark #

Patch Set 5 : Retrieve source file paths directly from Includable-lexer:: class #

Total comments: 1

Patch Set 6 : Access source files only through LilyPond. #

Total comments: 8

Patch Set 7 : Make parser arg optional #

Patch Set 8 : Remove source file heading #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -16 lines) Patch
M Documentation/changes.tely View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M Documentation/usage/running.itely View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M lily/sources.cc View 1 2 3 4 5 6 1 chunk +25 lines, -0 lines 0 comments Download
M scm/framework-ps.scm View 1 2 3 4 5 6 7 3 chunks +39 lines, -16 lines 0 comments Download
M scm/lily.scm View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 24
Valentin Villenave
Greetings everybody, since there have been some discussions about updating GhostScript lately, perhaps now would ...
8 years, 12 months ago (2015-04-03 22:39:27 UTC) #1
Valentin Villenave
(Syntax consistency nitpick)
8 years, 11 months ago (2015-04-06 18:21:19 UTC) #2
dak
https://codereview.appspot.com/225040043/diff/40001/lily/include/sources.hh File lily/include/sources.hh (right): https://codereview.appspot.com/225040043/diff/40001/lily/include/sources.hh#newcode27 lily/include/sources.hh:27: static SCM source_file_list; static? That means that every compilation ...
8 years, 11 months ago (2015-04-09 13:37:42 UTC) #3
Valentin Villenave
Here’s a slightly better-looking version (but the C++ part needs more work once I figure ...
8 years, 11 months ago (2015-04-10 08:10:58 UTC) #4
Valentin Villenave
Some improvements (but problems still exist)
8 years, 11 months ago (2015-04-10 08:12:18 UTC) #5
dak
https://codereview.appspot.com/225040043/diff/40001/scm/framework-ps.scm File scm/framework-ps.scm (right): https://codereview.appspot.com/225040043/diff/40001/scm/framework-ps.scm#newcode425 scm/framework-ps.scm:425: [ /_objdef {ly~a_stream} /type /stream /OBJ pdfmark On 2015/04/10 ...
8 years, 11 months ago (2015-04-10 08:58:36 UTC) #6
Valentin Villenave
Use mark ___ pdfmark instead of [ ____ pdfmark
8 years, 11 months ago (2015-04-10 09:04:01 UTC) #7
Valentin Villenave
On 2015/04/10 08:58:36, dak wrote: > I was talking about replacing "[" with "mark" here. ...
8 years, 11 months ago (2015-04-10 09:06:33 UTC) #8
dak
https://codereview.appspot.com/225040043/diff/40001/lily/sources.cc File lily/sources.cc (right): https://codereview.appspot.com/225040043/diff/40001/lily/sources.cc#newcode78 lily/sources.cc:78: source_file_list = scm_cons (ly_string2scm (file_string), source_file_list); On 2015/04/10 08:10:57, ...
8 years, 11 months ago (2015-04-10 09:42:38 UTC) #9
Valentin Villenave
Retrieve source file paths directly from Includable-lexer:: class
8 years, 11 months ago (2015-04-11 23:05:59 UTC) #10
Valentin Villenave
On 2015/04/10 09:42:38, dak wrote: > In this particular case, it would appear that > ...
8 years, 11 months ago (2015-04-11 23:12:21 UTC) #11
dak
https://codereview.appspot.com/225040043/diff/100001/scm/framework-ps.scm File scm/framework-ps.scm (right): https://codereview.appspot.com/225040043/diff/100001/scm/framework-ps.scm#newcode427 scm/framework-ps.scm:427: /F (~a) (r) file def I don't think it ...
8 years, 9 months ago (2015-06-13 18:32:06 UTC) #12
Valentin Villenave
Access source files only through LilyPond.
8 years, 1 month ago (2016-02-23 18:07:39 UTC) #13
Valentin Villenave
On 2016/02/23 18:07:39, Valentin Villenave wrote: > Access source files only through LilyPond. It would ...
8 years, 1 month ago (2016-02-23 18:15:59 UTC) #14
HoangMinh
On 2016/02/23 18:15:59, Valentin Villenave wrote: > <font><font>Ngày 2016/02/23 18:07:39, Valentin Villenave đã viết:</font></font><font></font><font><font> > ...
8 years, 1 month ago (2016-02-28 10:09:18 UTC) #15
HoangMinh
8 years, 1 month ago (2016-02-28 10:09:50 UTC) #16
dak
https://codereview.appspot.com/225040043/diff/120001/lily/sources.cc File lily/sources.cc (right): https://codereview.appspot.com/225040043/diff/120001/lily/sources.cc#newcode93 lily/sources.cc:93: (SCM parser_smob), Maybe make the parser_smob argument optional? It ...
8 years, 1 month ago (2016-02-28 14:09:52 UTC) #17
HoangMinh
On 2016/02/28 14:09:52, dak wrote: > https://codereview.appspot.com/225040043/diff/120001/lily/sources.cc<font></font><font><font> > Nộp lily / sources.cc (bên phải):</font></font><font></font> > ...
8 years, 1 month ago (2016-02-28 15:31:27 UTC) #18
Valentin Villenave
Make parser arg optional
8 years, 1 month ago (2016-02-28 19:10:05 UTC) #19
Valentin Villenave
OK, new version. The new "fluid" parser variable is noticeably nicer to work with than ...
8 years, 1 month ago (2016-02-28 19:15:04 UTC) #20
dak
https://codereview.appspot.com/225040043/diff/120001/scm/framework-ps.scm File scm/framework-ps.scm (right): https://codereview.appspot.com/225040043/diff/120001/scm/framework-ps.scm#newcode468 scm/framework-ps.scm:468: (format "% LilyPond source file: ~a\n\n" filename)) On 2016/02/28 ...
8 years, 1 month ago (2016-02-29 11:22:32 UTC) #21
dak
On 2016/02/29 11:22:32, dak wrote: > Oh, didn't see it. I definitely would refrain from ...
8 years, 1 month ago (2016-02-29 11:25:37 UTC) #22
Valentin Villenave
On 2016/02/29 11:25:37, dak wrote: > On 2016/02/29 11:22:32, dak wrote: > > > Oh, ...
8 years, 1 month ago (2016-02-29 11:59:03 UTC) #23
Valentin Villenave
8 years ago (2016-03-01 09:25:47 UTC) #24
Remove source file heading
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b