#Glossy 0.3.0 - new theme, new "concise" syntax, better type checking

9 messages · Page 1 of 1 (latest)

autumn grail
#

First off, thanks to @night osprey for the new theme-table (image attached), which really went out in 0.2.2 but never got an announcement. Appreciate the bugfix and theme contribution!

Second, thanks to @eltos for proposing and submitting the PR for a new, concise syntax. What this means is that if you just want a 'short' and 'long' version of a term, you can now do this:

  WWW: "Worldwide Web"

... instead of this:

  WWW:
    short: "WWW"
    long: "Worldwide Web"

Really nice usability improvement!

Finally, I've added a decent amount of type-checking (and coercion!) thanks to Valkyrie.

trail lagoon
#

How does WWW: "Worldwide Web" works with description?

Another question is:
In LaTeX i was using glossaries-extra for acronyms with translations when needed. e.g.
Key/Short: EW - Long: Electromagnetic Warfare / Transl: Elektromagnetický boj / Descr: Electromagnetic Warfare is ...

Is there workaround for my-theme to do this?
Like when using first time native language it is (EW) if it is foreign it is (Electromagnetic Warfare - EW).

Here is snippet from LaTeX
\makeglossaries
\newcommand{\zkratka}[5]{
\newglossaryentry{#1}{
name={\textbf{#2}},
text={\textbf{#2}},
first={
\ifstrempty{#4}{
(\textbf{#2})
}{
(\textbf{#3} -- \textbf{#2})
}
},
description={\textbf{#3} \textit{#4}\newline#5}
}
}

autumn grail
#

@trail lagoon

How does WWW: "Worldwide Web" works with description?

It doesn't now. That concise syntax is just for the case where you only want a short (WWW) and long (Worldwide Web).

Is there workaround for my-theme to do this?

I can't think of a way you can do this in Glossy now, other than manually using @term:short. On my TODO list is adding the ability to provide custom functions for the short form, long form, and "both" form, which right now are hardcoded to short, long, and long (short). While I think this is the most common approach, I do know of some people wanting finer control over that.

Basically you'd write a function(mode, entry) which would get a mode of "short", "long", or "both", and the dictionary entry. You'd return a string (not content) of what you wanted the output to be.

Does that make sense? Do you think that would let you solve this problem?

trail lagoon
#

It does make sense. I have used same workaround with @term:short.
rn. I have problem with citations and glossary in itemized environment, but that is not fault of Glossy.

autumn grail
#

BTW - 0.4.0 just went out with support for articles (ie "a", "an" or custom). I have a 0.5.0 on deck already so I might just wait for the announcement on that and roll it into one message here. https://typst.app/universe/package/glossy

#

And I'll probably add the format-term() option into 0.5.0 too. 🙂

trail lagoon
#

I was wondering why typst suggested 0.4.0 automatically

autumn grail
#

FYI, @trail lagoon - I just pushed up a PR for 0.5.0 which adds this format-term() custom function. For examples on how it can (and probably shouldn't!) be used, see its test file here.

PR here.

trail lagoon
#

I just sent you PM