-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
eroux
committed
Oct 21, 2009
1 parent
f43d037
commit d276235
Showing
5 changed files
with
131 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
XML file for using gregorio inside scribus. | ||
Copyright (C) 2009 Pierre Couderc <[email protected]>. | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<editorsettings description="gregorio" icon="gregorio.png"> | ||
<executable command="gregorio-scribus.pl %dir %file" /> | ||
<imagefile extension=".pdf"/> | ||
<highlighter> | ||
<rule name="Command" regex="\\[a-zA-Z@+]+" color="#800000"/> | ||
<rule name="Command argument" regex="\\[a-zA-Z@*]+\{([^\}]+)\}" color="blue"/> | ||
<rule name="Section commands" regex="\\(?:section|subsection|subsubsection|paragraph|subparagraph)(?:[*]?)\{([^\}]+)\}" color="black" bold="true"/> | ||
<rule name="Scribus specials" regex="\$scribus_(.+)\$" color="#FF00FF" minimal="true"/> | ||
<rule name="Comments" regex="(?:(?:^|[^\\])(?:\\\\)*)(%.+)" color="#808080" italic="true"/> | ||
</highlighter> | ||
<empty-frame-text> | ||
\begin{document} | ||
\setspaceafterinitial{1mm plus 0em minus 0em} | ||
\setspacebeforeinitial{1mm plus 0em minus 0em} | ||
\def\greinitialformat#1{{\fontsize{33}{33}\selectfont #1}} | ||
\def\grebiginitialformat#1{{\fontsize{73}{73}\selectfont #1}} | ||
\redlines | ||
%% | ||
(c3) Pó(eh/hi)pu(h)lus(h) Si(hi)on,(hgh.) | ||
</empty-frame-text> | ||
<preamble> | ||
\documentclass[a4paper,$scribus_fontsize$]{extarticle} | ||
\usepackage[utf8]{inputenc} | ||
\usepackage[T1]{fontenc} | ||
\usepackage[left=0cm,top=0cm,right=0cm,bottom=0cm,nohead,nofoot]{geometry} | ||
\usepackage{gregoriotex} | ||
\usepackage{gregoriosyms} | ||
\usepackage{color} | ||
\title{Scribus-Latex-gregorio-File} | ||
$scribus_font$ | ||
$scribus_additionalheaders$ | ||
\author{Scribus} | ||
\pagestyle{empty} | ||
\setlength{\textwidth}{$scribus_realwidth$ pt} | ||
</preamble> | ||
<postamble> | ||
</postamble> | ||
</editorsettings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
EXTRA_DIST = gprocess gabc.lang gabc.xml gabc.vim README | ||
EXTRA_DIST = gprocess gabc.lang gabc.xml gabc.vim 900_gregorio.xml gregorio-scribus.pl gregorio.png gregorio.scpt pdfLuaLaTeX.engine lamed-dvipdfm.engine README |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/usr/bin/perl -w | ||
# | ||
# gregorio-scribus, a script to use gregorio inside scribus. | ||
# Copyright (C) 2009 Pierre Couderc <[email protected]>. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
use strict; | ||
|
||
my $dir = $ARGV[0]; | ||
my $file = $ARGV[1]; | ||
open(INPUTFILE,"<","$file") || die("Cannot open file $file"); | ||
my @raw_data=<INPUTFILE>; | ||
open(TEX,">gregorio-scribus-tmp.tex") || die("Cannot open file gregorio-scribus-tmp.tex"); | ||
open(GABC,">gregorio-scribus-tmp-score.gabc") || die("Cannot open file gregorio-scribus-tmp-score.gabc"); | ||
foreach my $lineo (@raw_data) | ||
{ | ||
if(defined($lineo)) | ||
{ | ||
my $line = $lineo; | ||
if(substr($lineo,0,1) eq "\\") | ||
{ | ||
print TEX $line; | ||
} | ||
else | ||
{ | ||
print GABC $line; | ||
} | ||
} | ||
} | ||
print TEX <<EOF; | ||
\\includescore{gregorio-scribus-tmp-score.tex} | ||
\\end{document} | ||
EOF | ||
close TEX; | ||
close GABC; | ||
print 'calling \'gregorio gregorio-scribus-tmp-score.gabc\'\n'; | ||
unlink('gregorio-scribus-tmp-score.tex'); | ||
system('gregorio gregorio-scribus-tmp-score.gabc'); | ||
if( -e 'gregorio-scribus-tmp-score.tex') | ||
{ | ||
system('lamed gregorio-scribus-tmp.tex'); | ||
print 'calling \'lamed gregorio-scribus-tmp.tex\'\n'; | ||
system("dvipdfm $dir/gregorio-scribus-tmp.dvi"); | ||
print 'calling \'dvipdfm $dir/gregorio-scribus-tmp.dvi\'\n'; | ||
system("mv gregorio-scribus-tmp.pdf $file.pdf"); | ||
unlink('gregorio-scribus-tmp-score.gabc'); | ||
unlink('gregorio-scribus-tmp-score.tex'); | ||
unlink('gregorio-scribus-tmp.tex'); | ||
unlink('gregorio-scribus-tmp.dvi'); | ||
} | ||
exit; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.