5

I am using parallel package to write texts of different translation side by side, I found parallel package accomplished this side by side texts, here in Left column is in another language and the right column is in English translation of the left column text, here I am facing an issue when we used \textcolor{red}{ some long texts} it should give red color even when i am not putting \textcolor{red} command the other text's become red color, Here Jesus said to him become red but in my code there is no \textcolor{Jesus said to him} , why it is giving red color, How can solve out this problem in latex. here is my MWE.

\documentclass[twoside,letterpaper,11pt]{book}

\usepackage[margin=1.5cm]{geometry}
\usepackage[T1]{fontenc}
%\usepackage[english]{babel} %% This package make sure for hyphenation problem
\usepackage{ebgaramond}
\usepackage{lipsum}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}


\usepackage{parallel,graphicx}
\usepackage{fancyhdr}
  \pagestyle{fancy}
  \fancyhf{}
  \fancyhead[RO,LE]{\rightmark}
 %    \fancyhead[RO,LE]{\leftmark} %% display chapter in header
  \renewcommand{\headrulewidth}{.5pt}
  \fancyhead[LO,RE]{\thepage} %% To display numbering on every page alternately left and right
 %  \fancyhead[LO]{\small\thetitle}    % Odd page header and number to right top
 %  \fancyhead[RE]{\small\thetitle}   % Even page header and number at left top

\setlength{\headwidth}{\textwidth}
\setlength{\headheight}{15pt}
\setlength{\headsep}{0pt}
\setlength{\columnseprule}{0pt}

\usepackage[colorlinks]{hyperref}

