设置葡萄牙语时出现奇怪的段落缩进

设置葡萄牙语时出现奇怪的段落缩进

我正在将一些拉丁语文本及其葡萄牙语翻译汇编成一篇双语双栏文章,如下所示:

生成的 pdf

我在 Windows 上使用 MiKTeX 与 TeXworks 的组合XeLaTex+MakeIndex+BibTex

右栏是葡萄牙语。如您所见,第二段有一个奇怪的缩进。这是为什么?我怎样才能使它成为左边(拉丁语)的。

代码如下:

\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}

答案1

我不知道为什么,但是\par在最后一个参数后添加一个会使结果正常:

\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} 

在此处输入图片描述

相关内容