Closed Marcool04 closed 1 year ago
The new and recommended way to do global changes is via \setglossoptions
, and this works:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[TS1,T1]{fontenc}
\usepackage{covington}
\setglossoptions{fsi={\normalfont\itshape},
fsii={\footnotesize\sffamily},
fsiii={\footnotesize\sffamily}}
\usepackage{hyperref}
\begin{document}
\trigloss[fsii={\itshape}]{building}
{build -ing}
{gloss GRAM}
{translation}
\begin{example}
\digloss{Word}
{gloss}
{translation}
\end{example}
\end{document}
Having written that, the old way of course should continue to work, and I think I know where the problem is.
Should be fixed in the repository. Please test and report back if possible,
Wonderful!
The bug is verified to be gone, when using the \renewcommand{\glosslineone}
etc. method. I'll switch to using the recommended \setglossoptions
in the future. Congratulations and thank you for the very fast fix.
I had to amend the fix, as it did not work with low-level command glossing.
Can I ask you to test again with the recent version in the repo? Thanks.
Sure no problem. Tested and seems to work for me. I used this "low level" example from the documentation:
\NeedsTeXFormat{LaTeX2e}
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[TS1,T1]{fontenc}
\usepackage{/home/mark/Downloads/test/covington}
\renewcommand{\glosslineone}{\normalfont\itshape}
\renewcommand{\glosslinetwo}{\footnotesize\sffamily}
\renewcommand{\glosslinethree}{\footnotesize\sffamily}
\usepackage{hyperref}
\begin{document}
\trigloss[fsii={\itshape}]{building}
{build -ing}
{gloss GRAM}
{translation}
\gll Dit is een Nederlands voorbeeld.
This is a Dutch example.
\glt ‘This is an example in Dutch.’
\glend
\begin{example}
\digloss{Word}
{gloss}
{translation}
\end{example}
\end{document}
Excellent, thank you so much!
No problem, thank you for maintaining covington 😊
V. 2.12 has been submitted to CTAN.
Hi Jürgen, I'm raising this here because this fix doesn't quite do what I would like it to do, and I'm hoping there's a simple fix. Consider the following MWE:
\documentclass{article}
\usepackage{covington}
\setglossoptions{fsi=\bfseries}
\begin{document}
\begin{subexamples}
\item \glosslineone Hello
\item \makeatletter\glosslineone@global Hello
\end{subexamples}
\end{document}
I would expect setting the global gloss options would also change \glosslineone
, but it doesn't. Conversely, if you comment out the \glossoptions
line, the second item fails because \glosslineone@global
isn't defined.
I'd like this specifically to work outside of the glossing environments provided by covington
.
To add a bit more context, I've just released a package allowing use of ExPex glossing macros with other example packages (in addition to their own glossing macros). I'm happy to support covington
too, so this would allow me to set the basic parameters of the ExPex gloss to be the same as the covington
settings.
@amunn it is like that to keep the direct definition of \glosslineone
etc. intact and make examples like the one given in the first post here continue to work.
I don't know enough about your usecase, but would something like this work for you?
\newcommand*{\amglosslineone}{%
\@ifundefined{glosslineone@global}{\glosslineone}{\glosslineone@global}%
}
This would support both \setglossoptions
and the more basic direct redefinition of \glosslineone
, whichever currently is valid.
I guess I don't really understand why \glosslineone@global
isn't set unless you use \setglossoptions
. My goal here is to make things easier for covington
users, so I have no intention of creating a new command. Maybe I should ask the question differently: in the neutral case, which macro from covington
stores the formatting for the first gloss line?
I guess I don't really understand why
\glosslineone@global
isn't set unless you use\setglossoptions
.
Because we check whether it has been defined in that command. Otherwise we use the (possibly manually defined) \glosslineone
(which is the older approach and hence expected in some documents). Changing that would break backwards compatibility.
My goal here is to make things easier for
covington
users, so I have no intention of creating a new command.
Well it would be a one-liner that would arguably make things easier for covington users :-)
Maybe I should ask the question differently: in the neutral case, which macro from
covington
stores the formatting for the first gloss line?
There is not one "neutral" case. There is the (traditional) case of glossing with low-level commands and the (more recent and now recommended) case of using the \[di|tri]gloss
macros.
Ultimately, it is always \glosslineone
that is being used. But there are different ways to set that: (1.) via redefinition of \glosslineone
, (2.) via \setglossoptions
, and (3.) via gloss optional argument (only for the current gloss). (3.) overwrites (2.) overwrites (1.).
Ultimately, it is always
\glosslineone
that is being used. But there are different ways to set that: (1.) via redefinition of\glosslineone
, (2.) via\setglossoptions
, and (3.) via gloss optional argument (only for the current gloss). (3.) overwrites (2.) overwrites (1.).
And the three ways have different scopes:
(3.) only applies to to current gloss (2.) applies to all glosses that use the \digloss and \trigloss macros (unless 3 is set) (1.) applies everywhere (unless 2 or 3 are set)
Hope this helps.
Ok thanks. I think I spoke to quickly on the macro you propose; it doesn't need to be user facing. I'll do that. I'm still not sure I understand the distinction between your (2) and (1). :) But no need to explain more.
Hi there,
First of all, thank you for this very useful package. I believe I have found a slight issue with the behaviour of font styling. Please consider the following MWE:
Notice that the word "gloss" in the second interlinear is NOT in sans font as expected. I have determined that this is caused by the fact that the previous
\trigloss
is outside of the example environment. This may seem "wrong" maybe, but in the case where I was using it, I didn't want a number nor any kind of specific environment around this example, and so typed it like this. But then, the formatting which I had applied to the glosses in the preamble are broken. Compare to this example which behaves as expected:Once again, thank you for your work on this package, and let me know if I can provide any more information on this issue. Best regards, Mark.