\newcommand{\jChapter}[1]{\noindent\scalebox{2.5}{\color{red}\textbf{#1}\hspace{0.3mm}}}
\newcommand{\jverse}[1]{\noindent\textcolor{cyan}{\scalebox{1.0}{\textbf{#1\hspace{1.0mm}}}}}
%% Starts Add 
%\newcommand{\story}[1]{\hfill\large\it\textbf{#1}\hfill~}
\newcommand{\story}[1]{\vspace*{2mm}\centering\it\textbf{#1}}

%%%% End Add
\makeatletter
\newcommand\versenumcolor{red}
\newcommand\chapnumcolor{red}
\renewcommand\paragraph{%
  \@startsection{paragraph}{4}{\z@}%
            {.25ex \@plus.25ex \@minus.1ex}%
            {-.5em}%
            {\normalfont\normalsize\bfseries\color{\versenumcolor}}}%
\newlength{\biblechapskip}
  \setlength{\biblechapskip}{1em plus .33em minus .2em}
\newcounter{biblechapter}
\newcounter{bibleverse}[biblechapter]
\renewcommand\chaptername{Book}
\let\ltx@chapter=\chapter
\let\ltx@paragraph=\paragraph
\newcommand{\book}[1]{%
  \gdef\currbook{#1}
  \ltx@chapter{#1}}
\newcount\biblechap@svdopt
\newenvironment{biblechapter}[1][\thebiblechapter]
  {\biblechap@svdopt=#1
  \ifnum\c@biblechapter=\biblechap@svdopt\else
    \advance\biblechap@svdopt by -1\fi
  \setcounter{biblechapter}{\the\biblechap@svdopt}
  \refstepcounter{biblechapter}
  \lettrine{\color{\chapnumcolor}\lower-6pt\hbox{\thebiblechapter}}{}\ignorespaces}
  {\vspace{\biblechapskip}}
\renewcommand{\verse}[1][\thebibleverse]{%
  \refstepcounter{bibleverse}
  \markright{{\scshape\currbook} \thebiblechapter:\thebibleverse}
  \ifnum\c@bibleverse=1\else
    \ltx@paragraph*{#1}\fi}%
\makeatother

\title{Translation}
\date{}
\author{}
\usepackage{lipsum}
\usepackage{ragged2e}
\newcommand{\BookLine}{ \centering\noindent\rule{19cm}{1pt}}
\newcommand{\BookNote}[1]{{\begin{center} \textbf{KEPACHINI} \justify

#1
\end{center}
\BookLine
\vspace{2mm}
}}


\usepackage[perpage]{footmisc} %%% To restart footnote numbering on every new pages
\begin{document}
\renewcommand{\thefootnote}{\emph{\alph{footnote}}}
\frontmatter
\maketitle
\tableofcontents

\mainmatter


 \setlength{\columnseprule}{.5pt}

\begin{Parallel}{9.0cm}{9.0cm}  
\ParallelLText{\jverse{9}Jisu thakddunsi pulo, \textcolor{red}{``Philip, ne lapu-an arni keding nangtum along nangkedodun anta nangtum nephan nechininelangma? Nephan nekethek-long abang ke Po aphanta thek-long-lo. Tangte nang kopisi, `Netum aphan Po nepaklangtha,' pu kepulangma?}}    
\ParallelRText{\jverse{9}Jesus said to him, \textcolor{red}{``Have I been with you all this time, Philip, and you still do not know me? Whoever has seen me has seen the Father. How can you say, `Show us the Father'?}}
\ParallelPar
\end{Parallel}
\end{document}

Here is the output of the above code enter image description here

  • 1
    getting colour to work naturally in tex is really tricky.... Here I would just simply force it back to black with \jverse{9}\textcolor{black}{Jesus said to him,} \textcolor{red}{``Have I been... – David Carlisle Jun 16 at 15:39
  • Is there any solution to alternative to put some command in the preamble parts, because i have a huge texts (i.e thousands of thousands text) as i am going to make a book. @DavidCarlisle – Biki Teron Jun 16 at 16:26
  • possibly not (parallel is doing a lot of box manipulation and getting colours to survive that is really hard, and perhaps impossible in general) you need to add these manual correction sometimes. If lualatex is a possibility you could try luacolor which uses a completely different colour mechanism. – David Carlisle Jun 16 at 16:30
  • How to use luacolor what command should use or any tutorial on luacolor to achive the desire output. @DavidCarlisle – Biki Teron Jun 16 at 16:38
  • let me see if it works, if it does I'll post a luatex answer.... – David Carlisle Jun 16 at 16:43
3

It turns out there’s an even simpler answer. Heiko Oberdiek wrote a package pdfcolparallel that fixes this very bug in parallel using color stacks. (Arguably, this should’ve been resolved by replacing the buggy package that has been abandoned since 2003, not by adding a second one with a different name.)

Like before, I compiled with LuaLaTeX, removed the fontenc package because ebgaramond on LuaLaTeX loads the more-modern OpenType version, and added microtype to improve the hyphenation on the left column.

\documentclass[twoside,letterpaper,11pt]{book}

\usepackage[margin=1.5cm]{geometry}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{pdfcolparallel, graphicx, microtype}
\usepackage[oldstyle]{ebgaramond}
\usepackage[colorlinks, unicode]{hyperref}

\newcommand{\jverse}[1]{\noindent\textcolor{cyan}{\scalebox{1.0}{\textbf{#1\hspace{1.0mm}}}}}

\begin{document}
\begin{Parallel}{9.0cm}{9.0cm}  
\ParallelLText{\jverse{9}Jisu thakddunsi pulo, \textcolor{red}{``Philip, ne lapu-an arni keding nangtum along nangkedodun anta nangtum nephan nechininelangma? Nephan nekethek-long abang ke Po aphanta thek-long-lo. Tangte nang kopisi, `Netum aphan Po nepaklangtha,' pu kepulangma?}}
\ParallelRText{\jverse{9}Jesus said to him, \textcolor{red}{``Have I been with you all this time, Philip, and you still do not know me? Whoever has seen me has seen the Father. How can you say, `Show us the Father'?}}
\ParallelPar
\end{Parallel}
\end{document}

Red-letter text

You might still consider a more semantic command for red-letter text, in case, for example, you ever want to use a different shade of red. Right now, there are a lot of \textcolor{red} commands to change, and not all of them, even in your MWE, are attached to statements by Jesus in the Gospels. So you could not do a search-and-replace on them if you ever needed to change the style.

This defines \redletter Red-letter text and \textred{Red-letter text}:

\newcommand\redletter{\color{red}}
\DeclareTextFontCommand\textred{\redletter}
  • when i run your code some word is unable to split automatically i mean hyphenation @Davislor – Biki Teron Jun 17 at 11:57
  • hmm I wonder who maintains the current git sources of pdfcolparallel on github.... – David Carlisle Jun 17 at 12:53
  • @BikiTeron I’m not sure I understand what you mean. Could you clarify? – Davislor Jun 17 at 17:48
  • The picture which you posted i didn't get the same output @Davislor – Biki Teron Jun 17 at 17:53
  • @BikiTeron Are you running it in lualatex, and do you have the latest versions of the packages? – Davislor Jun 17 at 17:55
5

Getting colour to work naturally in tex is really tricky.... Here I would just simply force it back to black with

\jverse{9}\textcolor{black}{Jesus said to him,} \textcolor{red}{``Have I been... 

If using lualatex is a possibility then you could use luacolor package which keeps the same color or xcolor commands that you are used to but uses a completely different machanism to internally record colours that acts far more like font changes and so splitting boxes does not cause colour to leak in the way that happens with the classic tex colour mechanisms.

For the example here this gives black for the first phrase in each column as intended:

I just made two changes, removing the fontenc package and adding the luacolor package. No changes in the actual document text.

\documentclass[twoside,letterpaper,11pt]{book}

\usepackage[margin=1.5cm]{geometry}
% not for luatex \usepackage[T1]{fontenc}

\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{luacolor}% load after xcolor

%\usepackage[english]{babel} %% This package make sure for hyphenation problem
\usepackage{ebgaramond}
\usepackage{lipsum}



\usepackage{parallel,graphicx}
\usepackage{fancyhdr}
  \pagestyle{fancy}
  \fancyhf{}
  \fancyhead[RO,LE]{\rightmark}
 %    \fancyhead[RO,LE]{\leftmark} %% display chapter in header
  \renewcommand{\headrulewidth}{.5pt}
  \fancyhead[LO,RE]{\thepage} %% To display numbering on every page alternately left and right
 %  \fancyhead[LO]{\small\thetitle}    % Odd page header and number to right top
 %  \fancyhead[RE]{\small\thetitle}   % Even page header and number at left top

\setlength{\headwidth}{\textwidth}
\setlength{\headheight}{15pt}
\setlength{\headsep}{0pt}
\setlength{\columnseprule}{0pt}

\usepackage[colorlinks]{hyperref}

\newcommand{\jChapter}[1]{\noindent\scalebox{2.5}{\color{red}\textbf{#1}\hspace{0.3mm}}}
\newcommand{\jverse}[1]{\noindent\textcolor{cyan}{\scalebox{1.0}{\textbf{#1\hspace{1.0mm}}}}}
%% Starts Add 
%\newcommand{\story}[1]{\hfill\large\it\textbf{#1}\hfill~}
\newcommand{\story}[1]{\vspace*{2mm}\centering\it\textbf{#1}}

%%%% End Add
\makeatletter
\newcommand\versenumcolor{red}
\newcommand\chapnumcolor{red}
\renewcommand\paragraph{%
  \@startsection{paragraph}{4}{\z@}%
            {.25ex \@plus.25ex \@minus.1ex}%
            {-.5em}%
            {\normalfont\normalsize\bfseries\color{\versenumcolor}}}%
\newlength{\biblechapskip}
  \setlength{\biblechapskip}{1em plus .33em minus .2em}
\newcounter{biblechapter}
\newcounter{bibleverse}[biblechapter]
\renewcommand\chaptername{Book}
\let\ltx@chapter=\chapter
\let\ltx@paragraph=\paragraph
\newcommand{\book}[1]{%
  \gdef\currbook{#1}
  \ltx@chapter{#1}}
\newcount\biblechap@svdopt
\newenvironment{biblechapter}[1][\thebiblechapter]
  {\biblechap@svdopt=#1
  \ifnum\c@biblechapter=\biblechap@svdopt\else
    \advance\biblechap@svdopt by -1\fi
  \setcounter{biblechapter}{\the\biblechap@svdopt}
  \refstepcounter{biblechapter}
  \lettrine{\color{\chapnumcolor}\lower-6pt\hbox{\thebiblechapter}}{}\ignorespaces}
  {\vspace{\biblechapskip}}
\renewcommand{\verse}[1][\thebibleverse]{%
  \refstepcounter{bibleverse}
  \markright{{\scshape\currbook} \thebiblechapter:\thebibleverse}
  \ifnum\c@bibleverse=1\else
    \ltx@paragraph*{#1}\fi}%
\makeatother

\title{Translation}
\date{}
\author{}
\usepackage{lipsum}
\usepackage{ragged2e}
\newcommand{\BookLine}{ \centering\noindent\rule{19cm}{1pt}}
\newcommand{\BookNote}[1]{{\begin{center} \textbf{KEPACHINI} \justify

#1
\end{center}
\BookLine
\vspace{2mm}
}}


\usepackage[perpage]{footmisc} %%% To restart footnote numbering on every new pages
\begin{document}
\renewcommand{\thefootnote}{\emph{\alph{footnote}}}
\frontmatter
\maketitle
\tableofcontents

\mainmatter


 \setlength{\columnseprule}{.5pt}

\begin{Parallel}{9.0cm}{9.0cm}  
\ParallelLText{\jverse{9}Jisu thakddunsi pulo, \textcolor{red}{``Philip, ne lapu-an arni keding nangtum along nangkedodun anta nangtum nephan nechininelangma? Nephan nekethek-long abang ke Po aphanta thek-long-lo. Tangte nang kopisi, `Netum aphan Po nepaklangtha,' pu kepulangma?}}    
\ParallelRText{\jverse{9}Jesus said to him, \textcolor{red}{``Have I been with you all this time, Philip, and you still do not know me? Whoever has seen me has seen the Father. How can you say, `Show us the Father'?}}
\ParallelPar
\end{Parallel}
\end{document}
  • Thank you so much your code is working wonderfully, a font is little bit change but its ok for the colour point of view. @DavidCarlisle – Biki Teron Jun 16 at 17:07
  • Do you know if luacolor is compatible with fontspec? – Davislor Jun 17 at 8:26
  • 1
    @Davislor sure my version is using fontspec (loaded by ebgaramond package to get the OTF version of the font) – David Carlisle Jun 17 at 8:29
4

An alternative to David Carlisle’s excellent answer is to switch from obsolete 8-bit encodings to fontspec and use its Color option. That allows you to use Unicode, and any standard font you could use in your word processor.

You could in fact combine this with his answer, by adding the luacolor package.

Setting the Color= option on a font isn’t compatible with \textcolor from xcolor, so you also have to update the other commands that change color to use \addfontfeatures.

I also took the liberty of adding \usepackage{microtype}. If you compile with LuaLaTeX, its font expansion should cut down drastically on the problems you seem to be having with hyphenation and word-wrapping.

\documentclass[twoside,letterpaper,11pt]{book}

\usepackage[margin=1.5cm]{geometry}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{parallel,graphicx, fontspec, microtype}
\usepackage[oldstyle]{ebgaramond}
\usepackage[colorlinks, unicode]{hyperref}

\newcommand{\jChapter}[1]{\noindent\scalebox{2.5}{\addfontfeature{Color=red}\textbf{#1}\hspace{0.3mm}}}
\newcommand{\jverse}[1]{\noindent\scalebox{1.0}{\addfontfeature{Color=cyan}\textbf{#1\hspace{1.0mm}}}}
\newcommand\redletter{\addfontfeature{Color=red}}
\DeclareTextFontCommand\textred{\redletter}
\newcommand\uncolor{\addfontfeature{Color=black}}
\DeclareTextFontCommand\textblack{\uncolor}

\begin{document}

\begin{Parallel}{9.0cm}{9.0cm}  
\ParallelLText{\jverse{9}Jisu thakddunsi pulo, \textred{``Philip, ne lapu-an arni keding nangtum along nangkedodun anta nangtum nephan nechininelangma? Nephan nekethek-long abang ke Po aphanta thek-long-lo. Tangte nang kopisi, `Netum aphan Po nepaklangtha,' pu kepulangma?}}
\ParallelRText{\jverse{9}Jesus said to him, \textred{``Have I been with you all this time, Philip, and you still do not know me? Whoever has seen me has seen the Father. How can you say, `Show us the Father'?}}
\ParallelPar
\end{Parallel}
\end{document}

Red-letter text

This adds the new commands, \redlettter Text in red, \textred{Text in red}. This would require changes to your source, but at least it would make it trivial to change the red-letter text to another style or shade if you ever wish to.

If a search-and-replace for \textcolor is infeasible, you could also (although I don't recommend it) change the meaning of \textcolor with \renewcommand.

  • ah yes well I described using luacolor as "more like font changes" so I suppose using colour property on a font could be described as "even more like font changes" so I can't really complain if you give me a -15 this morning:-) One thing I would note is that my version had already switched from the 8bit garamond to the unicode otf version (implicit in the ebgaramond package under luatex) – David Carlisle Jun 17 at 8:22
  • @DavidCarlisle Hey. It was only -5 on net. – Davislor Jun 17 at 8:23
  • @DavidCarlisle Now that you mention it, loading the font through ebgaramond is a better idea. it does need the oldstyle option to reproduce the verse number in the sample image. – Davislor Jun 17 at 8:38
1

Your MWE can be further reduced to the following code:

\documentclass[twoside,letterpaper,11pt]{book}

\usepackage[margin=1.5cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{parallel,graphicx}
\usepackage[colorlinks]{hyperref}

\newcommand{\jverse}[1]{\noindent\textcolor{cyan}{\scalebox{1.0}{\textbf{#1\hspace{1.0mm}}}}}

\begin{document}

\begin{Parallel}{9.0cm}{9.0cm}  
\ParallelLText{\jverse{9}Jisu thakddunsi pulo, \textcolor{red}{``Philip, ne lapu-an arni keding nangtum along nangkedodun anta nangtum nephan nechininelangma? Nephan nekethek-long abang ke Po aphanta thek-long-lo. Tangte nang kopisi, `Netum aphan Po nepaklangtha,' pu kepulangma?}}
\ParallelRText{\jverse{9}Jesus said to him, \textcolor{red}{``Have I been with you all this time, Philip, and you still do not know me? Whoever has seen me has seen the Father. How can you say, `Show us the Father'?}}
\ParallelPar
\end{Parallel}
\end{document}

Starting from this, we can replace the \textcolor{red}{...} commands by \color{red} ... and add \color{black} to the definition of \jverse. This will result in the following output:

enter image description here

\documentclass[twoside,letterpaper,11pt]{book}

\usepackage[margin=1.5cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{parallel,graphicx}
\usepackage[colorlinks]{hyperref}

\newcommand{\jverse}[1]{\noindent\textcolor{cyan}{\scalebox{1.0}{\textbf{#1\hspace{1.0mm}}}}\color{black}}

\begin{document}

\begin{Parallel}{9.0cm}{9.0cm}  
\ParallelLText{\jverse{9}Jisu thakddunsi pulo, \color{red}``Philip, ne lapu-an arni keding nangtum along nangkedodun anta nangtum nephan nechininelangma? Nephan nekethek-long abang ke Po aphanta thek-long-lo. Tangte nang kopisi, `Netum aphan Po nepaklangtha,' pu kepulangma?}
\ParallelRText{\jverse{9}Jesus said to him, \color{red}``Have I been with you all this time, Philip, and you still do not know me? Whoever has seen me has seen the Father. How can you say, `Show us the Father'?}
\ParallelPar
\end{Parallel}
\end{document}
  • can we do in the preamble part without modifying the document part @leandriis – Biki Teron Jun 16 at 16:24
  • 1
    @BikiTeron: Aparently, my solution will not work correctly if one keeps the \textcolor command sin the document part. – leandriis Jun 16 at 17:00
  • phew thanks for reducing the code to the minimum. – Diaa Jun 17 at 9:03
1

Thank you all for your answer, Now i came up with my new solution to my question, here i am posting my answer so that others will not face problem like me base on this problem, here i remove the package parallel since \textcolor is not working properly, so i search internet https://ctan.org/topic/parallel and i found the package called paracol in which \textcolor is working without any issue and keeping the same text fonts, and i redefined my source as

\newcommand{\ParallelLText}[2]{\begin{paracol}{2}\sloppy \switchcolumn[0]\noindent #1 \switchcolumn[1]\noindent #2 \end{paracol}}

just to meet the requirements of the parcol package here is my code

 \documentclass[oneside,letterpaper,11pt]{book}

 \usepackage[margin=1.5cm]{geometry}
 \usepackage[T1]{fontenc}

 \usepackage{ebgaramond}
 \usepackage{lipsum}
 \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}

 \usepackage{paracol}
 \usepackage{microtype}
 \usepackage{graphicx}
 \usepackage{fancyhdr}
   \pagestyle{fancy}
   \fancyhf{}
   \fancyhead[RO,LE]{\rightmark}
     \fancyhead[RO,LE]{\leftmark} %% display chapter in header
   \renewcommand{\headrulewidth}{.5pt}
   \fancyhead[LO,RE]{\thepage} %% To display numbering on every page alternately left and right
 %  \fancyhead[LO]{\small\thetitle}    % Odd page header and number to right top
 %  \fancyhead[RE]{\small\thetitle}   % Even page header and number at left top

 \setlength{\headwidth}{\textwidth}
 \setlength{\headheight}{15pt}
 \setlength{\headsep}{0pt}
 \setlength{\columnseprule}{0pt}

 \usepackage[colorlinks]{hyperref}

 \newcommand{\jChapter}[1]{\noindent\scalebox{2.5}{\color{red}\textbf{#1}\hspace{0.3mm}}}
 \newcommand{\jverse}[1]{\noindent\textcolor{cyan}{\scalebox{1.0}{\textbf{#1\hspace{1.0mm}}}}\color{black}}
 %% Starts Add by Biki from Net
 %\newcommand{\story}[1]{\hfill\large\it\textbf{#1}\hfill~}
 \newcommand{\story}[1]{\vspace*{2mm}\centering\it\textbf{#1}}

 %%%% End Add
 \makeatletter
 \newcommand\versenumcolor{red}
 \newcommand\chapnumcolor{red}
 \renewcommand\paragraph{%
   \@startsection{paragraph}{4}{\z@}%
            {.25ex \@plus.25ex \@minus.1ex}%
            {-.5em}%
            {\normalfont\normalsize\bfseries\color{\versenumcolor}}}%
 \newlength{\biblechapskip}
   \setlength{\biblechapskip}{1em plus .33em minus .2em}
 \newcounter{biblechapter}
 \newcounter{bibleverse}[biblechapter]
 \renewcommand\chaptername{Book}
 \let\ltx@chapter=\chapter
 \let\ltx@paragraph=\paragraph
 \newcommand{\book}[1]{%
   \gdef\currbook{#1}
   \ltx@chapter{#1}}
 \newcount\biblechap@svdopt
 \newenvironment{biblechapter}[1][\thebiblechapter]
   {\biblechap@svdopt=#1
   \ifnum\c@biblechapter=\biblechap@svdopt\else
     \advance\biblechap@svdopt by -1\fi
   \setcounter{biblechapter}{\the\biblechap@svdopt}
   \refstepcounter{biblechapter}
   \lettrine{\color{\chapnumcolor}\lower-6pt\hbox{\thebiblechapter}}{}\ignorespaces}
   {\vspace{\biblechapskip}}
 \renewcommand{\verse}[1][\thebibleverse]{%
   \refstepcounter{bibleverse}
   \markright{{\scshape\currbook} \thebiblechapter:\thebibleverse}
   \ifnum\c@bibleverse=1\else
     \ltx@paragraph*{#1}\fi}%
 \makeatother

 \title{Translation}
 \date{}
 \author{}
 \usepackage{lipsum}
 \usepackage{ragged2e}
 \newcommand{\BookLine}{ \centering\noindent\rule{19cm}{1pt}}
 \newcommand{\BookNote}[1]{{\begin{center} \textbf{KEPACHINI} \justify

 #1
 \end{center}
 \BookLine
 \vspace{2mm}
 }}

 \newcommand{\ParallelLText}[2]{\begin{paracol}{2}\sloppy \switchcolumn[0]\noindent  #1 \switchcolumn[1]\noindent #2 \end{paracol}}

 \usepackage[perpage]{footmisc} %%% To restart footnote numbering on every new pages
 \begin{document}
 \renewcommand{\thefootnote}{\emph{\alph{footnote}}}
 \frontmatter
 \maketitle
 \tableofcontents

 \mainmatter

 \ParallelLText{\jverse{9}Jisu thakdunsi pulo, \textcolor{red}{“Philip, ne lapu-an arni keding nangtum along nangkedodun anta nangtum nephan nechininelangma? Nephan nekethek-long abang ke Po aphanta thek-long-lo. Tangte nang kopisi, ‘Netum aphan Po nepaklangtha,’ pu kepulangma?  }}{\jverse{9}Jesus said to him, \textcolor{red}{“Have I been with you all this time, Philip, and you still do not know me? Whoever has seen me has seen the Father. How can you say, ‘Show us the Father’? }} 

 \end{document}

enter image description here

  • I personally recommend dropping the fontenc package and compiling with LuaLaTeX. But, glad you found a package that works. Yeah, parallel is an experimental package from 2003. – Davislor Jun 17 at 8:42
  • There also seems to be a pdfcolparallel package whose purpose is to fix color problems in parallel. – Davislor Jun 17 at 8:44
0

Indeed, I don't know why there is a red color in right side? Redefining \ParallelLText and \ParallelRText commands, you can get rid of color interference and increase the speed of typing, like this:

\newcommand{\PLT}[2]{\ParallelLText{\jverse{9}\textcolor{black}{#1}\textcolor{red}{#2}}}

\newcommand{\PRT}[2]{\ParallelRText{\jverse{9}\textcolor{black}{#1}{#2}}}

Full code:

\documentclass[twoside,letterpaper,11pt]{book}

\usepackage[margin=1.5cm]{geometry}
\usepackage[T1]{fontenc}
%\usepackage[english]{babel} %% This package make sure for hyphenation problem
\usepackage{ebgaramond}
\usepackage{lipsum}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}


\usepackage{parallel,graphicx}
\usepackage{fancyhdr}
  \pagestyle{fancy}
  \fancyhf{}
  \fancyhead[RO,LE]{\rightmark}
 %    \fancyhead[RO,LE]{\leftmark} %% display chapter in header
  \renewcommand{\headrulewidth}{.5pt}
  \fancyhead[LO,RE]{\thepage} %% To display numbering on every page alternately left and right
 %  \fancyhead[LO]{\small\thetitle}    % Odd page header and number to right top
 %  \fancyhead[RE]{\small\thetitle}   % Even page header and number at left top

\setlength{\headwidth}{\textwidth}
\setlength{\headheight}{15pt}
\setlength{\headsep}{0pt}
\setlength{\columnseprule}{0pt}

\usepackage[colorlinks]{hyperref}

\newcommand{\jChapter}[1]{\noindent\scalebox{2.5}{\color{red}\textbf{#1}\hspace{0.3mm}}}
\newcommand{\jverse}[1]{\noindent\textcolor{cyan}{\scalebox{1.0}{\textbf{#1\hspace{1.0mm}}}}}
%% Starts Add 
%\newcommand{\story}[1]{\hfill\large\it\textbf{#1}\hfill~}
\newcommand{\story}[1]{\vspace*{2mm}\centering\it\textbf{#1}}

%%%% End Add
\makeatletter
\newcommand\versenumcolor{red}
\newcommand\chapnumcolor{red}
\renewcommand\paragraph{%
  \@startsection{paragraph}{4}{\z@}%
            {.25ex \@plus.25ex \@minus.1ex}%
            {-.5em}%
            {\normalfont\normalsize\bfseries\color{\versenumcolor}}}%
\newlength{\biblechapskip}
  \setlength{\biblechapskip}{1em plus .33em minus .2em}
\newcounter{biblechapter}
\newcounter{bibleverse}[biblechapter]
\renewcommand\chaptername{Book}
\let\ltx@chapter=\chapter
\let\ltx@paragraph=\paragraph
\newcommand{\book}[1]{%
  \gdef\currbook{#1}
  \ltx@chapter{#1}}
\newcount\biblechap@svdopt
\newenvironment{biblechapter}[1][\thebiblechapter]
  {\biblechap@svdopt=#1
  \ifnum\c@biblechapter=\biblechap@svdopt\else
    \advance\biblechap@svdopt by -1\fi
  \setcounter{biblechapter}{\the\biblechap@svdopt}
  \refstepcounter{biblechapter}
  \lettrine{\color{\chapnumcolor}\lower-6pt\hbox{\thebiblechapter}}{}\ignorespaces}
  {\vspace{\biblechapskip}}
\renewcommand{\verse}[1][\thebibleverse]{%
  \refstepcounter{bibleverse}
  \markright{{\scshape\currbook} \thebiblechapter:\thebibleverse}
  \ifnum\c@bibleverse=1\else
    \ltx@paragraph*{#1}\fi}%
\makeatother

\title{Translation}
\date{}
\author{}
\usepackage{lipsum}
\usepackage{ragged2e}
\newcommand{\BookLine}{ \centering\noindent\rule{19cm}{1pt}}
\newcommand{\BookNote}[1]{{\begin{center} \textbf{KEPACHINI} \justify

#1
\end{center}
\BookLine
\vspace{2mm}
}}


\usepackage[perpage]{footmisc} %%% To restart footnote numbering on every new pages
\begin{document}
\renewcommand{\thefootnote}{\emph{\alph{footnote}}}
\frontmatter
\maketitle
\tableofcontents

\mainmatter
\setlength{\columnseprule}{.5pt}

\newcommand{\PLT}[2]{\ParallelLText{\jverse{9}\textcolor{black}{#1}\textcolor{red}{#2}}}

\newcommand{\PRT}[2]{\ParallelRText{\jverse{9}\textcolor{black}{#1}{#2}}}

\begin{Parallel}{9.0cm}{9.0cm}  
\PLT{Jisu thakddunsi pulo,} {``Philip, ne lapu-an arni keding nangtum along nangkedodun anta nangtum nephan nechininelangma? Nephan nekethek-long abang ke Po aphanta thek-long-lo. Tangte nang kopisi, `Netum aphan Po nepaklangtha,' pu kepulangma?}   
\PRT{Jesus said to him,}{``Have I been with you all this time, Philip, and you still do not know me? Whoever has seen me has seen the Father. How can you say, `Show us the Father'?} 
\ParallelPar
\end{Parallel}
\end{document}

enter image description here

  • But my text may not be always in this form {#1}{#2} it could be have various variation, So your code may not be sufficient to put my texts, anyway thanking you your quick reply @ferahfeza – Biki Teron Jun 16 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.