Hello all,

Along the lines of br. Innocent's recent tip (a great tip, by the way),
I have a workflow-related tip that I'd like to share.  This works in my
environment under Linux.  I realize I'm probably in the minority, but
perhaps some portion of this tip can apply to other work environments as
well.

This is how it works:

Typically a job is made up of one main .tex file and one or more .gabc
files.

In general, one would use the gregorio executable to convert the .gabc
files into .tex files which are then included into the main .tex file.

Tip I: Automate this using a Makefile.  For this example, lets say my
main .tex file is job.tex and my .gabc files are score1.gabc and
score2.gabc.  My Makefile looks something like this:

| job.pdf: job.tex score1.tex score2.tex
|         pdflualatex $<
|
| %.tex: %.gabc
|         gregorio $<

(this is for GNU make; your mileage may vary)

At this point, I can simply type "make" at the command line to convert
score1.gabc to score1.tex, score2.gabc to score2.tex, and then job.tex
to job.pdf.

Now, if I make a change to any one (or all) of these files, I can simply
type "make" again to run the appropriate commands to update job.pdf.

Tip II: Use a PDF viewer that automatically rereads the PDF when it
changes.  One such PDF viewer is Evince, which is part of the GNOME
desktop environment.

This way, every time I type "make" to rebuild job.pdf, Evince
automatically reads and displays the updated file.

Tip III: Use inotifywait in the work directory to automatically run
"make" every time something in the directory changes.  The Bourne-like
shell command looks like this:

| while inotifywait -e modify,close_write,moved_to .; do make; done

(the "inotifywait" part of this command is probably pretty
Linux-specific)

At this point, all I need to do is save any of the constituent files
(job.tex, score1.gabc, or score2.gabc in this example), which will cause
the shell command above to run "make", which will rebuild job.pdf, which
will cause Evince to display the updated file.

I find this is most useful when I make final changes to my scores.

Perhaps editors like TeXworks or Notatio Antiqua do this without all the
command-line stuff, this works for me and I can use my favorite text
editor to edit the files.

Regards,
Henry

_______________________________________________
Gregorio-users mailing list
[email protected]
https://mail.gna.org/listinfo/gregorio-users

Reply via email to