Re: Portuguese issue in PDF book compilation result
Daniel Cerqueira <[email protected]> Fri, 26 Dec 2025 16:31:42 +0000
| Newsgroups | gmane.comp.tex.texinfo.general |
|---|---|
| Message-ID | <[email protected]> |
--=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Daniel Cerqueira <[email protected]> writes: > 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), m= y compiled >>> book appears with links that say "Se=C3=A7=C3=A3o X.X.X" (mind the omis= sion 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 re= cord >> of whether it was Brazilian or Portuguese Portuguese. See old email bel= ow. >> (The archived website of the person who wrote it offers text in "Brasili= st >> 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 "@documentlanguag= e 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. After applying the patch and successfully installing Texinfo, it does not work when compiling my book to PDF with `texi2pdf` or with `texi2any`. My .texi file has these lines, at the top: @documentencoding UTF-8 @documentlanguage pt My command for compiling to PDF is: $ texi2any --Xopt -t --Xopt @bsixpaper --Xopt --clean --pdf book.texi =2D-=20 The pioneers of a warless world are the youth that refuse military service. ~ Albert Einstein --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJuBAEBCgBYFiEEOVeKaEm0xBhCsMmYlk/BEMQK1XUFAmlOuG4bFIAAAAAABAAO bWFudTIsMi41KzEuMTEsMiwyHhxkYW4uZnJlZXNvZnR3YXJlQGxpc3BjbHViLmNv bQAKCRCWT8EQxArVdf2yEACx1hFhokzsYlkQieHPJSN+tJlE3iQOLJmfdGKt/yCs D3pYGgSK2Hok6Yrc0iz+foHA6Uy9cfYAS/0gOaNyc3LYXZCUVJ+ZUHFDjD9HNjbR hLyeNsIcBfuB5bQVckeoc0Gb06fullgsP+ftzu0svnybOzBerRn+lvi6Hk9Q/ekL ImUFcXvnn7cj3zK0ufgWRNwnIT2XxEwXG6ZaZeksbwCSu0R59sv5z7I/mwJL2+9n WjARbxRr+eEpJAEYc30K3aEc6mZKrJHz+M/Wn/z8IxrJOXChwbPkssM8tGd3x83G JtiXiTwqV9/gwhT5YrUCwA2P2G7gDsNFkrVkYPYalHnNMEFyLZuEG1WKTUD4UNSc sTP91YFxeuPy41O8GPG+NMrj4gfJ4I7ONeF/gaBISyp8yltzogaMbsVX86hLu5RB wiKHb3XqbBLMK1a6FNrUD8Vg92rcsD/fCn3duv6BBCffAg0wIrIlzbPAaEf1XtKi SZJwJg+5hNLOtdMsuTLtRIpdhVrf35NTAeumxzv8LZXPokyazEBjjmhD/bdA1A5z OUhFROxeAsBj5i6dhtFLCdppZKIliNa1LmDFse6TiF3Yq4CYK6fsGjV7LZqtm0QE wi7N8ywIx9NrOJ8fgJgW7Uwf3IiTnQ/w29TZAJd4fR4uMPIB+8PayMyMVZeutmdn Wg== =2mbL -----END PGP SIGNATURE----- --=-=-=--