Re: Portuguese issue in PDF book compilation result
Daniel Cerqueira <[email protected]> Fri, 26 Dec 2025 16:20:37 +0000
| Newsgroups | gmane.comp.tex.texinfo.general |
|---|---|
| Message-ID | <[email protected]> |
--==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Gavin Smith <[email protected]> writes: > On Fri, Dec 26, 2025 at 01:54:59PM +0000, Daniel Cerqueira wrote: >> Hi. >>=20 >> I am making a book with the help of Texinfo. This book is in European >> Portuguese (Portuguese of Portugal). >>=20 >> When I compile the book to PDF, instead of having book links that say >> "Sec=C3=A7=C3=A3o X.X.X" (Section X.X.X , on an English translation), my= compiled >> book appears with links that say "Se=C3=A7=C3=A3o X.X.X" (mind the omiss= ion of the >> "c" behind the "=C3=A7"). Which makes those links to be in Brazilian >> Portuguese, instead of Portugal's Portuguese. And my book is written in >> Portugal's Portuguese. >>=20 >> I have fetched the source, did a `find` together with an `xargs` and >> with a `sed`, to replace all occurrences of [Ss]e=C3=A7 with [Ss]ec=C3= =A7 . Making >> this the Portugal's way of writing, and making my book all in Portugal's >> Portuguese. The command for this replacement is as follows: >>=20 >> $ find src/ -type f -name \*.bib -or -name \*.cls -or -name \*.dtx -or >> -name \*.lang -or -name \*.tex -or -name \*.xml | xargs -d '\n' sed -i >> -e 's/Se=C3=A7/Sec=C3=A7/g' -e 's/se=C3=A7/sec=C3=A7/g' > > I believe the text is coming from doc/txi-pt.tex: > > \gdef\putwordsection{se\,c\~ao} > \gdef\putwordSection{Se\,c\~ao} > > You could edit this to put an extra "c" in: > > \gdef\putwordsection{sec\,c\~ao} > \gdef\putwordSection{Sec\,c\~ao} > > This translation was added in August 1999 although I couldn't see any rec= ord > of whether it was Brazilian or Portuguese Portuguese. See old email belo= w. > (The archived website of the person who wrote it offers text in "Brasilist > Portuguese" so presumably it was supposed to be Brazilian - > <https://web.archive.org/web/20000816000422/http://zope.gf.com.br/lalo>.) > > We should try and fix it to be consistent with what texi2any does. I > believe this would mean that "@documentlanguage pt" or "@documentlanguage= pt_PT" > would give European Portuguese and "@documentlanguage pt_BR" would give > Brazilian Poruguese. I have made the change, and I still get my PDF book compiled with "Se=C3=A7=C3=A3o". I use texi2any when compiling my Texinfo files. Attached is my patch. My changes are copyrighted to Free Software Foundation. You may apply it. =2D-=20 The pioneers of a warless world are the youth that refuse military service. ~ Albert Einstein --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-pt-translation.patch Content-Transfer-Encoding: quoted-printable Content-Description: Texinfo pt (of Portugal) translation =2D-- working/doc/txi-pt.tex 2023-08-09 21:10:43.000000000 +0100 +++ latest/doc/txi-pt.tex 2025-12-26 15:50:14.179877137 +0000 @@ -1,6 +1,6 @@ % txi-pt.tex -- Portuguese translations for texinfo.tex. % =2D% Copyright 1999, 2007, 2008 Free Software Foundation, Inc. +% Copyright 1999, 2007, 2008, 2025 Free Software Foundation, Inc. % % This program is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by @@ -16,6 +16,7 @@ % along with this program. If not, see <http://www.gnu.org/licenses/>. % % Written by Lalo Martins <[email protected]> at 05 August 1999 +% and by Daniel Cerqueira <[email protected]> at 26 December 2025 =20 \txisetlanguage{portuguese}{2}{3} =20 @@ -30,8 +31,8 @@ \gdef\putwordon{em} \gdef\putwordof{de} \gdef\putwordpage{P\'agina} =2D\gdef\putwordsection{se\,c\~ao} =2D\gdef\putwordSection{Se\,c\~ao} +\gdef\putwordsection{sec\,c\~ao} +\gdef\putwordSection{Sec\,c\~ao} \gdef\putwordsee{veja} \gdef\putwordSee{Veja} \gdef\putwordShortTOC{Breve Sum\'ario} @@ -66,6 +67,6 @@ %% \defvar \gdef\putwordDefvar{Vari\'avel} %% \defopt =2D\gdef\putwordDefopt{Op\,c\~ao de Usu\'ario} +\gdef\putwordDefopt{Op\,c\~ao de Utilizador} %% \deffun \gdef\putwordDeffunc{Fun\,c\~ao} --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJuBAEBCgBYFiEEOVeKaEm0xBhCsMmYlk/BEMQK1XUFAmlOtdUbFIAAAAAABAAO bWFudTIsMi41KzEuMTEsMiwyHhxkYW4uZnJlZXNvZnR3YXJlQGxpc3BjbHViLmNv bQAKCRCWT8EQxArVdSv/EACF9Ww13u3/Jj24YMYnZv7pIggX3XcUO1XO8gmX8ZXs b8VrTaNDyA5P3MziKYSm4znvzqu+cNUHLqKLri99Km88d7ji8p0ERyncA9URdArn LcpiZEn3OSJQXaqvRsIx8f75q5fNxChEN6TOfPbBKxBxdHHMa+mSwStE0NjLf5YA NAkDusxAKweMPZWyQRa88gYASw6lN7qhbL5cczrK/J20cPByywxbK2VNDxftRCNo 7hiptCgjG1xl4+ZUMjO0QoFkPs4BAT3/kO+d35Tbfphm66A8pucgZTq2gP4Pbc58 hfO+37VJqxNjJT/AyGDQKtlCU2emHyHqEwPLyOgB2FgRzL642XUB7sDsclwu1Buk yHAExen0kVM61zD9/M+ccWucmxqYWzs1MkkFOJoi0Jx2wRRlKwkUqulz+QeRpNq0 5BkSRJ3tb/5GpOEN+iNkfKchnoiqzfXLlXWMmxyqZnMqbBAGEabrdgmZsLMnf/JB VnH1khVEgbVvTy1Zl8A+rF/cKolFzECZyBJJEJCFdm3rgYN3lgbxfyG1BV38oMuw iGFKicsjIG1QCkzaiV0ILGxpEA9pWWnzquay9UFJipH56JZh23y3qZ09Ij8cCTM0 C/ji81/MOfWoZsbft8taCAdItaMkQ4sG0pL5OvW1KlPqZWGTckGldzo/RuCgsMHT nA== =K9Rk -----END PGP SIGNATURE----- --==-=-=--