Dear Michael

I forgot to say that the scores (one line per page) in my system were transformed from pdf into svg graphics. In that way, you don't have pixelization and you don't lose quality.

I use next software: lualatex, make and pdf2svg. I personnally run Linux (Ubuntu) as OS, but the software tools I speak about also available under MS-Windows and Mac-OS.

I wrote a Makefile making it possible to compile a .gabc file, generating automatically the correspondig .tex file.

This file uses a template, called score2svg.latex. I choosed extension latex for avoiding to lose the template file when cleaning the temporary files. In this implementation, the .tex files are to be seen as temporary files, since these are generated automatically by the make utility.

Assuming you wrote a file my-chant.gabc, you just have to run make my-chant.svg-dir for creating a directory containing the svg files (one per line of the score).

I hereby attach the Makefile and the score2svg.latex template.

Hoping you can use this stuff.

Pierre François, (http://www.romanliturgy.org)


On 05/26/2016 09:25 AM, Zhang Michael wrote:
Dear Br. Samuel and Fr. Pierre,

I just did a quick experiment to export an score to a separate .eps file and then include it in a .tex document with Chinese & Latin - it is much more straightforward than I, a LaTeX newbie, imagined. The only problem is that it cannot cross pages automatically. Now I understand why your solution 2 is one line per page. Would you please share with me the template?

Thanks,
Michael

________________________________________
发件人: Gregorio-users <[email protected]> 代表 Zhang Michael <[email protected]>
发送时间: 2016年5月26日 13:53
收件人: Pierre François; [email protected]; Br. Samuel Springuel
主题: [Gregorio-users] 答复:  答复: Chinese text

Dear Br. Samuel and Fr. Pierre,

Thank you for your advices!

When we started evaluating the feasibility of this project a few weeks ago (and now we are still in the process), solution 2 was one of the technical options put forward with but was eventually vetoed due to the loss of quality and potential workload involved. We even looked into a few other possibilities such as importing the PDF score into a word processing software e.g. Pages on Mac (thanks to Élie and Sr. Maria for their wonderful advices) but it turned out to be imperfect. There were two major problems as I see: 1) the image quality was impaired by pixelization, and 2) the image and/or PDF could not cross page automatically.

What if I export the scores to EPS files, and insert them into a .tex project in which luatex-ja is used to support Chinese/Japanese? Can an EPS image cross pages automatically?

Thanks,
Michael

________________________________________
发件人: Gregorio-users <[email protected]> 代表 Pierre François <[email protected]>
发送时间: 2016年5月26日 4:56
收件人: [email protected]
主题: Re: [Gregorio-users] 答复: Chinese text

Dear Michael

If you want to use the solution 2. of Br. Samuel, I can provide you
files to produce that kind of output.

Fr. Pierre

On 05/25/2016 07:57 PM, R. Padraic Springuel wrote:
I can think of two possibilities:

1.  Use a package other than luatex-ja for typesetting the Chinese/Japanese.

2. Typeset the Gregorio scores in another document which is setup to have one line per page and no margins, and then include them as images.

✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Br. Samuel, OSB
(R. Padraic Springuel)
PAX ☧ ΧΡΙΣΤΟΣ

On May 25, 2016, at 12:53 PM, Zhang Michael <[email protected]> wrote:

Sad to hear that it is yet an unresolved issue, but thank you for letting me know, Br. Samuel. Do you see any possible workaround available before it is root-caused and fixed sometime later hopefully?

Thanks,
Michael
________________________________________
发件人: Gregorio-users <[email protected]> 代表 Br. Samuel Springuel <[email protected]>
发送时间: 2016年5月25日 22:05
收件人: [email protected]
主题: Re: [Gregorio-users] Chinese text

