Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Echo of long headings in right-to-left scripts #977

Open
lueck opened this issue Sep 30, 2024 · 1 comment
Open

Echo of long headings in right-to-left scripts #977

lueck opened this issue Sep 30, 2024 · 1 comment

Comments

@lueck
Copy link

lueck commented Sep 30, 2024

Version

Master branch as of Tue Jul 23 21:09:35 2024 +0200, 80d4779.

TeX Engine

  • lualatex

as in texlive 2023

Regression

Description

A long section title in arabic script has kind of echo, i.e., a portion of it is repeated right after it. The echo is made up from a certain word of the section title till its end. The starting position is not fixed, but varies with script size.

In the minimal working example, the chapter title consists of arabic numerals "one", "two", etc. Numbers from "twelve" on are repeated right after the chapter heading.

The echo goes away, if justification=kashida is commented out in the \babelprovide command in the preamble. (I need kashida-justification in my edition of arabic poetry.)

The plain sectioning command \chapter etc. work as expected. There is no echo in latin-script headings like the German chapter title in the MWE.

This issue may be related to #976. It may be a regression of #243.

I'm using babel from texlive 2023 ( babel 2023/04/18 3.88) and have also tested with more recent babel versions.

Minimal Working Example

\documentclass[%
10pt% use other font sizes, too!
]{book}

% for bigger font sizes
%\usepackage[fontsize=14pt]{scrextend}

\usepackage{ifluatex}
\ifluatex
%% for luatex
\usepackage[utf8]{luainputenc}
\usepackage{luabidi}
\else
%% for pdftex
\FAIL
\fi

\usepackage[ngerman,english,bidi=basic]{babel}
\babelprovide[import,main%
,justification=kashida%  COMMENT THIS OUT AN THE ECHOS WILL DISAPPEAR!
]{arabic}

\babelfont{rm}[Scale=1.4]{FreeSerif}

%\setRTLmain
    
\usepackage{reledmac}

% number every line beginning from the first
\firstlinenum{1}
\linenumincrement{1}


\begin{document}

\selectlanguage{arabic}

\beginnumbering

% CHAPTER 1
\pstart
\eledchapter[واحد]{
%1
واحد
%2
إثنان
%3
ثلاثة
% 4
أربعة
%5
خمسة
%6
ستّة
%7
سبعة
%8
ثمانية
%9
تسعة
%10
عشرة
%11
إحدى عشر
%12
إثنا عشر
%13
ثلاثة عشر
%14
أربعة عشر
%15
خمسة عشر
%16
ستّة عشر
%17
سبعة عشر
%18
ثمانية عشر
%19
تسعة عشر
%20
عشرون
}
\pend

\pstart
يتدفّق بعجائب نظمه ونثرِه ، ويُطوِّق أعناق المشارق والمغارب بنفائس دُرّه ، لا تشقّ ثبجَه%
\pend

\pstart
\eledsection[واحد]{
%1
واحد
%2
إثنان
%3
ثلاثة
}
\pend

\pstart
يتدفّق بعجائب نظمه ونثرِه ، ويُطوِّق أعناق المشارق والمغارب بنفائس دُرّه ، لا تشقّ ثبجَه%
\pend

\endnumbering



% CHAPTER 2
\chapter[]{
%1
واحد
%2
إثنان
%3
ثلاثة
% 4
أربعة
%5
خمسة
%6
ستّة
%7
سبعة
%8
ثمانية
%9
تسعة
%10
عشرة
%11
إحدى عشر
%12
إثنا عشر
%13
ثلاثة عشر
%14
أربعة عشر
%15
خمسة عشر
%16
ستّة عشر
%17
سبعة عشر
%18
ثمانية عشر
%19
تسعة عشر
%20
عشرون
}


% arbic text
يتدفّق بعجائب نظمه ونثرِه ، ويُطوِّق أعناق المشارق والمغارب بنفائس دُرّه ، لا تشقّ ثبجَه%

\section[واحد]{
%1
واحد
%2
إثنان
%3
ثلاثة
}

% arabic text
يتدفّق بعجائب نظمه ونثرِه ، ويُطوِّق أعناق المشارق والمغارب بنفائس دُرّه ، لا تشقّ ثبجَه%


\newpage

\selectlanguage{ngerman}

\beginnumbering

% CHAPTER 3
\pstart
\eledchapter[Barocke Überschriften]{Barocke Überschriften sind oft grammatisch vollständige Sätze, die Nebensätze haben; manchmal sind es sogar Satzreihen!}
\pend

\pstart
Altes Wissen \ldots
\pend

\pstart
Altes Wissen \ldots
\pend

\pstart
Altes Wissen \ldots
\pend

\endnumbering

\end{document}

Workaround

None, that I know of.

@lueck
Copy link
Author

lueck commented Oct 8, 2024

Using the same workaround as for #976 does the trick.

@lueck lueck closed this as completed Oct 8, 2024
@maieul maieul reopened this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants