Re: Re: [LyX/master] + es/Letter standard class (from Dan)

2023-09-24 Thread Udicoudco
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)

2023-09-24 Thread 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: Re: [LyX/master] + es/Letter standard class (from Dan)

2023-09-24 Thread Udicoudco
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