This is a known issue (#1107,
https://github.com/gregorio-project/gregorio/issues/1107).
--
✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ

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

--
Father Pierre FRANÇOIS (http://www.romanliturgy.org)
Bosmanslei 16
2018 Antwerpen (Belgium)
mobile: +32 474 719 131
phone: +32 3 237 63 96

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


--
Father Pierre FRANÇOIS (http://www.romanliturgy.org)
Bosmanslei 16
2018 Antwerpen (Belgium)
mobile: +32 474 719 131
phone: +32 3 237 63 96
install-dir = /home/pf/Documents/Liturgie/xml/include/svg

%.pdf: %.tex %.gtex
        lualatex $<
%.gtex: %.gabc 
        gregorio -o $@ $< 
%.tex: %.gtex score2svg.latex
        sed "s/FILENAME/$</" score2svg.latex | \
        sed "s/MODE/$(shell sed -e '/^annotation: \(.*\);/s//\1/p' -e d $*.gabc 
)/" > $@ # extract from "annotation:" field in header of gabc file and 
substitute in tex file
%.a4.tex: %.gtex score2dina4.latex
        sed "s/FILENAME/$</" score2dina4.latex | \
        sed "s/MODE/$(shell sed -e '/^annotation: \(.*\);/s//\1/p' -e d 
$*.gabc)/" > $@ # extract mode from "annotation:" field in header of gabc file 
and substitute in tex file
%.a4.pdf: %.a4.tex %.gtex
        lualatex $<
%.svg-dir: %.pdf
        rm -rf $@/*
        mkdir -p $@
        pdf2svg $< $*.svg-dir/%03d.svg all
        rm -f `grep -L symbol $@/*.svg`         # remove all empty svg files
        ./create-index-xml.sh $@
        @echo '***' run \"make $*\"
        @echo '***' to install the contents of $@ into:
        @echo '***' $(install-dir)
%: %.svg-dir
        mkdir -p $(install-dir)/$@
        rm -f $(install-dir)/$@/*
        cp $</* $(install-dir)/$@
%.png: %.a4.pdf
        convert -density 150 $< -trim -background white -alpha remove $@
clean:
        rm -rf *.log *.aux *.gtex *.tex *.gaux 

prex-eucharistica-II.pdf: prex-eucharistica-II-vere-sanctus.gtex 
prex-eucharistica-II-simili-modo.gtex mortem-tuam.gtex 
prex-eucharistica-II-memores-igitur.gtex per-ipsum-sollemnis.gtex 
prex-eucharistica-II.latex Makefile
        lualatex prex-eucharistica-II.latex
adoro-te-devote-la-nl.pdf: adoro-te-devote.gtex adoro-te-devote-la-nl.latex 
Makefile
        lualatex adoro-te-devote-la-nl.latex
prex-eucharistica-II.book.pdf: prex-eucharistica-II.pdf  
        pdfbook -2 -p a3 $< $@  # bug: papersize a3 doesn't seem to work
ad-benedictionem-episcopalem-a.pdf: ad-benedictionem-episcopalem-a.latex 
ad-benedictionem-episcopalem-a-1.gtex ad-benedictionem-episcopalem-a-2.gtex 
Makefile
        lualatex ad-benedictionem-episcopalem-a.latex
te-deum.pdf: te-deum.gtex te-deum.latex 
        lualatex te-deum.latex || rm te-deum.pdf
\documentclass[a4paper]{article} 
%
\usepackage{gregoriotex}
\usepackage[utf8]{luainputenc}
\usepackage[T1]{fontenc}
\usepackage{kpfonts} 
% About the next code, Élie Roux says:
% \usepackage[T1]{fontenc} 
% \usepackage[utf8]{luainputenc}
% \usepackage{times}
% I strongly discourage you from using non-unicode fonts, if you want a
% free Times, you can use
% \usepackage{fontspec}
% \usepackage{libertine}
\usepackage{wasysym} % for \kreuz symbol
\usepackage[paperwidth=14cm,paperheight=72pt,left=0pt,right=0pt,top=0pt,bottom=0pt]{geometry}		% See geometry.pdf to learn the layout options.
\newcommand{\crux}{{\huge \kreuz}}
%
\begin{document}
\pagestyle{empty}

% The title:
%\begin{center}\begin{huge}\textsc{My title}\end{huge}\end{center}

% Here we set the space around the initial.
% Please report to http://home.gna.org/gregorio/gregoriotex/details for more details and options
\setspaceafterinitial{2.2mm}{1}
\setspacebeforeinitial{2.2mm}{1}

% Here we set the initial font. Change 43 if you want a bigger initial.
\def\greinitialformat#1{%
{\fontsize{43}{43}\selectfont #1}%
}

% We set black lines here, comment it out if you want red ones.
%\redlines

% We set VII above the initial.
%\gresetfirstlineaboveinitial{\small \textsc{\textbf{VII}}}{\small \textsc{\textbf{VII}}}

% We type a text in the top right corner of the score:
%\commentary{{\small \emph{My commentary}}}

% Fine tune space at the beginning of the first page
\vspace*{-5pt}	% don't ask me why exactly -5pt: it just works

% and finally we include the score. The file must be in the same directory as this one.

\gresetfirstlineaboveinitial{MODE}{MODE}
\includescore{FILENAME}

\end{document}
_______________________________________________
Gregorio-users mailing list
[email protected]
https://mail.gna.org/listinfo/gregorio-users

Reply via email to