TransWikia.com

Paracol, aligning section with non-section

TeX - LaTeX Asked by ibnyusuf on July 2, 2021

I working on a document that contains Arabic and English. What I want to do, is have a section in the left (English) column which is aligned to a non-section in the right (Arabic) column. I cannot make the right heading a section as I do not want it to to appear in the table of contents. Below is a minimum not working example:

documentclass[12pt]{scrartcl}

usepackage{silence}
usepackage{ifthen}
usepackage{rotating}
usepackage{etoolbox}

WarningFilter{latex}{Command InputIfFileExists}

%%% For accessing system, OTF and TTF fonts
%%% (would have been loaded by polylossia anyway)
usepackage{paracol}
usepackage{xunicode} %% loading this first to avoid clash with bidi/arabic
usepackage{xcolor}

%%% For language switching -- like babel, but for xelatex
usepackage{polyglossia}

setmainlanguage{english}
setotherlanguages{arabic} %% or other languages


% define fonts for other languages
newfontfamilyarabicfont[Script=Arabic]{Lotus Linotype}

begin{document}

tableofcontents

begin{Arabic} 
begin{center}
textcolor{red}{
noindent Large
textbf{هذه جملة في العربية}
}
end{center}
end{Arabic}

columncolor{red}[1]
footnotelayout{p}
setlength{columnseprule}{0.5pt}
colseprulecolor{red}

begin{sloppypar}
begin{paracol}{2}

section*{This is a heading!}
switchcolumn

begin{Arabic} 
noindent large
textbf{هذا عنوان} 
end{Arabic}
switchcolumn*

end{paracol}
end{sloppypar}

end{document}

And the output:

enter image description here

As can be seen the English and Arabic headings are not aligned? If I make the English text a non-section, alignment is fine, but I have issues with table of content.

Any help appreciated.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP