I will try to draw a close to this thread which could go on for some time since the dimension of music notation has been added. However, there are some loose ends to tie up before returning to my mainline interest - to explore hooking up Scribus to an external toolchain.
Lilypond's tag line at the end of the file is annoying and clearly undesirable, but I think that there must be a switch to turn it off instead of having to crop every file.
I have read somewhere that this can be removed by registering as a user with LilyPond.
I would delete this footer actually seen at the bottom of the SVG file. I now see that there is no need to crop it in Inkscape other than removing white space in the produced page. But even that cropping can be done at SVG file level.
You can also tweak SVG content and see the changes in the SVG viewer panel.
This video I followed shows “slur shapes” being tweaked in Denemo.
https://vimeo.com/64408182Inkscape can also be used in command line mode to tweak objects and I will explore this later. (See Process Pallette below)
One note of caution. Such tweaks in the end images do not reflect back into the original markdown source and it would be better to learn to tweak at markdown level, and not at SVG level. This will guarantee the integrity of your workflow should you need to reverse any steps and later recompile your markdown.Now, I think it will probably take me a year to get really up to speed with Lilypond, and by that time perhaps you will have your Markdown-to-Scribus pipeline in place.
That is a reasonable timeframe for your book project. I hope to develop the Atom-Scribus pipeline rather sooner for my own purposes. I will release that after testing. This exercise in music notation does help as a test data set.
Atom itself is more difficult to get simply because it has a bewildering number of capacities
That is true and the trick is to vet the library of packages to see what mix might apply to each user's workflow.
I realise that there are different classes of Scribus user following this forum. Some are authors only who do not wish to dabble in programming and some are authors and developers confident to expand their toolbox. Perhaps when posting questions the original poster (OP) should be asked to give a profile to avoid receiving deep technical replies.
The DOS command
apm list is useful. Explore the “featured” packages in Atom.
In your developing project there will be many points where you put an action or tweak "on hold" for another day. I found the package TODO to be very useful for the purpose of coming back to reminders embedded in each project file.
Basically you can drop a trigger phrase inside any markdown file and this package will hunt through your files to locate all // TODO statements. There are many found in LilyPond snippets repository, which TODO picks up.
Here is an example:
// TODO: must tweak this score before publishing
I was interested to find that I can run "apm install *package*" from the command line without Atom being open.
apm is alias for Atom Package Manager which manages all Atom assets through DOS command line.
https://github.com/atom/apmIf you now run the command
apm --help you will see a list of other options.
for example run
apm help <command> to explore any other option before using.
apm help featuredI am inclined to go ahead and convert the database that exists, because I can't think of anything important to me that is likely to be in it.
Yes, I agree and think that this message will clear up after you start using project-viewer.
But if you are concerned about corrupting your future project work you should start thinking about a project backup strategy so that you can fall back to earlier project states, including Atom configuration files which might be edited over time.
This explains backing up .atom.
https://discuss.atom.io/t/how-to-backup-settings-packages-and-every-thing/42887But you will also need to backup your ~/Atom-repo/ contents if you have centralised your project files there as suggested earlier.
There are advanced backup tools which only backup intermediate changes.
I am just starting to learn about Atom backup tools. If the project is important perhaps creating a private git account or Dropbox account might be prudent and then syncing your local project file with the remote content.
https://discuss.atom.io/t/how-to-backup-settings-packages-and-every-thing/42887I have a shortcut to the old DOS command line window
That requires jumping out of Atom world. There is another useful Atom Community Package
terminal-tabwhich launches a terminal inside Atom (location can be set in package Settings).
It is always a good idea to become familiar with these Settings after installing any new package.
terminal-tab opens by default below the editor panel.
===========================================
Process Palette PackageEdit: I came back to read this section again and decided I needed to edit it since it is tricky package to use for the first time user.
While terminal-tab is useful for one off commands, a much more comprehensive package for building a library of custom commands is
process-palette.
https://atom.io/packages/process-paletteThis package allows a custom library of shell (or DOS) commands to be built up by the user. This will come into use when we learn later that there is more to lilypond than just the basic package lilypond:compile. Indeed, I was surprised that the Atom package lilycompile has not (yet) been extended to take full advantage of the LilyPond commands available.
The lilycompile package README.md does explain that it is a single command package.
“Comes with one configurable command, lilycompile:compile (ctrl-alt-l), which only triggers in .ly files.”If you inspect
lilycompile Settings > Binary there is only one command available.
Default: lilypond
I searched my Linux filesystem looking for the pattern bin/lily
and I found these (all command line executables in bin folder):
/usr/bin/lilymidi
/usr/bin/lilypond
/usr/bin/lilypond-book
/usr/bin/lilypond-invoke-editor
/usr/bin/lilysong
Paths for Windows will differ.
Now we already know that lilypond converts *.ly files to *.svg (or pdf, jpg, ps).
This is the single command used by lilycompile package.
But I have learned from browsing the LilyPond site that
lilypond-book converts *.lytex files (not *.ly files) into merged text and scores as a "lilybook" as explained here.
http://lilypond.org/doc/v2.19/Documentation/usage/an-example-of-a-musicological-documentI do not see that it is an easy process to extend the lilycompile package to leverage lilypond-book. Instead I decided to use package
Process Palette to exploit the full scope of LilyPond commands.
Running this example ...
http://lilypond.org/doc/v2.19/Documentation/usage/an-example-of-a-musicological-documentI read that the command to run is ...
lilypond-book --output=out --pdf lilybook.lytexIn command terminal this should compile lilybook.lytex as pdf.
However in Atom the command must be changed to run the file in focus in editor which is defined by the Atom variable {filePath}
lilypond-book --output=out --pdf {filePath}Navigate to Packages > Process Palette > Settings
We read that we must edit process-palette.json to create a library of custom commands.
Note: In the lilybookexample there is a line referring to screech-and-boink.ly
Comment out this line with a % at start of line
to avoid errors in compilation.Now we require to add a custom command to compile the file lilybook.lytex
Navigate to Edit > Configuration > Settings > Packages > Process Viewer > Toggle.
A Process Palette window will appear underneath the editor centre window.
Click on “Help” button at top (resembles a cog wheel).
There are two options seen:
- ~/.atom folder for global commands [Doit button]
- root of any of your project folders for project specific commands [Doit button]
Clicking on [Doit button] places a process-palette.json in either global location or local project location.
After loading a configuration file the command Process Palette: Reload Configuration is run to load it.
The list of Process Palette commands can be seen by launching Command Palette [Ctrl+Shift+P].
Or you can go to Packages > Command Palette > Toggle .. and type Process Palette.
...
This lists all the available Process Palette commands.
Choose Process Palette: Edit Configuration
...
The
Graphical Editor to add commands might be tricky to spot at first usage.
When the Process Palette panel appears there is a Global title with a list of commands underneath.
In any command definition starting from the left is
a run button
an edit button
and then the name given to the command.
Click on the edit button and the editor appears above with title Global Commands.
There is a list of created custom commands (there will be at least one example on first usage of package).
Click on "add" and a GUI pops up for the custom command creation.
General
Namespace: process-palette
Action Name: we might specify here ... lilybook-compile-pdf
Shell Command: we write here the command to be run
Working Directory: we write here the working directory
Menu: optionally the command might be added to Menus
The completed custom command will appear under Global Commands.
This is the basic first test command inserted to experiment with lilybook (we will learn later that this command needs to be expanded to tidy up surplus files created in /out folder during compilation).
lilypond-book --output=out --pdf {filePath}
Now we can create a lilybook.lytex file, focus on the file and with the Process Palette window viewed underneath select command: Process Palette: Lilybook Compile Pdf
and run process.
The command output will show as in a terminal.
To go back to Process Palette panel click on the button with three horizontal bars at top
The compiled output files are placed in an /out directory within the project root folder.
Reading the guide here ...
http://lilypond.org/doc/v2.19/Documentation/usage/an-example-of-a-musicological-documentunder Processing, the command
pdflatex lilybookhas to be added to the original command to clear out unwanted files.
I ran that command on the /out folder and the outcome is lilybook.pdf.
Click on the created pdf file and we see them in pdf-view.
We can also delete the entire /out folder to purge all experiments and re-compile to see it being reinserted.
This is what is created in configuration file:-
{
"namespace": "process-palette",
"action": "lilybook-compile-pdf",
"command": "lilypond-book --output=out --pdf {filePath}",
"arguments": [],
"cwd": null,
"inputDialogs": [],
"env": {},
"keystroke": null,
"stream": true,
"outputTarget": "panel",
"outputBufferSize": 80000,
"maxCompleted": 3,
"autoShowOutput": true,
"autoHideOutput": false,
"scrollLockEnabled": false,
"singular": false,
"promptToSave": true,
"saveOption": "none",
"patterns": [
"default"
],
The summary is that we now have a powerful package to extend Atom by adding custom commands. This will come in handy for many command line jobs such as running lilypond, lilypond-book, and pandoc commands.
===========================================
Concluding:There is a continent of Packages to explore in Atom framework and for a newcomer (particularly a non-developer) early returns should not be expected.
But as you wrote here ..
http://forums.scribus.net/index.php/topic,3021.0.html"Slow, maybe, but you know, water wears away the stone".
Atom is a diamond tipped tool to sculpt the stone.
Good luck with your projects. The test case has proven to be interesting.