Daniel Cerqueira <[email protected]> writes: > Gavin Smith <[email protected]> writes: > >> On Fri, Dec 26, 2025 at 01:54:59PM +0000, Daniel Cerqueira wrote: >>> Hi. >>> >>> I am making a book with the help of Texinfo. This book is in European >>> Portuguese (Portuguese of Portugal). >>> >>> When I compile the book to PDF, instead of having book links that say >>> "Secção X.X.X" (Section X.X.X , on an English translation), my compiled >>> book appears with links that say "Seção X.X.X" (mind the omission of the >>> "c" behind the "ç"). Which makes those links to be in Brazilian >>> Portuguese, instead of Portugal's Portuguese. And my book is written in >>> Portugal's Portuguese. >>> >>> I have fetched the source, did a `find` together with an `xargs` and >>> with a `sed`, to replace all occurrences of [Ss]eç with [Ss]ecç . 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: >>> >>> $ 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ç/Secç/g' -e 's/seç/secç/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 record >> of whether it was Brazilian or Portuguese Portuguese. See old email below. >> (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ção". 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 -- The pioneers of a warless world are the youth that refuse military service. ~ Albert Einstein
signature.asc
Description: PGP signature
