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

problem with reledpar und babel #887

Open
sonator opened this issue Nov 24, 2020 · 8 comments
Open

problem with reledpar und babel #887

sonator opened this issue Nov 24, 2020 · 8 comments

Comments

@sonator
Copy link

sonator commented Nov 24, 2020

#I use the Current versions of reledmac/reledpar

TeX Engine

pdfLaTeX

Regression

Using reledpar v2.7.1 in 2016 I did not have the problem.

Description

Running the MWE below babel writes for every \pstart \pend-paragraph two lines as "\babel@toc {german}{}" into the toc-file. The same effect in the lof-file. In a long manuscript of about 200 pages with reledpar-columns thousands of such lines cause a fatal error of Latex. Do you see a mistake in my code? How can I avoid this behaviour? Thank you.

Minimal Working Example

\documentclass{scrbook}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[german]{babel}

\usepackage[series={A,B},noeledsec,noend]{reledmac}
\usepackage{reledpar}

\begin{document}

\tableofcontents

\chapter{Capitulum primum}

\section{Sectio prima}

\begin{pairs}

\begin{Leftside}
\beginnumbering
\pstart
Columna sinistra. Particula prima.
\pend
\pstart
Columna sinistra. Particula secunda.
\pend
\endnumbering
\end{Leftside}

\begin{Rightside}
\beginnumbering
\pstart
Columna dextra. Particula prima.
\pend
\pstart
Columna dextra. Particula secunda.
\pend
\endnumbering
\end{Rightside}

\end{pairs}
\Columns

Textus Textus Textus Textus Textus Textus Textus Textus Textus Textus

\section{Sectio secunda}
Textus Textus Textus Textus Textus Textus Textus Textus Textus Textus

\end{document}

Type your MWE here

Workaround

@maieul
Copy link
Owner

maieul commented Nov 24, 2020

Well,

  1. What error did you get exactly with your long file ?
  2. I tried version 2.7.0 of reledpar, that we can get in the archive, and I have already the "problem".
  3. I think it existed from the begining of ledpar. When we use bilingual document (which is the main usage of reledpar), we need to switch between the language, in order to get the correct hyphenation, and so one. And we need to do each time we switch of side in typesetting, that is twice by line in 2 column mode
  4. to do it, we just call the \selectlanguage macro of babel. That is this macro that write in the auxiliaries files your line

So solution

  1. maybe you have something wrong in your bigfile.
  2. maybe we could disable switching language if we are sure that left and right language are the same
  3. maybe we could use an other (not existing, as far I know) babel macro which does not write in the auxiliary file.... but I am not sur it is a good idea, as, some time, we have headers inside left or right side.

So before going far in this problem, I need an answer to my question 0.

@maieul
Copy link
Owner

maieul commented Nov 24, 2020

@u-fischer pointed the fact that the issue is mainly a babel issue. I will open an issue there.

However,

  1. I keep this issue opened, as my point 2 as solution should be, indeed, implemented in reledpar (and maybe 3)
  2. For now, as a quick fix, for your case, you can add this just after \begin{document}
\makeatletter
    \renewcommand*{\l@duselanguage}[1]{}
\makeatother

@sonator
Copy link
Author

sonator commented Nov 24, 2020

Thank you for answering so quickly.

This is a log-file extract from a LaTeX run yesterday on several files with a lot of reledpar paragraphs. The corresponding toc-file has more than 12000 lines:

! TeX capacity exceeded, sorry [save size=50000].
...@setfrcodes \sfcode `*=\blx@sf@dot
\expandafter \blx@defpair ...
l.12693 \babel@aux{german}{}

If you really absolutely need more capacity,
you can ask a wizard to enlarge me.

Here is how much of TeX's memory you used:
82908 strings out of 481521
1589731 string characters out of 2915550
2274665 words of memory out of 3000000
94825 multiletter control sequences out of 15000+200000
744998 words of font info for 990 fonts, out of 3000000 for 9000
259 hyphenation exceptions out of 8191
116i,20n,424p,10608b,50000s stack positions out of 5000i,500n,10000p,200000b,50000s
! ==> Fatal error occurred, no output PDF file produced!

PS: This morning I have proved the toc-file of a book manuscript finished with reledmac/reledpar in 2016. It contains the same bulk of babel lines (more than 21.000 !), most of them of this type: \select@language {german} \defcounter {refsection}{0}\relax. But, in those days the LaTeX run did not indicate any error.

@maieul
Copy link
Owner

maieul commented Nov 24, 2020

yes of course. That is the problem with column mode : we need to switch language, and so one to write in the aux file, each time we come from left column to right column. In your case, you don't need it because you use same language in two sides, so my hack should help you.

In some other case, I should improve the code for my 3. solutions

@u-fischer
Copy link

if save size overflows like this it looks like a coding error. If found at least one macro which is changed both globally and locally:

{globally changing \bbl@hymapsel=\char"4}
{changing \bbl@hymapsel=\char"FF}

@maieul
Copy link
Owner

maieul commented Nov 24, 2020

@u-fischer could you open an issue on babel repository ?

@sonator
Copy link
Author

sonator commented Nov 24, 2020

An important Message: My greater files are running comme il faut. Thanks for the hack. Thank you to Ulrike Fischer, too!

@maieul
Copy link
Owner

maieul commented Nov 24, 2020

@sonator be careful with this hack. As explained, it works only if you do not switch languague between your two columns.

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

3 participants