-
Notifications
You must be signed in to change notification settings - Fork 118
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
Patching footnotes fails with polyglossia and Hebrew. #412
Comments
Hmm, @josephwright - any idea? Looks like hebrew isn't that well supported in |
It looks like it affects all RTL languages (arabic, farsi, urdu, etc.) You can also trigger the warning by loading the |
Maybe this is also at least tangentially related to #157. On TeX.SX there is Biblatex authoryear-icomp doesn't work as expected with polyglossia hebrew support on. |
Patch footnotes when bidi is loaded (fixes #412)
@plk, I might have been a bit hasty. This certainly fixes some problems (like dcpurton/biblatex-sbl#49), but the ibidtracker still doesn't seem to behave correctly. I'll keep looking into it. |
Got it, I think! |
Ok, please base it on the last request as it's already merged ... |
Will do. But I'm having trouble with the macro patch :(. The \long\def\@footnotetext#1{%
\footdir@write
\footdir@fntext{\bidi@footdir@footnote}%
\stepcounter{footdir@label}%
\footdir@fntext{\bidi@footdir@footnote}%
\footdir@toks{#1}%
\footdir@toks\expandafter
{\the\expandafter\footdir@toks
\expandafter \zref@labelbyprops
\expandafter{\thefootdir@label}{abspage}}%
\expandafter\footdir@ORG@bidi@footnotetext
\expandafter{\the\footdir@toks}} The Any ideas? |
@moewew ? |
I've come up with what I think is a suitable fix. I'll do a little more testing this time... Sorry! This is the current proposed patch. Feel free to comment. diff --git a/tex/latex/biblatex/biblatex.sty b/tex/latex/biblatex/biblatex.sty
index 398136c..33f0027 100644
--- a/tex/latex/biblatex/biblatex.sty
+++ b/tex/latex/biblatex/biblatex.sty
@@ -75,6 +75,25 @@
%% Compatibility
+\catcode`\#=12
+\def\blx@patchbidifootnotes{%
+ \patchcmd\@footnotetext
+ {#1}
+ {\toggletrue{blx@footnote}#1}
+ {\togglefalse{blx@tempa}}
+ {}
+ \patchcmd\@LTRfootnotetext
+ {#1}
+ {\toggletrue{blx@footnote}#1}
+ {\togglefalse{blx@tempa}}
+ {}
+ \patchcmd\@RTLfootnotetext
+ {#1}
+ {\toggletrue{blx@footnote}#1}
+ {\togglefalse{blx@tempa}}
+ {}}
+\catcode`\#=6
+
\AtEndPreamble{%
\def\do#1{%
\@ifpackageloaded{#1}
@@ -195,16 +214,8 @@
{\togglefalse{blx@tempa}}
{}}
{}%
- \@ifpackageloaded{bidi}{% bidi
- \def\do#1{
- \pretocmd#1
- {\toggletrue{blx@footnote}}
- {\togglefalse{blx@tempa}}
- {}}%
- \docsvlist{%
- \@footnotetext,
- \@LTRfootnotetext,
- \@RTLfootnotetext}}%
+ \@ifpackageloaded{bidi}% bidi
+ {\blx@patchbidifootnotes}
{}%
\@ifclassloaded{memoir}
{\def\do#1{% |
Thank you for the patch. Maybe it is safer to wrap the |
I thought of that. But then you need to use |
Actually... Of course it won't... Brain fail. I'll use the |
The following MWE gives a warning about patching footnotes.
The text was updated successfully, but these errors were encountered: