Hi,
I have made some changes on my emacs lilypond-mode files to process lytex files as suggested here (http://lilypond.org/doc/v2.13/Documentation/usage-big-page#Invoking-lilypond_002dbook)... directly with: "lilypond-book --pdf file.lytex" and "pdflatex file.tex"

I'm sending the patches... Please tell me if it is ok (don't know if the shortcuts are ok to other people, for example)


I would also like to know if it would be possible to have an option, when compiling LilyPond, to change some system specific commands that are in lilypond-mode...
For example, for OSX:
"xpdf" -> "open"
"timidity" -> "open"
etc..
(OSX's "open" uses the system default app to read pdf/play midi files)


I have no idea about how to do it as I am a "newbie" in LilyPond development.. maybe creating a system specific file lilypond-mode-osx.el would be the easier way?

Thanks,
josé

PS: .lytex extension was added to lilypond-init to load lilypond-mode automatically as (I think) that latex \include can be used to organize files .. and those files with lilypond code need more the ly syntax colorizing than tex colorizing...

--
http://zepadovani.info

Attachment: binObDTxs0oxn.bin
Description: application/applefile

Attachment: lilypond-init.el.patch
Description: Binary data

245c245
<                            "book" "latex"))
---
>                            "book" "latex" "book-lytex" "pdflatex"))
364a365,374
> (defcustom LilyPond-lilypond-book-command "lilypond-book --pdf"
>   "Command used to compile lytex files."
>   :group 'LilyPond
>   :type 'string)
> 
> (defcustom LilyPond-pdflatex-command "pdflatex"
>   "Command used to generate pdf files after using lilypond-book."
>   :group 'LilyPond
>   :type 'string)
> 
442a453,454
>     ("Book-lytex" . (,(concat LilyPond-lilypond-book-command " %z") "%z" "%l" 
> "PDFLaTeX"))
>     ("PDFLaTeX" . (,(concat LilyPond-pdflatex-command " %l") "%l" "%f" 
> "View"))
487a500
>     ("%z" . ".lytex")
597a611,622
>  (defun LilyPond-command-lilypond-book ()
>    "Run 'lilypond-book --pdf' for the current document."
>    (interactive)
>    (LilyPond-command (LilyPond-command-menu "Book-lytex") 
> 'LilyPond-get-master-file)
>  )
>  
>  (defun LilyPond-command-pdflatex ()
>    "Run pdflatex for the current document."
>    (interactive)
>    (LilyPond-command (LilyPond-command-menu "PDFLaTeX") 
> 'LilyPond-get-master-file)
>  )
> 
703c728
<                                    "Book" "LaTeX"))
---
>                                    "Book" "LaTeX" "Book-lytex" "PDFLaTeX"))
761a787,788
>   (define-key LilyPond-mode-map "\C-c\C-a" 'LilyPond-command-lilypond-book)
>   (define-key LilyPond-mode-map "\C-c\C-z" 'LilyPond-command-pdflatex)
981a1009,1010
>         '([ "LilyPond-Book --pdf" LilyPond-command-lilypond-book t])
>         '([ "PDFLaTeX" LilyPond-command-pdflatex t])
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to