-
Notifications
You must be signed in to change notification settings - Fork 114
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
Break line first call of \text<lang> or \foreignlanguage #1041
Comments
Oh, bother! Thank you very much for reporting this issue. I think I could figure out why it appears (the |
Hopefully e7e7c38 fixes this. Some more tests in real world documents would be appreciated. Just add the \documentclass{report}
\usepackage{polyglossia}
\setmainlanguage{italian}
\setotherlanguage{english}
\usepackage{biblatex}
\makeatletter
% {<file>}{<message>}{<preload>}{<postload>}{<success>}{<failure>}
\protected\long\def\blx@lbx@input@handler@simple#1#2#3#4#5#6{%
\blx@info@noline{Trying to load #2..}%
\IfFileExists{#1}
{\blx@info@noline{... file '#1' found}%
\csuse{blx@lbxfilehook@simple@preload@#1}%
#3%
\setbox\@tempboxa=\hbox\bgroup\@@input\@filef@und\egroup
#4%
\csuse{blx@lbxfilehook@simple@postload@#1}%
#5%
\ifcsundef{blx@file@lbx@simple@#1}
{\listxadd\blx@list@req@stat{#1}%
\@addtofilelist{#1}%
\global\cslet{blx@file@lbx@simple@#1}\@empty}
{}}
{\blx@info@noline{... file '#1' not found}%
\csuse{blx@lbxfilehook@simple@failure@#1}%
#6}}
% {<file>}{<message>}{<preload>}{<postload>}{<success>}{<failure>}
\protected\long\def\blx@lbx@input@handler@once#1#2#3#4#5#6{%
\ifcsundef{blx@file@lbx@once@#1}
{\blx@info@noline{Trying to load #2..}%
\IfFileExists{#1}
{\blx@info@noline{... file '#1' found}%
\csuse{blx@lbxfilehook@once@preload@#1}%
#3%
\setbox\@tempboxa=\hbox\bgroup\@@input\@filef@und\egroup
#4%
\csuse{blx@lbxfilehook@once@postload@#1}%
#5%
\ifcsundef{blx@file@lbx@simple@#1}
{\listxadd\blx@list@req@stat{#1}%
\@addtofilelist{#1}}
{}}
{\blx@info@noline{... file '#1' not found}%
\csuse{blx@lbxfilehook@once@failure@#1}%
#6}%
\global\cslet{blx@file@lbx@once@#1}\@empty
\global\cslet{blx@file@lbx@simple@#1}\@empty}
{#5}}
\makeatother
\begin{document}
% Questo è un esempio \foreignlanguage{english}{inline}.
Questo è un esempio \textenglish{inline}.
Anche questo è un esempio \foreignlanguage{english}{inline}.
Un altro esempio è il seguente \textenglish{inline}.
\end{document} |
Sorry :(. But it doesn't work. |
Did you put the new code between `\makeatletter`. … `\makeatother`?
Herbert
… Am 27.08.2020 um 21:28 schrieb Lorenzo ***@***.***>:
Sorry :(. But it doesn't work.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#1041 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADCLIPY5L57BXRUQ75MICXDSC2XXPANCNFSM4QM3NHEA>.
|
Sorry for my mistake. It works. Thank you. |
I was having the same problem when using Polyglossia and switching from English (main language) to ancient Greek. I'm happy to say that this fixes the problem. Thanks for the quick fix! |
I'm sorry for the confusion. Serves me right for not posting a full MWE. Yes the code must be wrapped in Still testing in larger documents would be appreciated. I have conducted a few small tests, but it would be good to hear if this change has any negative impact on other parts of the document that wasn't present in these tests. I'm particularly interested in bibstrings and localisation. So you may want to double check that all |
@moewew The new code can handle something like the following fine: @article{ worlfsdorf-eironeia-aristophanes-plato-2008,
author = {Wolfsdorf, David},
title = {\textgreek{Εἰρωνεία} in Aristophanes and Plato},
shorttitle = {\textgreek{Εἰρωνεία}},
journal = {Classical Quarterly},
year = {2008},
volume = {58},
number = {2},
pages = {666-672},
keywords = {secondary,irony,aristophanes},
} That item appears correctly both in footnotes and in the final bibliography when I use the new patch. |
@telemachus Great. Thanks for testing. If you find anything that doesn't work, please don't hesitate to complain here. |
I'm not too happy about boxing the file contents when reading. @u-fischer had a few suggestions in https://tex.stackexchange.com/questions/560329/a-phantom-linebreak-with-polyglossia-and-biblatex#comment1414497_560329, so I might want to explore those in the next days when I have time. (I think catcode trickery is out, so at the moment the |
Languages that are loaded on the fly and are not reported via the official channels by babel/polyglossia are recorded in the .aux file and loaded on a subsequent run. A rerun warning is emitted if required. Allows us to roll back e7e7c38.
1b12b2a contains a different, more sophisticated fix for this issue. As suggested by Ulrike in https://tex.stackexchange.com/questions/560329/a-phantom-linebreak-with-polyglossia-and-biblatex#comment1414497_560329 we now 'collect' languages we haven't loaded in the Testing would be very much appreciated. Because the code changes are a bit deeper than the few lines we had in e7e7c38 (which is reverted now) https://gist.github.com/moewew/55f8a7de54f5b7033ed9cb00efbd3371 contains a drop-in replacement version of If you find any issues with https://gist.github.com/moewew/55f8a7de54f5b7033ed9cb00efbd3371 please let me know. |
@moewew I apologize for not replying sooner. (I'm a teacher, and school just started up again. Busy, busy.) I'm using your replacement for biblatex.sty, and it's been perfect in initial tests. The problem is fixed, and it doesn't seem to create any new issues. I'll keep using it in other projects and let you know if I notice anything else. Thanks. |
@telemachus Thank you very much for testing the changes and the feedback! |
|
With the following code:
The results are
The text was updated successfully, but these errors were encountered: