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

Support of polyglossia #69

Closed
asaen opened this issue Jan 15, 2013 · 26 comments
Closed

Support of polyglossia #69

asaen opened this issue Jan 15, 2013 · 26 comments
Assignees

Comments

@asaen
Copy link

asaen commented Jan 15, 2013

AFAIK, there is still no support of polyglossia package. Could you, please, add it?

This feature request is based on tex.stackexchange question - http://tex.stackexchange.com/questions/89882/multilingual-bibliography-using-xetex-biblatex-and-polyglossia

Thanks in advance.

@plk
Copy link
Owner

plk commented Jan 15, 2013

Would like to but this is likely quite a task and won't be tackled in the near future I suspect. It's been on the list for a long time, from before the package author disappeared.

@odomanov
Copy link
Contributor

Philipp said that the problem was the absence of a necessary interface in polyglossia and, more importantly, of the maintainer of polyglossia who could implement this interface. Now polyglossia does have a maintainer, so the problem might be solved, perhaps.

@yrammos
Copy link

yrammos commented Jun 8, 2013

Any progress so far? Thank you.

@plk
Copy link
Owner

plk commented Jun 8, 2013

Not yet and still not planned as I'm fully taken up with looking at multiscript support in biblatex 3.0. One good side effect of this is that I am more familiar with the babel interface in biblatex which is necessary for looking at polyglossia support.

@plk
Copy link
Owner

plk commented Jun 27, 2013

This is now being looked at and is provisionally planned for version 3.0.

@plk
Copy link
Owner

plk commented Jul 1, 2013

@aboruvka, @josephwright - I have started to look at this and it seems to be rather tricky. Ignoring the problems patching polyglossia >1.2 due to luatex code in the target macros, I have been trying to find a place to insert the same macro call as we use in babel:

\blx@langsetup{#1}

somewhere suitable in polyglossia but clearly there is a fundamental issue here as nomatter where I put this, the bibstrings are never changed. The correct .lbx is being loaded, this is obvious from the log but the strings are never switched. Now, the lbx loading routines in biblatex are rather esoteric in terms of groups see the macro \blx@lbxinput@ii which has some exciting mixtures of \bgroup/\egroup and normal groups which I don't really understand yet. I'd appreciate any insights you might have. I will run a trace but last time I did this, it took 20 minutes with no sign of stopping, even if just wrapped round the relevant place, probably due to all the bibstring settings.

PL said that polyglossia lacked hooks in the right places but it seems to me a bit more problematic than that - I've tried manually inserting the biblatex macro just about everywhere sensible and nothing seems to work.

@aboruvka
Copy link
Collaborator

aboruvka commented Jul 1, 2013

I had a look back in April and decided I wouldn't be much help. Back then string language switching was possible with Oleg's citation hooks, but none of the babel-like patches appear to work now with polyglossia 1.3.

@plk
Copy link
Owner

plk commented Jul 1, 2013

I don't think they ever worked with polyglossia - the "support" was limited to just getting the patching to work at all so polyglossia can load. polyglossia internals are quite simple compared to babel but I can't work out why the switching doesn't work ... I'll investigate more but perhaps @josephwright can have a look - he's sure to be more useful in these low-level tricky issues than me ...

@plk
Copy link
Owner

plk commented Sep 28, 2013

We now have a idea about this - the current dev branch and uploaded 2.8 DEV version on SF contains a fix which so far seems to work. Please try it and put any comments here.

@ghost ghost assigned plk Sep 28, 2013
@odomanov
Copy link
Contributor

odomanov commented Oct 1, 2013

This code yields
LaTeX Error: Command \nobreakspace unavailable in encoding EU1.

(2.8 dev, texlive 2013, windows 7).

\documentclass[12pt,a4paper]{article}
\usepackage{xunicode}
\usepackage{fontspec}

\usepackage{polyglossia}
\setdefaultlanguage{english}\setotherlanguages{german,french}%,british,american}

\setmainfont{DejaVu Serif}
\setsansfont{DejaVu Sans}
\setmonofont{DejaVu Sans Mono}

\usepackage[language=auto,babel=other]{biblatex}
\addbibresource{biblatex-examples.bib}

\begin{document}
\selectlanguage{german}Gemäß
\selectlanguage{english}english
\selectlanguage{french}âgé

\nocite{*}

\printbibliography
\end{document}

@plk
Copy link
Owner

plk commented Oct 1, 2013

That's because you're using \usepackage{xunicode} which you don't need I think. Without that it works.

@plk
Copy link
Owner

plk commented Oct 1, 2013

There is some problem with polyglossia .ldf file loading still though it seems, looking into it.

@odomanov
Copy link
Contributor

Ah, yes, sorry. This was indeed a problem with xunicode.

@plk
Copy link
Owner

plk commented Oct 21, 2013

You can try biblatex version 2.8 (needs biber 1.8) which has just been released (not in TL yet though). Polyglossia is now working.

@odomanov
Copy link
Contributor

Yes, this is what I wanted to add but forgot --- it works fine with this new version.

@plk
Copy link
Owner

plk commented Oct 28, 2013

@darkled - Could you try version 2.8 (with biber 1.8)? Polyglossia support is now mostly working.

@georgthegreat
Copy link

Works fine for me too (I'm using lualatex).

@asaen
Copy link
Author

asaen commented Nov 7, 2013

for me it works fine as well (I am using texlive 2013 / xelatex)

@plk plk closed this as completed Nov 7, 2013
@georgthegreat
Copy link

Did you tried to compile large bibliographies with lualatex + biblatex + polyglossia?
Compilation of my 66-paged bibliography crashes when memory usage exceed 2 GB.

@plk
Copy link
Owner

plk commented Nov 7, 2013

Hmm, no - can you ask this on TSE? This sounds like a LuaLaTeX issue ...

@georgthegreat
Copy link

I've already posted to TSE, but I haven't got any answer yet.

@odomanov
Copy link
Contributor

odomanov commented Nov 7, 2013

I ran into a similar issue with xelatex. I don't really know what is responsible for that. It's not exactly about long bibliographies (I compiled succesfully a long one) but somehow about complicated documents. They are compiled fine with babel, but not with polyglossia.

@georgthegreat
Copy link

I've tested a combination of lualatex + babel (instead of polyglossia).
Everything is working fine, memory usage is about 400MB, this is acceptable for me.

So, I think, this bug needs reopening, but it is for @plk to decide.

@plk
Copy link
Owner

plk commented Nov 7, 2013

Hmm - do you see anything strange in the log for the polyglossia example, for example errors about \end called inside a group?

@georgthegreat
Copy link

I'll run some experiments with polyglossia/babel and lualatex on the weekend. I'll place links to the logs here.

@georgthegreat
Copy link

It seems that compilation with polyglossia is working once again — and (you wouldn't believe!) I didn't do anything (to start the investigation with).

Generating .aux file seems to be quite memory-exhausting, but I'm not sure, if I can safely disable it (for the second run of lualatex.

I've placed the log here, but I don't think there is anything interesting inside:
https://gist.github.com/georgthegreat/7386134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants