Re: [LyX/master] + es/Letter standard class (from Dan)
On Fri, Sep 29, 2023 at 05:01:07PM +0200, Jürgen Spitzmüller wrote: > Am Freitag, dem 29.09.2023 um 10:42 -0400 schrieb Scott Kostyshak: > > Thanks, done at 46a62573. > > > > If I understand correctly, Udi suggested an additional change, which > > was > > replacing > > > > \addto\shorthandsspanish{\spanishdeactivate{~<>}} > > > > with: > > > > \addto\shorthandsspanish{\spanishdeactivate{~}} > > Yes, that's possible (as \deactivatequoting also deactivates <>, but > not strictly necessary. OK, since I don't understand this much I'll leave it as is. Scott signature.asc Description: PGP signature -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] + es/Letter standard class (from Dan)
Am Freitag, dem 29.09.2023 um 10:42 -0400 schrieb Scott Kostyshak: > Thanks, done at 46a62573. > > If I understand correctly, Udi suggested an additional change, which > was > replacing > > \addto\shorthandsspanish{\spanishdeactivate{~<>}} > > with: > > \addto\shorthandsspanish{\spanishdeactivate{~}} Yes, that's possible (as \deactivatequoting also deactivates <>, but not strictly necessary. -- Jürgen signature.asc Description: This is a digitally signed message part -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] + es/Letter standard class (from Dan)
On Fri, Sep 29, 2023 at 12:42:33PM +0200, Jürgen Spitzmüller wrote: > Am Samstag, dem 23.09.2023 um 12:37 -0400 schrieb Scott Kostyshak: > > Jürgen, do you have time/interest to take a look? > > The way to go, I think, is (as Udi suggested), the attached. Thanks, done at 46a62573. If I understand correctly, Udi suggested an additional change, which was replacing \addto\shorthandsspanish{\spanishdeactivate{~<>}} with: \addto\shorthandsspanish{\spanishdeactivate{~}} I don't understand any of this, so if that additional change makes sense, please commit. Scott signature.asc Description: PGP signature -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] + es/Letter standard class (from Dan)
Am Samstag, dem 23.09.2023 um 12:37 -0400 schrieb Scott Kostyshak: > Jürgen, do you have time/interest to take a look? The way to go, I think, is (as Udi suggested), the attached. -- Jürgen diff --git a/lib/languages b/lib/languages index 315707742b..a027a430b8 100644 --- a/lib/languages +++ b/lib/languages @@ -1438,6 +1438,7 @@ Language spanish LangCode es_ES PostBabelPreamble \addto\shorthandsspanish{\spanishdeactivate{~<>}} + \deactivatequoting EndPostBabelPreamble End @@ -1454,6 +1455,7 @@ Language spanish-mexico LangCode es_MX PostBabelPreamble \addto\shorthandsspanish{\spanishdeactivate{~<>.}} + \deactivatequoting EndPostBabelPreamble End signature.asc Description: This is a digitally signed message part -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Re: [LyX/master] + es/Letter standard class (from Dan)
On Sun, Sep 24, 2023 at 9:24 PM Udicoudco wrote: > > On Sun, Sep 24, 2023 at 8:59 PM Dan wrote: > > I could not reproduce the problem in "article" or "book" document classes, > > but it does arise in these classes (test LaTeX document attached) > > - paper > > - Koma-Script variants: scrartcl, scrbook, scrreport. > > As the bug report show, the symbols '>' and '<' are activated (have > category code 13 and their > definition is of the form \active@prefix >\active@char>), this is > regardless of the documentclass. > The fact that there is an error really depends on the body of the > document (see the attachment > for a simple example of a document that use article and produce an error). > > > > The last activity in that repository was two years ago... I am unsure > > whether he still watches that. I can try to reach him through > > http://www.cervantex.es/. Also, to see if anyone there has experienced this > > problem with babel-spanish, as there is a mailing list for users of (La)TeX > > in Spanish. > > Javier is the maintainer of babel in general and is very active. > I think it is reasonable to wait a few days before trying to reach > him in other ways. > > > That is another option, with the plus that the user can turn it on/off at > > will. > > That line alone in the preamble will not work, the language package must be > > added as well, like this > > > > \usepackage[spanish]{babel} > > \deactivatequoting > > > > because LyX puts the preamble code BEFORE the language-package inclusion. > > I meant to add the macro \deactivatequoting to the PostBabelPreamble tag > of Spanish in lib/languages, i.e. replacing > > \addto\shorthandsspanish{\spanishdeactivate{~<>}} > > with > > \addto\shorthandsspanish{\spanishdeactivate{~}} > \deactivatequoting > > Best regards, > Udi -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Re: [LyX/master] + es/Letter standard class (from Dan)
24 de set. de 2023, 10:47 per udifog...@gmail.com: >> > On Sun, Sep 24, 2023 at 01:48:17AM +0200, Dan wrote: >> > >> >> I provide a better workaround for this problem: custom command to set the >> >> language in Document > Settings... > Language. >> >> The command is >> >> \usepackage[spanish,es-noquoting]{babel} >> >> which sets the document's language to Spanish and disables the shorthands >> >> < and >; and for some reason seems to work ^^'. >> > > Yes, I've noticed this option exists, the problem is not just with Letter > document class. > I could not reproduce the problem in "article" or "book" document classes, but it does arise in these classes (test LaTeX document attached) - paper - Koma-Script variants: scrartcl, scrbook, scrreport. Also, the problem only shows when using either < or >, not ". Note that ~ is considered obsolete since version 4 (although activated), and is deactivated by default in version 5 of babel-spanish. So it might be a problem in the babel-spanish package after all. And therefore I thank you for taking the time to report it :). > The problem that babel-spanish activates '<' and '>' > at the beginning of the document (unless the es-noquoting option > is passed or the macro \deactivatequoting is issued before that), so using > > \addto\shorthandsspanish{\spanishdeactivate{<>}} > > I've made a bug report at babel-spanish, > and I'm waiting for a reply from Javier. > The last activity in that repository was two years ago... I am unsure whether he still watches that. I can try to reach him through http://www.cervantex.es/. Also, to see if anyone there has experienced this problem with babel-spanish, as there is a mailing list for users of (La)TeX in Spanish. > adding to the preamble the line \deactivatequoting is the best way to go. > That is another option, with the plus that the user can turn it on/off at will. That line alone in the preamble will not work, the language package must be added as well, like this \usepackage[spanish]{babel} \deactivatequoting because LyX puts the preamble code BEFORE the language-package inclusion. Daniel. -- Enviat amb Tutanota. %% LyX 2.4.0~RC1.devel created this file. For more info, see https://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[spanish]{scrreport} %article,paper,scrreport,scrartcl,scrbook,book \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{babel} \addto\shorthandsspanish{\spanishdeactivate{"~<>}} %% Replace " for either < or > in the code below to trigger the error \begin{document} \title{Título "} \author{Autor "} \maketitle %\begin{abstract} %Resumen del contenido del artículo %\end{abstract} \part{Parte "} Introducción parte 1. \section{Sección "} Texto de la sección. \subsection{Subsección "} Texto de la subsección \subsection{Otra subsección "} Esta es la segunda subsección \section{Otra sección "} Esta es la segunda sección \end{document} -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] + es/Letter standard class (from Dan)
On Sun, Sep 24, 2023 at 11:46:50AM +0300, Udicoudco wrote: > Let's wait and see what Javier is saying at > https://github.com/jbezos/babel-spanish/issues/11 Thanks for reporting that! Scott signature.asc Description: PGP signature -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: Re: [LyX/master] + es/Letter standard class (from Dan)
On Sun, Sep 24, 2023 at 5:12 AM Dan wrote: > > Data: 24 de set. de 2023, 2:40 > De: skost...@lyx.org > A: d3v...@tutanota.com > Assumpte: Re: [LyX/master] + es/Letter standard class (from Dan) > > > > On Sun, Sep 24, 2023 at 01:48:17AM +0200, Dan wrote: > > > >> I provide a better workaround for this problem: custom command to set the > >> language in Document > Settings... > Language. > >> The command is > >> \usepackage[spanish,es-noquoting]{babel} > >> which sets the document's language to Spanish and disables the shorthands > >> < and >; and for some reason seems to work ^^'. Yes, I've noticed this option exists, the problem is not just with Letter document class. The problem that babel-spanish activates '<' and '>' at the beginning of the document (unless the es-noquoting option is passed or the macro \deactivatequoting is issued before that), so using \addto\shorthandsspanish{\spanishdeactivate{<>}} won't work correctly. I've made a bug report at babel-spanish, and I'm waiting for a reply from Javier. > > Thanks, I committed it at fa67f709. If anyone suggests a different > > approach/fix, feel free to change it. It fixes the problem only for the example file. But all other files would still have '<' and '>' activated, and from the line \addto\shorthandsspanish{\spanishdeactivate{~<>}} in the languages file we are clearly trying to avoid that. I don't think passing the option es-noquoting is good for a general solution, as it prevents from users to activate '<' and '>' if they would like to, probably adding to the preamble the line \deactivatequoting is the best way to go. Let's wait and see what Javier is saying at https://github.com/jbezos/babel-spanish/issues/11 Best regards, Udi -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
FWD: Re: [LyX/master] + es/Letter standard class (from Dan)
Data: 24 de set. de 2023, 2:40 De: skost...@lyx.org A: d3v...@tutanota.com Assumpte: Re: [LyX/master] + es/Letter standard class (from Dan) > On Sun, Sep 24, 2023 at 01:48:17AM +0200, Dan wrote: > >> I provide a better workaround for this problem: custom command to set the >> language in Document > Settings... > Language. >> The command is >> \usepackage[spanish,es-noquoting]{babel} >> which sets the document's language to Spanish and disables the shorthands < >> and >; and for some reason seems to work ^^'. >> > > Thanks, I committed it at fa67f709. If anyone suggests a different > approach/fix, feel free to change it. > > Scott > signature.asc Description: PGP signature -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] + es/Letter standard class (from Dan)
>> See section 1.10 of babel's manual, on page 12 under >> "TROUBLESHOOTING". There cannot be >> a closing curly brace after a shorthand, and in babel-spanish ">" is a >> shorthand. >> You are right (https://ctan.javinator9889.com/macros/latex/required/babel/base/babel.pdf). The particular options and macros for Spanish are in the package "babel-spanish", whose manual is here (https://ctan.javinator9889.com/macros/latex/contrib/babel-contrib/spanish/spanish.pdf). It is in Spanish, but there is a resume in English at the end. > Oh wait, I did not notice that LyX adds the line > > \addto\shorthandsspanish{\spanishdeactivate{~<>}} > > to the preamble. but for some reason the shorthand does not get > deactivated... even the category code is wrong. > Oddly, the LaTeX instruction SHOULD work: it deactivates the three characters as shorthands, permanently; as clearly stated in the manual of babel-spanish (beginning of page 8). I believe the problem is in the document class, not the language package, as this does not happen with other document classes. Download the two TeX files (variants of the letter document) attached and process them with pdflatex (pdflatex name-of-file.tex). No errors arose in my system (LinuxMint 21.2 with TeXLive). - One has some environments after the body of the letter commented out. - The other, has replaced the problematic character > for " (added the latter to \spanishdeactivate). This should yield the very same problem, but does not. Altogether hints the problem is in some particular environments of this class. Unfortunately, I do not know LaTeX that much to dive into the document class definition to figure out the source of the problem. >> Attached is a manual workaround for this particular document, but it >> should be fixed somehow. >> maybe we should keep a list of shorthands for each language and check >> if there is a closing curley >> brace after a shorthand? >> I provide a better workaround for this problem: custom command to set the language in Document > Settings... > Language. The command is \usepackage[spanish,es-noquoting]{babel} which sets the document's language to Spanish and disables the shorthands < and >; and for some reason seems to work ^^'. Daniel. -- Enviat amb Tutanota. %% LyX 2.4.0~RC1.devel created this file. For more info, see https://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[spanish]{letter} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{babel} \addto\shorthandsspanish{\spanishdeactivate{~<>}} \begin{document} \address{\\ \\ } \letter{\\ \\ } \signature{} \opening{} » (ambos incluidos) por el texto real de la carta. %\closing{} %\cc{} %\encl{} %\thispagestyle{firstpage}\telephone{} \thispagestyle{firstpage}\location{} \end{document} Letter__28Standard_Class_29.lyx Description: application/lyx %% LyX 2.4.0"RC1.devel created this file. For more info, see https://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[spanish]{letter} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{babel} \addto\shorthandsspanish{\spanishdeactivate{"~<>}} \begin{document} \address{-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] + es/Letter standard class (from Dan)
On Sat, Sep 23, 2023 at 9:09 PM Udicoudco wrote: > > On Sat, Sep 23, 2023 at 7:37 PM Scott Kostyshak wrote: > > > > On Sat, Sep 23, 2023 at 05:40:19PM +0200, Dan wrote: > > > > > > > > > > On Tue, Sep 19, 2023 at 10:31:16PM +0200, Pavel Sanda wrote: > > > > > > > >> commit a624e52c95f43dacc0dfb19a3392fcc642f3ae4d > > > >> Author: Pavel Sanda > > > >> Date: Tue Sep 19 23:47:58 2023 +0200 > > > >> > > > >> + es/Letter standard class (from Dan) > > > >> --- > > > >> > > > > > > > > Does this compile for you? For me I get an error: > > > > > > > > ! Extra \fi. > > > > \language@active@arg> ...string #1@\endcsname \fi > > > > > > > > Scott > > > > > > > > See section 1.10 of babel's manual, on page 12 under > "TROUBLESHOOTING". There cannot be > a closing curly brace after a shorthand, and in babel-spanish ">" is a > shorthand. > > Attached is a manual workaround for this particular document, but it > should be fixed somehow. > maybe we should keep a list of shorthands for each language and check > if there is a closing curley > brace after a shorthand? > Oh wait, I did not notice that LyX adds the line \addto\shorthandsspanish{\spanishdeactivate{~<>}} to the preamble. but for some reason the shorthand does not get deactivated... even the category code is wrong. -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] + es/Letter standard class (from Dan)
On Sat, Sep 23, 2023 at 7:37 PM Scott Kostyshak wrote: > > On Sat, Sep 23, 2023 at 05:40:19PM +0200, Dan wrote: > > > > > > > On Tue, Sep 19, 2023 at 10:31:16PM +0200, Pavel Sanda wrote: > > > > > >> commit a624e52c95f43dacc0dfb19a3392fcc642f3ae4d > > >> Author: Pavel Sanda > > >> Date: Tue Sep 19 23:47:58 2023 +0200 > > >> > > >> + es/Letter standard class (from Dan) > > >> --- > > >> > > > > > > Does this compile for you? For me I get an error: > > > > > > ! Extra \fi. > > > \language@active@arg> ...string #1@\endcsname \fi > > > > > > Scott > > > > See section 1.10 of babel's manual, on page 12 under "TROUBLESHOOTING". There cannot be a closing curly brace after a shorthand, and in babel-spanish ">" is a shorthand. Attached is a manual workaround for this particular document, but it should be fixed somehow. maybe we should keep a list of shorthands for each language and check if there is a closing curley brace after a shorthand? Best regards, Udi Letter__28Standard_Class_29.lyx Description: application/lyx -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] + es/Letter standard class (from Dan)
On Sat, Sep 23, 2023 at 05:40:19PM +0200, Dan wrote: > > > > On Tue, Sep 19, 2023 at 10:31:16PM +0200, Pavel Sanda wrote: > > > >> commit a624e52c95f43dacc0dfb19a3392fcc642f3ae4d > >> Author: Pavel Sanda > >> Date: Tue Sep 19 23:47:58 2023 +0200 > >> > >> + es/Letter standard class (from Dan) > >> --- > >> > > > > Does this compile for you? For me I get an error: > > > > ! Extra \fi. > > \language@active@arg> ...string #1@\endcsname \fi > > > > Scott > > Thanks for the quick reply, Dan! > It does not compile here, same error. I recall that I only generated the > output for Catalan Thanks for checking that! It also passes the tests here. > and assumed Spanish would not give any problems. Fair assumption. > Surprisingly, > 1. If you change the letter's language from Spanish to English, the > compilation process generates de output with no problem. > 2. If you erase all the content past the body of the letter (closing, cc, > and the like), it compiles with no problem as well. > > So the problem seems to have to do with the letter's language. But honestly, > I have no idea about how to solve this ^^'. > I created the template letter from the existing English one, changed the > document's language and the contents from English to Spanish, that's it. So > nothing tricky or especial was made to that document. Thanks, those details help! > Let's see what Pavel replies. In any case, let me know if I can do anything > to help solve this I don't know anything about language either. Jürgen, do you have time/interest to take a look? Scott signature.asc Description: PGP signature -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] + es/Letter standard class (from Dan)
> On Tue, Sep 19, 2023 at 10:31:16PM +0200, Pavel Sanda wrote: > >> commit a624e52c95f43dacc0dfb19a3392fcc642f3ae4d >> Author: Pavel Sanda >> Date: Tue Sep 19 23:47:58 2023 +0200 >> >> + es/Letter standard class (from Dan) >> --- >> > > Does this compile for you? For me I get an error: > > ! Extra \fi. > \language@active@arg> ...string #1@\endcsname \fi > > Scott > It does not compile here, same error. I recall that I only generated the output for Catalan and assumed Spanish would not give any problems. Surprisingly, 1. If you change the letter's language from Spanish to English, the compilation process generates de output with no problem. 2. If you erase all the content past the body of the letter (closing, cc, and the like), it compiles with no problem as well. So the problem seems to have to do with the letter's language. But honestly, I have no idea about how to solve this ^^'. I created the template letter from the existing English one, changed the document's language and the contents from English to Spanish, that's it. So nothing tricky or especial was made to that document. Let's see what Pavel replies. In any case, let me know if I can do anything to help solve this Daniel. -- Enviat amb Tutanota. -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: [LyX/master] + es/Letter standard class (from Dan)
On Tue, Sep 19, 2023 at 10:31:16PM +0200, Pavel Sanda wrote: > commit a624e52c95f43dacc0dfb19a3392fcc642f3ae4d > Author: Pavel Sanda > Date: Tue Sep 19 23:47:58 2023 +0200 > > + es/Letter standard class (from Dan) > --- Does this compile for you? For me I get an error: ! Extra \fi. \language@active@arg> ...string #1@\endcsname \fi Scott signature.asc Description: PGP signature -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel