gregorio-project / gregorio

The Gregorio Project
http://gregorio-project.github.io
Other
155 stars 43 forks source link

Interaction between gregoriotex and paracol packages #1590

Closed jaabell closed 3 months ago

jaabell commented 4 months ago

Dear developers,

Thank you for your amazing work on gregoriotex!

I wish to bring to your attention a difficulty I'm having that is when using gregoriotex together with paracol package. The issue is that I'm trying to change the color of a separator line in paracol, like in this example:


%Compile line: latexmk -lualatex testparacol.tex

\documentclass{article}
\usepackage{paracol}
\usepackage{xcolor}
% \usepackage[autocompile]{gregoriotex} % Uncomment to see the issue, compiling using LuaLaTeX

\newcommand{\startParallel}{\begin{paracol}{2}}
\newcommand{\latin}[1]{#1\switchcolumn}
\newcommand{\vern}[1]{#1\switchcolumn*}
\newcommand{\stopParallel}{\end{paracol}}

\AtBeginDocument{
\setlength{\columnseprule}{0.4pt}
\colseprulecolor{red}
}

\begin{document}

\startParallel

\latin{
    Pater noster, qui es in caelis,\\
    sanctificetur nomen tuum.\\
    Adveniat regnum tuum.\\
    Fiat voluntas tua, sicut in caelo et in terra.\\
    Panem nostrum quotidianum da nobis hodie,\\
    et dimitte nobis debita nostra sicut\\
    et nos dimittimus debitoribus nostris.\\
    Et ne nos inducas in tentationem,\\
    sed libera nos a malo.\\
    Amen.
}

\vern{
    Our Father, who art in heaven,\\
    hallowed be thy name.\\
    Thy kingdom come.\\
    Thy will be done, on earth as it is in heaven.\\
    Give us this day our daily bread,\\
    and forgive us our trespasses, as we forgive those\\
    who trespass against us.\\
    And lead us not into temptation,\\
    but deliver us from evil.\\
    Amen.
}

\stopParallel

\end{document}

With the gregoriotex usepackage line commented: image

With the gregoriotex usepackage line uncommented: image

Do you have any idea of how to fix this?

Thank you!

José from Chile

rpspringuel commented 3 months ago

This is not a specifically Gregorio issue but rather a conflict between paracol and luacolor (which Gregorio uses). Note the problem occurs in this document (which does not use Gregorio).

\documentclass{article}

\usepackage{xcolor}
\usepackage{luacolor}
\usepackage{paracol}

\newcommand{\startParallel}{\begin{paracol}{2}}
\newcommand{\latin}[1]{#1\switchcolumn}
\newcommand{\vern}[1]{#1\switchcolumn*}
\newcommand{\stopParallel}{\end{paracol}}

\AtBeginDocument{
\setlength{\columnseprule}{0.4pt}
\colseprulecolor{red}
}

\begin{document}

\startParallel

\latin{
    Pater noster, qui es in caelis,\\
    sanctificetur nomen tuum.\\
    Adveniat regnum tuum.\\
    Fiat voluntas tua, sicut in caelo et in terra.\\
    Panem nostrum quotidianum da nobis hodie,\\
    et dimitte nobis debita nostra sicut\\
    et nos dimittimus debitoribus nostris.\\
    Et ne nos inducas in tentationem,\\
    sed libera nos a malo.\\
    Amen.
}

\vern{
    Our Father, who art in heaven,\\
    hallowed be thy name.\\
    Thy kingdom come.\\
    Thy will be done, on earth as it is in heaven.\\
    Give us this day our daily bread,\\
    and forgive us our trespasses, as we forgive those\\
    who trespass against us.\\
    And lead us not into temptation,\\
    but deliver us from evil.\\
    Amen.
}

\stopParallel

\end{document}

I suggest reporting this to luacolor developers or the paracol developer (whose obfuscated email can be found in the package README).