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

Lang pt-BR must set polyglossia-lang.name to brazil instead of brazilian #2953

Closed
edusantana opened this issue May 29, 2016 · 14 comments
Closed

Comments

@edusantana
Copy link

As I understand from #2174 we should set the lang attribute, and it would map to values appropriated for babel and polyglossia.

When I use pt-BR it sets polyglossia-lang.name to brazilian (this is acceptable according to polyglossia documentation), but I get this error:

Package polyglossia Warning: File gloss-brazilian.ldf does not exist!
(polyglossia)                I will nevertheless try to use hyphenation pattern
s for brazilian. on input line 34.

This file doesn't exist, but gloss-brazil.ldf does! So I manually change the polyglossia-lang.name to brazil, and it works:

polyglossia-lang: 
    name: brazil

So, when use set lang: pt-BR it must set polyglossia-lang.name to brazil instead of brazilian.

@edusantana
Copy link
Author

You can see that with pt-BR it doesn't translate the "chapter" word:

lang-pt_br-doesnt-translate-chapter

But when setting to polyglossia-lang.name to brazil:

with-brazil-translates-chapter

@mb21
Copy link
Collaborator

mb21 commented May 30, 2016

From the documentation, both brazil and brazilian should work for polyglossia and babel... so if brazil works on more systems, we could make the change on this line...

@jgm jgm closed this as completed in 561afac May 31, 2016
@edusantana
Copy link
Author

Thanks! It was on Ubuntu 16.04 64-bit.

@jgm
Copy link
Owner

jgm commented Oct 3, 2020

See https://groups.google.com/d/msgid/pandoc-discuss/69070e2d-a24c-4dce-bd05-e315ec109602n%40googlegroups.com. Is it possible that support for brazil has now been dropped, and that we must use brazilian?

@p3palazzo
Copy link

Copying the background reference over here for easier access: when using MacTeX 2020, these are the cases:

  • pdflatex accepts both brazil and brazilian;
  • xelatex only accepts brazilian.

@jgm
Copy link
Owner

jgm commented Oct 7, 2020

I am confident about recent versions. The question is whether versions that only accept brazil are still in wide enough circulation to worry about.

@jgm
Copy link
Owner

jgm commented Oct 8, 2020

@edusantana Since you submitted the original issue, maybe you could let us know if brazil is still needed on your system, or if brazilian now works?

@jgm jgm reopened this Oct 8, 2020
@jgm jgm closed this as completed in ef6627f Oct 13, 2020
@jgm
Copy link
Owner

jgm commented Oct 13, 2020

I've pushed a change; now it gives you

\ifxetex
  % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
  \usepackage{polyglossia}
  \setmainlanguage[variant=brazilian]{portuguese}
\else
  \usepackage[shorthands=off,main=brazilian]{babel}
\fi

Is that what it should be? You can test with the nightly that will be built tonight.

@p3palazzo
Copy link

My BasicTeX 2020 implementation of xelatex isn't happy with the [variant=brazilian] clause. I get this error:

! Undefined control sequence.
\adddialect ...####1####2####3####4{}\fi }\bbl@cs
                                                  {languages}\endgroup
l.67 ...ainlanguage[variant=brazilian]{portuguese}

Not sure if there's something wrong with my installation. I compiled from source using today's master branch.

@jgm jgm reopened this Oct 14, 2020
@jgm
Copy link
Owner

jgm commented Oct 14, 2020

Just pushed a release with the change before seeing this.

I'm not sure what is going on with this, but it would be nice to get feedback from others.
This worked okay for me, and it's in the polyglossia documentation.

@mb21
Copy link
Collaborator

mb21 commented Oct 15, 2020

Does polyglossia have a mailing list? someone wants to ask there?
Or maybe @adunning knows? :)

@p3palazzo
Copy link

p3palazzo commented Oct 15, 2020

Just pushed a release with the change before seeing this.

I'm not sure what is going on with this, but it would be nice to get feedback from others.
This worked okay for me, and it's in the polyglossia documentation.

Then I guess it must be some problem with my TeX installation. I’ll assume your code is correct and will look into what’s wrong on my side. I generated a *.tex file using yesterday’s master branch and, upon inspecting it, I thought it should work indeed.

@tarleb
Copy link
Collaborator

tarleb commented May 10, 2021

I can confirm that the current solution works with TeXLive 2021, but not with TL 2019 (Ubuntu 20.04).

@jgm
Copy link
Owner

jgm commented Mar 2, 2022

I think this can be closed now that we use babel instead of polyglossia.

@jgm jgm closed this as completed Mar 2, 2022
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

5 participants