Scribusoid

Author Topic: Suggestion: a good start for footnotes Insert > Char > Footnote#  (Read 748 times)

dragonfly

  • Jr. Member
  • **
  • Posts: 79
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #15 on: September 07, 2018, 07:09:20 pm »
I will give a fuller reply later. But in the interim i reply to this point.

Quote
Apparently it exports in a lot of possible formats, so for instance I could output HTML for practice and view it in the browser while I am just practicing the merge.md routine. I got the idea that it might even conceivably bypass Scribus by using some other format. I am just playing with it now.


I have dropped usage of package project-manager and have installed instead project-viewer.


The preview of HTML intermediate content (pre Scribus) is much enhanced if you install these packages to support your workflow.


atom-html-preview
atom-live-server
file-icons
project-viewer
tool-bar
tool-bar-markdown-writer
zentabs
tidy-markdown
markdown-table-editor
counter
autosave-onchange


Finally, I understand that Atom might be a daunting framework to learn.

It would be remiss to exclude other options for external composition of content to be piped into Scribus.
In addition to the usual editors (Word, LibreOffice) I would try ...

Scrivener
https://www.literatureandlatte.com/scrivener/overview

and a more modest editor

CherryTree
https://www.giuspen.com/cherrytree/

I use CherryTree extensively.

In your scenario you can create CherryTree nodes, subnodes, subsubnodes.

You can export all your nodes (see topbar) as PDF, HTML or as a cherrytree xml file.

So you have a full toolbox.

jack_cat

  • Newbie
  • *
  • Posts: 24
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #16 on: September 08, 2018, 06:38:26 pm »
I fear we are getting off topic in focusing on Atom instead of Scribus, and apologize to the forum generally. For me, this topic appears well worth pursuing at the moment.

At this moment I cannot grok Dragonfly's latest post, have to wait till after the weekend, as I have a workday.

To continue: It turns out that there is a Lilypond package for Atom. This offers the (albeit only a faint glimmer at the moment) possibility of bypassing my antique music notation software exported to .png and tweaked in Gimp (my production method for musical examples to date) and replacing it with Lilypond code generated in Atom and possibly using the /include or /merge routines (however that will work) to embed the examples in the doc directly. While I have seriously resisted learning Lilypond, which is a text markup language for music scoring, I am currently, as a result of this conversation, re-evaluating for the umpteenth time my entire work flow. As I did many years past successfully learn HTML sufficiently for my own purposes, and am now learning Markdown (sort of, so far), - and observing that programmers seem to not think twice about learning and using multiple programming and scripting languages, which is evident from the structure of Atom - using Lilypond is on the table again in a new context. The footnote issue has been a catalyst for this, we'll see where it goes.
« Last Edit: September 12, 2018, 06:09:44 am by jack_cat »

dragonfly

  • Jr. Member
  • **
  • Posts: 79
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #17 on: September 08, 2018, 10:05:20 pm »
I don't consider this thread, which consider practical examples of writers' workflows, to be too off topic.
In fact practical examples do help me to think through my own workflow for applications which require (for example) mathematical expressions as in LaTeX.

My own thinking is that Scribus will always be present in the toolchain to address the final stages of publication. But it will be the last link in the toolchain before the print stage.

Scribus has openly declared some weaknesses as a mainline story editor or composer. The trick is to find the optimum boundary between external content management (Atom) and layout management (Scribus) and to create a pipe between the two.

I was unaware of Lilypond but after reading one article ...
https://rudigermeyer.com/words/diving-into-the-lilypond
I can see that it fits nicely into the Atom framework we have discussed.

So we now learn that the end document is to contain music scores.
So far. so good.

Being inquisitive by nature I explored LilyPond here.
http://lilypond.org/

Quote
LilyPond is a music engraving program, devoted to producing the highest-quality sheet music possible. It brings the aesthetics of traditionally engraved music to computer printouts.

In fact I found that lilypond 2.18.2 is available in my Ubuntu Software Centre so I simply installed that package suite using Synaptic Package Manager.

lilypond
lilypond-doc.pdf
lilypond-doc-html
lilypond-data
lilypond-doc-pdf-<different languages>

python wrappers

The full 20 yards.

Switched to learning about LilyPond ...

http://lilypond.org/doc/v2.18/Documentation/learning/index.html

Explored packages for compiling Lilypond scripts:

https://atom.io/packages/AtLilyPond      atlilypond

https://atom.io/packages/lilycompile      lilycompile

After Window:Reload I create a test file example.ly from LilyPond templates,

Code: [Select]
\version "2.18.2"

melody = \relative c' {
  \clef treble
  \key c \major
  \time 4/4

  a4 b c d
}

\score {
  \new Staff \melody
  \layout { }
  \midi { }
}

The syntax is coloured in Atom, and I can use Lilycompile to compile two files which appear in a tmp folder:
example.pdf
example.midi

I see that there is an Atom PDF View package.

https://atom.io/packages/pdf-view

Code: [Select]
apm install pdf-view
Window:Reload

And now .. I can preview the compiled Lilypond example.ly file within Atom.

It remains to feed this PDF into the document production pipeline.

Pandoc has a PDF > image filter so my next step will be to explore converting PDF to image (although Scribus can import PDF).

Another fragment I wrote in another thread explained that *.sla documents can be managed in a nosql database, since they are xml files.  But that would be required only if large collections were being pulled down into Scribus and printed and in some ways takes on Indesign et al cloud capability.
« Last Edit: September 08, 2018, 10:08:47 pm by dragonfly »

jack_cat

  • Newbie
  • *
  • Posts: 24
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #18 on: September 11, 2018, 09:06:42 pm »
Dragonfly, I am way behind on catching up in my understanding and implementation of the Atom workspace and the info in your recent advisories. This will be a work in progress.

For the record, this entire Atom-workflow proposal does nothing for my existing project, which is a complete draft requiring revision; during that revision I will have to re-number the footnotes, the reason for my original post; it would be crazy to re-format all of that material, and a re-format could also be done in OO using its footnote function, then putting text and notes back into Scribus. I will almost certainly re-number the footnotes (of the current project) one at a time instead of redoing from scratch in another program or format. Thus my original idea that Scribus could usefully offer a mere consecutive footnote numbering function, without necessary tying it dynamically to the notes themselves, still appears to be valid, even though this will not occur soon and maybe not ever.

However, at the moment, Lilypond, the music notation markup language, has become the real draw of this exploration - on its own merits, but also because of being able to integrate it with Atom, and because I have another project waiting in the wings for which the current one was intended to be, in part, a trial run of a software work flow, and which will require hundreds of new graphic examples in staff notation. According to all claims and reviews, Lilypond has superior output to wysiwyg music notation programs, at the mere cost of learning its syntax. (A small black mark is that it uses the obsolete Helmholtz pitch notation instead of the new standard, oxymoronically called Scientific Pitch Notation, but that's livable.) Then the possibility of a streamlined compilation process in which each text block is closely linked with its graphic example is very attractive, and if this can be automated so that tweaking the Lilypond code updates the final output without editing the output graphic again in Gimp (always required with the .png output from my old program) then I will save myself a lot of detail work as well as the generation and management of an extra layer of graphical source files.

But in the meantime I have a learning curve in process. I don't know how long this might take.

Thanks, over and out for now.
« Last Edit: September 12, 2018, 12:08:31 am by jack_cat »

jack_cat

  • Newbie
  • *
  • Posts: 24
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #19 on: September 11, 2018, 10:40:21 pm »
tidy-markdown:
*****************
Failed to install tidy-markdown because Git was not found.
The tidy-markdown package has module dependencies that cannot be installed without Git.
You need to install Git and add it to your path environment variable in order to install this package.
You can install Git by downloading, installing, and launching GitHub for Windows: https://windows.github.com
Run apm -v after installing Git to see what version has been detected.
***************

I have installed GitHub and it has written itself into the PATH, but I still get this error when installing tidy-markdown.
I don't need tidy-markdown yet so this is not yet an obstacle.

As far as Scrivener and Cherry Tree, I will put those suggestions aside for now; I have enough on my plate.

Now the good news: I have installed Lilypond, created a test.ly file from inside Atom, and compiled it to a PDF
using lilypond-compile from within Atom, and using Atom package pdf-view, can see the file inside Atom. This is
all a major step forward. (This required that I put Lilypond in the PATH myself and restart.)

The routine which I now wish to master is to create a file caption.md with some text and a footnote in it, along with a musical example example.ly, merge these two files and push them to Scribus while stripping out the footnote to another file which will eventually go into the file footnotes-merge.md and be pushed to another Scribus file.

However, I don't know how to do all this yet. So, for the moment, I am going to work a little on learning Lilypond.
jackcat
« Last Edit: September 12, 2018, 12:07:33 am by jack_cat »

dragonfly

  • Jr. Member
  • **
  • Posts: 79
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #20 on: September 12, 2018, 12:14:57 am »
I understand that learning a new framework is a significant step.  I will only add that terms such as Helmholtz pitch notation  and Scientific Pitch Notation are double Dutch to me. My last efforts at writing music on a computer was very early in my career when, supporting a hi-fi expert, I wrote such a program. In those days the compiler was installed from paper tape and a crude notation language generated bitstream to drive a prototype digital to analogue converter to make crude musical tones.

Now many years later I am learning about LilyPond and also MusicXML.

I find that scores have much in common with mathematical expressions written in LaTeX notation.

There is also the linking of mathematics and music I have read.

http://www.ams.org/publicoutreach/math-and-music

By coincidence your music project challenge has proven to be an excellent example to shakedown the Atom framework I have drawn together.

Considering your task at hand I would suggest considering three parallel workflows.

First, I suggest carry on using Scribus as you have in the past.

Second, I suggest having a workflow to learn more about Atom and how it can be used to compile LilyPond scripts to create assets.  Keep Scribus out of this experiment for now.  You can always manually import into Scribus assets created by this workflow.

Third, in the longer term when I have finished my work developing Atom to Scribus pipe you can try that.

Returning to the second option, the Atom framework, I have tried a number of packages to optimise the workflow and have homed in on those required for LilyPond. I have also learned how to easily convert LilyPond scripts to musicxml format.

There are converters which convert document formats to other formats. See Pandoc.
There are converters which convert file types to others.
Similarly there are converters for converting music notations.

Here is one addressing the problem you posed.

https://futuremillennium.github.io/Helmholtz-Pitch-Notation-Converter/

I will go back through my earlier writing and draw a red line through packages which have been replaced by better packages, after testing.

It is very easy to inspect the inventory of Atom packages already installed. Just run the command:

Code: [Select]
apm list
Some words of immediate advice regarding Atom usage:

Install the theme atom-material-ui
install the package project-viewer   (not project-manager)
install the package svg-viewer svg-preview

Now assuming that you have installed the packages AtLilyPond and lilycompile
navigate to lilycompile package settings and change the File Type: from default PDF to SVG.

It is then easier to embed an SVG file into markdown using the @import statement.
So in short switch from PDF to SVG output from lilycompile.

Just to give you some encouragement, attached is a short clip showing merge of text and music score.

And there is no need to play with git just yet. Stay local.
« Last Edit: September 12, 2018, 01:43:25 pm by dragonfly »

dragonfly

  • Jr. Member
  • **
  • Posts: 79
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #21 on: September 12, 2018, 12:28:39 am »
Postscript

I forgot to write that there is another way of previewing SVG produced by lilycompile.
In the /tmp folder which is created (containing score.pdf or score.svg) create a blank file merge.md.

In this file simply write:

@import "score.svg"

and you can preview the compiled score compiled as SVG (not PDF). Note that you cannot easily import PDF in the same way so this is why I recommend lilycompile settings File Type: be set to SVG.
Do focus on studying project-viewer Features since you can create multiple "virtual projects". For example I downloaded the LilyPond Snippets Respository files and placed these snippets in a local folder:

~/Atom-repo/music/lsr/


jack_cat

  • Newbie
  • *
  • Posts: 24
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #22 on: September 12, 2018, 06:08:26 am »
"Install the theme atom-material-ui"
I have done this and been through its settings. Only I cannot find a setting for the font color, which is almost too pale to read.

Now, in Atom, there is a brief message that flashes up (and then disappears) when I open Atom, saying something about a database. If I click on this I get a flag that says: Local database already found! Are you sure you want to lose it?
Now, I don't know anything about a local database... but I hesitate to click through such a warning message until I know what is going on.

Project viewer is installed. I have not yet done anything with it - it says "no projects". What is the first thing I should do with it?
I did not find svg-viewer. I installed svg-preview, which works.
Thank you for telling me how to set the switch for lilypond-compile to make svg.
I used lilypond-compile to generate an svg and viewed it with svg-preview.
Lilypond's svg files have an added benefit I had not anticipated: you can open them with Inkscape and move every object around to suit, thus it offers a great deal of tweakability even for newbies, although this is an extra step which should probably be unnecessary because the Lilypond language is supposed to be very precise although with many complexities. However, it offers a welcome alternative to trying to tweak the code to get some precise result, in a pinch (which I can certainly imagine), and it beats cutting and pasting in Gimp.

Given your example and instruction so far, I am pretty sure that I will have no trouble generating short documents containing md text and music notation.

Re: Helmholtz vs SPN pitch notation - this is not an issue. I was just expressing myself. Helmholtz notation is harder to read when there are 3 or 4 diacritical marks as in c'''' . Middle C = SPN C4 = Helmholtz c', but Lilypond uses the numbers 1-2-4-8 as note-attributes for time-duration values instead. The octaves of both pitch notation systems begin with C at the bottom and B at the top, instead of starting with A as might be thought logical, and have a direct correspondence, not like lunar & solar calendars. No conversion table is necessary because they are both easy to memorize, SPN being a little more obvious.


dragonfly

  • Jr. Member
  • **
  • Posts: 79
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #23 on: September 12, 2018, 01:04:41 pm »
Quote
"Install the theme atom-material-ui"
I have done this and been through its settings. Only I cannot find a setting for the font color, which is almost too pale to read.

I agree that the default font colour is perhaps too pale. 

Now go to Preferences > Settings > Theme > Atom Material >  and look at Syntax Theme.  It may be that your setting is “One Dark” (as is mine) which does indeed render overly pale text. Experiment with other Syntax Themes in the list.

I remember experimenting and adding the packages .. monokai-seti and seti-ui

apm install monokai-seti
apm install seti-ui

and set Syntax Theme to Monokai Seti.

Of course you can try different settings and there is a link at top of Theme Settings panel which reads .. “You can also style Atom by editing your stylesheet”.


Quote
Local database already found! Are you sure you want to lose it?

I have not seen that message. To search I simply used this google search pattern ... (learn about Advanced google search syntax, it can be useful).

Atom NEAR "Local database already found! Are you sure you want to lose it?"

This thread popped up.
https://discuss.atom.io/t/local-database-corrupted/51495

You can try temporarily launching Atom in safe mode which disables all installed packages.

atom --safe

Check if the message does not appear in "Atom safe mode". If so then it is an installed Community Package generating it.

However the discussion thread above points to package project-viewer which I suggested that you install.

There is a local database within project-viewer and the message might refer to that if it is empty or has not been setup to configure projects.

Packages > Project Viewer > Utilities > open database File

This opens ~/.atom/project-viewer.json which contains any projects setup previously.

Here is further discussion on this warning message.

https://github.com/jccguimaraes/atom-project-viewer/issues/115

I would try just toggling the Project Viewer panel on and off to clear the message.


Quote
Project viewer is installed. I have not yet done anything with it - it says "no projects". What is the first thing I should do with it?

i do urge you to persevere with this package. It will save a lot of time in navigating through many folders and files, and goes beyond the navigation features in Tree View on the left.

Project Viewer will be valuable later in navigating through various chapters in a project.

Basically, it allows you to define “virtual projects” which on clicking automatically populate an index in the left Project panel (Tree View).

To get started launch the Project Viewer panel from Packages > Project Viewer > Toggle Panel.

There are several methods available to define "virtual projects".

In the Panel you can right click to see:

Create new group...
Create new project...

Start by having a centralised root repository for all your project files although they will be in different sub-directories.

i create ~/Atom-repo/ as my root repository.

Now using your Windows File Manager create as many sub-directories as you wish to manage your projects which will grow in time.

Let us create ~/Atom-repo/lilypond/ .. as a “physical project”
(you will have to use Windows path notation, the above being Linux path)

Now go to Project Viewer Panel, right click, Create project...

The PV editor will appear.

Under "Name" .. type the project name (which need not be the name of your target folder).
Let us name the virtual project as "music".

Note that the create button is at the top of PV editor and after typing configuration settings you will  create a project to be seen in PV Panel.

After defining project name, scroll down to Paths.
Add project folder(s) - [ ? ] each path is a project?

We will keep it simple and simply click on Add project folder(s)
and type in the path to the "real project" folder
~/Atom-repo/lilypond

Now click on Create at top of form.
You will see "music" appearing in the Project Viewer Panel to the right.

In summary we can have a "virtual project" named “music” launching “~/Atom-repo/lilypond” in the left side Project Panel. Or you can name the project "lilypond" if you prefer to match virtual and physical project names.

There are advanced features such as putting projects into groups, or nesting groups. but stay with just projects for now.

Another project might be “MyBook” pointing to your chapters.  And so on.

Quote
Lilypond's svg files have an added benefit I had not anticipated: you can open them with Inkscape and move every object around to suit, thus it offers a great deal of tweakability even for newbies, although this is an extra step which should probably be unnecessary because the Lilypond language is supposed to be very precise although with many complexities.

I did consider mentioning Inkscape as SVG editor in the toolchain but thought that this might be too much to take in.

When lilycompile creates an SVG file it places a footer at bottom of compiled page which creates quite a bit of whitespace when embedding the image into markdown. I used Inkscape to move the footer object then cropped the image. One point to watch when cropping is to always use the same width of cropping container, otherwise different scaling might creep in.

Quote
the Lilypond language is supposed to be very precise although with many complexities.

The LilyPond application does indeed have a rich command line vocabulary. One should remember that all of the operations we are discussing can be executed through command line and running shell scripts without need for Atom lilycompile which simply calls LilyPond through command line. But Atom allows viewing and editing of content.


« Last Edit: September 12, 2018, 01:08:02 pm by dragonfly »

jack_cat

  • Newbie
  • *
  • Posts: 24
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #24 on: September 13, 2018, 07:02:08 am »
The font color thing in Atom I have worked out - just a brain-dead moment.

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. There are switches to suppress several other automatic formatting features built into the code, such as turning off the automatic time signature.

I have high hopes for being able to output examples in staff notation which are all of a standard readable size and to avoid the scaling issues I have had with high-res .png files which are very hard to scale consistently inside Scribus. (It is annoying that Scribus's grid is hidden behind my .png images, if it were possible to make it appear on top of them it would make consistent scaling easier.)

For Lilypond, working inside Atom seems to be a Very Good Thing: today I had an .ly file in one tab, the .svg code showing up in another tab, the svg rendered graphically in another tab, and error messages popping up from lilypond-compile as I typed, all in real time. I don't think I will need all this feedback but it is very useful to see everything that's going on at this stage.

Now, I think it will probably take me a year to get really up to speed with Lilypond, and by that time perhaps you (dragonfly) will have your Markdown-to-Scribus pipeline in place. (I see that such a project was proposed for Scribus in 2013 and is dead in the water.)

Markdown looks very easy. I see that I can use Pandoc to convert to HTML and import to Scribus - I have not done this yet, but I have some experimentation to do before I ask more questions about that, and I haven't acted on all the info that I already have.

Atom itself is more difficult to get simply because it has a bewildering number of capacities but there are many tutorials on youtube and I don't think that I will have to bug you about picayune details any more. I was interested to find that I can run "apm install *package*" from the command line without Atom being open. I have a shortcut to the old DOS command line window because I still use DOS now and then to sort text files.

Now I am going to look at Project Viewer per your last post. Thank you for pointing me to discussions about the database. I 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.
thanks
jack
« Last Edit: September 13, 2018, 06:10:24 pm by jack_cat »

dragonfly

  • Jr. Member
  • **
  • Posts: 79
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #25 on: September 14, 2018, 12:29:25 pm »
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.

Quote
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/64408182

Inkscape 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.

Quote
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.

Quote
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


Quote
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/apm

If 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 featured


Quote
I 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/42887

But 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/42887

Quote
I 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-tab

which 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 Package

Edit: 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-palette

This 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-document

I 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-document

I read that the command to run is ...

lilypond-book --output=out --pdf lilybook.lytex

In 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-document

under Processing, the command
pdflatex lilybook
has 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:-

Code: [Select]
    {
      "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.
« Last Edit: September 14, 2018, 08:23:35 pm by dragonfly »

jack_cat

  • Newbie
  • *
  • Posts: 24
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #26 on: September 14, 2018, 09:10:51 pm »
That last post will take me some time to digest.

Here I offer some comments:

#### The Paradigm Change of our time: Print vs HTML & Digitalization in general

Dragonfly's proposal for a pipeline from markdown language to Scribus raises the issue of the current paradigm change from paper to digital media, which every Scribus user must be aware of, I should think.

For 500 years paper publishing was lucrative. Paper sheet music sales were an income stream for musicians from 1500 on, reached a peak in the late 19th century, crashed with the advent of recording technology and have been nearly destroyed by the internet and at the very least must be marketed on the web.

By digitalization the value of a musical recording has been recently devalued a hundred-fold in the shift from CDs to MP3 download. A few years ago an independent musician could sell a self-produced CD for a 500% markup over the raw material, now we _pay_ for entry to the Spotify market where a listener download pays an infinitesimal trickle-down percentage.

A legacy book which I am studying is in the digital commons and available free, whereas the modern English translation, out of print but not out of copyright, is up for $1200 USD on Amazon.

An author who goes to the trouble of creating a print book using Scribus faces (1) being lost in the competition, (2) the likelihood that someone will scan it and post it on Scribd.com available almost free, (3) the fact that the same material could be formatted in HTML and published on the net for free, or sold digitally.

So, a person such as myself, thinking that I might sum up my life's work with a print volume fit to sit on a bookshelf alongside the classics (ha! right), must accept that this is a vanity project.

The open source model which is so apparent behind the proposed .md to Scribus workflow suggests that the end product might as well be free and open source, and published on the web, and so why go to print or even to printable format at all (i.e. Scribus) in my case? Markdown is already a pipeline to the web, it's primary designed purpose, and to create from it a secondary pipeline to Scribus also runs up against the McLuhan "the Medium is the Message" factor, which I can see in front of me as I type this in the Atom editor, which is alien to my thought process of the last 40 years - it offers, even full-screen, only a narrow window into the work in hand, and the Markdown Preview flows into the size of its tab, showing only content and not format.

Because "the Medium is the Message", I think of my print project in terms of a series of two-page spreads, offering a series of 17" by 11" workspaces which must each communicate as complete an idea as possible, ideally without a page turn in mid-thought, so as not to require a reader studying the material to flip pages back and forth between graphical example and explanation, being open on a music stand in front of a person whose hands are busy playing an instrument. This is different from a novel, which can be poured into Scribus as into a container, and also different from the new model of the foot-pedal-controlled scrolling PDF reader; my more traditional concept is dependent on graphical layout. At one time I contemplated doing it as a series of Illustrator files (now it would be Inkscape as I have migrated). I believe that this is also a factor for the Scribus User who recently posted about a projected animal encyclopedia.

For such a use, the proposed pipeline will need to include a quick and painless zoomable preview-as-print function, otherwise the user will be essentially working in the dark. I see that Atom can do this fairly effectively for Lilypond already, and that therefore this capacity is not out of the question. Even in Scribus, however, I must frequently export to PDF to get a clearer view, and even that is not sufficient, because the only real test, allowing a truly critical overview, is a draft print on paper, because on-screen content does not reveal many errors and my eyes play tricks, seeing what I think I have written or drawn and gliding over many errors. Even this file did not reveal several errors until I exported it to HTML and opened it in the browser.

Anyway, as I sit here contemplating, and experimenting with, the components of the proposed Atom > Markdown > Lilypond > HTML > Scribus workflow, there are two issues that arise, one practical and one more philosophical:

1. Practically, the difficulty of creating content in one medium (Atom etc) and then pouring it into a container which is likely to prove to be a procrustean bed for that content (Scribus as a container designed for the reception and formatting of lineal content such as a novel, to put the worst face on it). That is, the pipeline appears to require a certain fluidity and homogeneity of the content in order to flow; insufficiently-fluid content is likely to be sliced, diced and homogenized.

2. Philosophically, the questioning of the entire model of "print" and the use of Scribus, vs. surrendering to the tenor of the time and publishing either in HTML, or e-reader viewable PDF, thereby relinquishing the idea of selling paper books at all.

I offer no conclusions. I am going to spend some reasonable amount of time experimenting with my re-designed work flow, and consider it worth the time; as I said, Lilypond alone is a fairly long-term project. Atom is a very interesting tool, I will also require some time with it to really evaluate it.
thanks
jack_cat

dragonfly

  • Jr. Member
  • **
  • Posts: 79
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #27 on: September 14, 2018, 10:33:01 pm »
Certainly adds more food for thought. I can see that "music flow" (reading music sheets while playing music score) adds another dimension to the design of the workflow. I am neither a musician or composer.

Perhaps you could “emulate” the display of music sheets by using presentation techniques.

Within Markdown Preview Enhanced there is a documented Pandoc option to specify in markdown to create a presentation (look at reveal.js and beamer) instead of printed PDF.  You simply add frontmatter (YAML) to produce a two page presentation of music sheets which can “screen flip”.

https://github.com/shd101wyy/markdown-preview-enhanced/blob/master/docs/presentation-intro.md

Thus, I have a vague idea that you could emulate music sheets being viewed and flipped over, while the musician continues to play the score.

The workflows in reading a music book and playing music from a digital presentation present different challenges.

Some interesting links you might follow up:-

https://www.4barsrest.com/articles/2013/1413.asp

https://www.timbercroftpublishing.com/

And to avoid your works being ripped off study Digital Rights Management.  There is software available (actually only in Windows) which stamps your end product and embeds digital signatures.

dragonfly

  • Jr. Member
  • **
  • Posts: 79
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #28 on: September 15, 2018, 12:30:32 pm »
Here is another tool .. Zotero .. to bear in mind in future for adding/importing citations, bibliographies (e.g. composers) into your markdown documents.  My recommendation is to download the "standalone" Zotero version plus the Zotero connector extension which is installed into a browser. Then when you read a music item or composer biography you can click on the save to zotero icon in browser bar to add item to your collection.

https://forums.zotero.org/search/?Search=music

Open a free account and create your own collection of music research and citations can be added into markdown.

Your Zotero collection can be private or public. You keep a local collection and sync it with your account on Zotero.

I will be adding this option to the Atom framework.

This takes you into the world of digital libraries and how major libraries categorise music.

dragonfly

  • Jr. Member
  • **
  • Posts: 79
  • Karma: 0
  • Scribus User
Re: Suggestion: a good start for footnotes Insert > Char > Footnote#
« Reply #29 on: September 17, 2018, 01:59:39 pm »
Quote
I think of my print project in terms of a series of two-page spreads, offering a series of 17" by 11" workspaces which must each communicate as complete an idea as possible, ideally without a page turn in mid-thought, so as not to require a reader studying the material to flip pages back and forth between graphical example and explanation

I am writing a separate tutorial as I again walk through the installation of an Atom framework from scratch, recognising that there will be different types of user.

One tip I will pass on here.

You will benefit from setting up "virtual desktops" on your PC. In Ubuntu I can create a grid of virtual desktops and launch multiple instances of Atom windows. Each window instance can then be moved to a "virtual desktop" Thus, you can be editing and testing markdown in one virtual desktop and previewing your rendered music score in other virtual desktops.

You might emulate your envisaged 17" x 11" music sheets across two dedicated virtual desktops.

Summarising (using virtual desktops or workspaces instead of tabs which can become cluttered in a small screen):

virtual desktop 1 - writing markdown, previewing notes, pages, chapters (Markdown Preview Enhanced)
virtual desktop 2 - previewing LilyPond compiled SVG
virtual desktop 3 - previewing left hand page music score (8.5" x 11" ?)
virtual desktop 4 - previewing right hand page music score (8.5" x 11" ?)
... and other desktops/workspaces as required

In Ubuntu my workspace switcher is setup to appear in bottom Docky status bar.

Further tweaking this idea ...

After further experimenting with Atom I see that any Atom window can be toggled to full screen display via View > Toggle Full Screen (F11).
This allows the two (or more) music score workspaces to be navigated without the clutter of menu bars at top of screen.  A separate command could load different music score pairs into the two music score workspaces.
page1+2, page3+4, page5+6, page7+8 .. and so on to end of composition.

Navigate workspaces grid by [Ctrl+Alt+Arrow Right, Left, Up, Down].
And to view the thumbnail workspace grid use [Superkey+S].

All that is needed now is to hook up a hands free USB footswitch to navigate through these workspaces - while playing the music composition.

End of brain storm.


« Last Edit: September 18, 2018, 11:42:11 am by dragonfly »

 

palmate