2

I'm compiling some texts in Latin and their Portuguese translations in a bilingual two column article as follows:

Generated pdf

I'm on Windows using MiKTeX with TeXworks' combination of XeLaTex+MakeIndex+BibTex.

The right column is the Portuguese one. As you can see, the second paragraph has a strange indentation. Why is this? How can I make it as the left (Latin) one.

The code is the following:

\documentclass[10pt,twoside,a5paper]{article}

\usepackage{fontspec}
\usepackage{color}
\usepackage{lettrine}
\usepackage[a5paper]{geometry}

\setmainfont[%
  Ligatures={TeX,Common,Contextual,Discretionary,Rare,Historic}
  ,RawFeature={+cv01}
  ,Contextuals={Alternate, WordInitial, WordFinal, LineFinal, Inner, Swash}
]{EB Garamond}
\newfontfamily\portFont[
  Ligatures={TeX,Common,Contextual,Discretionary,Rare,Historic}
  ,Contextuals={Alternate, WordInitial, LineFinal, Inner, Swash}
]{EB Garamond}

\usepackage{polyglossia}
\setmainlanguage{latin}
\setotherlanguage{portuguese}

\usepackage{paracol}

\renewcommand{\LettrineFontHook}{\color{red}}

\newcommand{\port}[1]{%
\selectlanguage{portuguese}{{\portFont#1}}
}

\newcommand{\addchunck}[6]{%
\lettrine{#1}{\color{red}#2}#3%
\bigskip%
\switchcolumn%
\lettrine{#4}{\color{red}#5}\port{#6}%
\bigskip%
\switchcolumn*%
}

\setlength{\columnsep}{1.75pc}

\title{The article has a title}
\author{Jorge Gomes Raimundo}

\begin{document}

\begin{paracol}{2}[\begin{center}\Large{\textsc{Wonderful title}}\bigskip\end{center}]

\addchunck{L}{orem ipsum}{ dolor sit amet, consectetur adipiscing elit. Morbi ut lacinia est. Vestibulum efficitur tortor a nisl placerat pellentesque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nam a lectus sed velit viverra dictum a sit amet mi. Sed accumsan ullamcorper leo sed malesuada.

Cras semper auctor diam et rhoncus. Ut fringilla tincidunt ante ac vestibulum. Nulla facilisi. Nunc dapibus dolor vel libero rutrum vestibulum. Nam nec ex felis. Suspendisse ultricies congue nibh. Integer feugiat vehicula dui, vitae condimentum nulla tempor quis.}
{L}{orem ipsum}{ dolor sit amet, consectetur adipiscing elit. Morbi ut lacinia est. Vestibulum efficitur tortor a nisl placerat pellentesque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nam a lectus sed velit viverra dictum a sit amet mi. Sed accumsan ullamcorper leo sed malesuada.

Cras semper auctor diam et rhoncus. Ut fringilla tincidunt ante ac vestibulum. Nulla facilisi. Nunc dapibus dolor vel libero rutrum vestibulum. Nam nec ex felis. Suspendisse ultricies congue nibh. Integer feugiat vehicula dui, vitae condimentum nulla tempor quis.}


\end{paracol}

\end{document}
  • There is a spurious space in your \port definition, and it misses a \par: \portfont#1\par: – Ulrike Fischer Apr 17 '17 at 17:01
  • That's it! Thank you very much @UlrikeFischer! – Jorge Raimundo Apr 17 '17 at 17:03
  • @UlrikeFischer: Unfortunately I can't mark your comment as an answer so I'll mark Bernard's answer below. – Jorge Raimundo Apr 17 '17 at 17:07
1

I don't know why, but adding a \par after the last argument makes the result normal:

\documentclass[10pt,twoside,a5paper]{article}

\usepackage{fontspec}
\usepackage{color}
\usepackage{lettrine}
\usepackage[a5paper]{geometry}

\setmainfont[%
  Ligatures={TeX,Common,Contextual,Discretionary,Rare,Historic}
  ,RawFeature={+cv01}
  ,Contextuals={Alternate, WordInitial, WordFinal, LineFinal, Inner, Swash}
]{EB Garamond}
\newfontfamily\portFont[
  Ligatures={TeX,Common,Contextual,Discretionary,Rare,Historic}
  ,Contextuals={Alternate, WordInitial, LineFinal, Inner, Swash}
]{EB Garamond}

\usepackage{polyglossia}
\setmainlanguage{latin}
\setotherlanguage{portuguese}

\usepackage{paracol}

\renewcommand{\LettrineFontHook}{\color{red}}

\newcommand{\port}[1]{%
\selectlanguage{portuguese}{{\portFont#1}}
}

\newcommand{\addchunck}[6]{%
\lettrine{#1}{\color{red}#2}#3%
\bigskip%
\switchcolumn%
\lettrine{#4}{\color{red}#5}\port{#6\par}%
\bigskip%
\switchcolumn*%
}

\setlength{\columnsep}{1.75pc}

\title{The article has a title}
\author{Jorge Gomes Raimundo}

\begin{document}

\begin{paracol}{2}[\begin{center}\Large{\textsc{Wonderful title}}\bigskip\end{center}]

\addchunck{L}{orem ipsum } {dolor sit amet, consectetur adipiscing elit. Morbi ut lacinia est. Vestibulum efficitur tortor a nisl placerat pellentesque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nam a lectus sed velit viverra dictum a sit amet mi. Sed accumsan ullamcorper leo sed malesuada.

Cras semper auctor diam et rhoncus. Ut fringilla tincidunt ante ac vestibulum. Nulla facilisi. Nunc dapibus dolor vel libero rutrum vestibulum. Nam nec ex felis. Suspendisse ultricies congue nibh. Integer feugiat vehicula dui, vitae condimentum nulla tempor quis. }
%
{L}{orem ipsum } {dolor sit amet, consectetur adipiscing elit. Morbi ut lacinia est. Vestibulum efficitur tortor a nisl placerat pellentesque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nam a lectus sed velit viverra dictum a sit amet mi. Sed accumsan ullamcorper leo sed malesuada.

Cras semper auctor diam et rhoncus. Ut fringilla tincidunt ante ac vestibulum. Nulla facilisi. Nunc dapibus dolor vel libero rutrum vestibulum. Nam nec ex felis. Suspendisse ultricies congue nibh. Integer feugiat vehicula dui, vitae condimentum nulla tempor quis. }
%%%%%%

\end{paracol}

\end{document} 

enter image description here

  • Thank you! Yes, that was the problem. I don't understand why also. – Jorge Raimundo Apr 17 '17 at 17: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.