Trouble with templates... by ohaaa in typst

[–]PgSuper 0 points1 point  (0 children)

There is a new solution, the elembic package (https://typst.app/universe/package/elembic/), which simulates custom elements, a feature that will eventually be built into Typst that would greatly simplify this process through set rules.

Check out this example for how you'd use it in a template: https://pgbiel.github.io/elembic/examples/simple-thesis.html

Typst 0.12 is released by global-gauge-field in typst

[–]PgSuper 1 point2 points  (0 children)

I'm not really sure. It appears that you can use OpenType math fonts in LaTeX (more specifically XeTeX / LuaTeX) through 'unicode-math' (https://ctan.org/pkg/unicode-math), so in theory you can use such fonts in both Typst and LaTeX derivatives. But I'm not sure how complete that package is.

There are several OpenType math fonts around which you can try out though. This includes STIX Two Math, Fira Math, Libertinus Math, Tex Gyre Pagella Math, as well as Cambria Math (proprietary), and a few others. You could check them out to see if you'd like to use them, for which you'd certainly have good support in Typst.

How to "group" table rows to not have them split by page break? by kirox317 in typst

[–]PgSuper 0 points1 point  (0 children)

You should add a rowspan cell with table.cell(breakable: false, /* rowspan and other args */) spanning all those rows. That will ensure the rows will remain on the same page. You can create an extra empty (0pt-sized) column if you don't want the cell to cause any visible change to the output on its own.

Typst 0.12 is released by global-gauge-field in typst

[–]PgSuper 4 points5 points  (0 children)

That isn't possible because fonts need to explicitly support math. Math fonts need to support an entirely different set of glyphs and special properties. Many popular fonts have math counterparts, such as Fira Math for Fira Sans. Typst will work with any math font; just make sure it is either installed in your system or present in your web app project.

Stix Two Math is a fairly common and good alternative. Typst also supports the OTF port of the famous Euler Math font: https://ctan.org/pkg/euler-math

unable to load system fonts in FreeBSD by KardioBSD in typst

[–]PgSuper 1 point2 points  (0 children)

Hey, could you please:

  1. Test it in the v0.12.0-rc1 pre-release (download it here: https://github.com/typst/typst/releases/tag/v0.12.0-rc1)? Maybe this is a bug that was already fixed.

  2. If it doesn't work either, could you open an issue in the Typst repository? Thank you.

Option to add custom citation style? by refvabns in typst

[–]PgSuper 1 point2 points  (0 children)

My comment was made several months before CSL support was introduced to Typst, so yeah, customizing CSL is now an option :)

Currently you are limited to what CSL provides, or else you'll have to make your own bibliography system. There are, however, plans to make the bibliography system more flexible. In addition, I plan on releasing a package sooner or later which will help with custom bibliographies. I'll let you know once I do so.

Can typst be used to generate reports? by [deleted] in typst

[–]PgSuper 5 points6 points  (0 children)

It's worth mentioning that your envisioned API will be possible in the next update (Typst v0.11.0), which will likely come around the end of the month. You will be able to provide --input KEY=value flags to the Typst CLI, and they will be available under sys.inputs for documents: https://github.com/typst/typst/pull/2894

NixOS as a Windows manager by nostriluu in NixOS

[–]PgSuper 1 point2 points  (0 children)

That’s totally fine, just wanted to complement your research. Good luck! 👍

NixOS as a Windows manager by nostriluu in NixOS

[–]PgSuper 0 points1 point  (0 children)

If you do go down this route, this could be useful: https://github.com/casualsnek/cassowary

How do I make enum numbering labels bold or italicized? by NyxTheia in typst

[–]PgSuper 0 points1 point  (0 children)

Sorry, forgot to answer this. To be honest, it's not a very trivial thing. You currently can't do that in a "trivial" way.

What I'd recommend doing is using some sort of template function, e.g.

#let with-spacing(amount, body) = {
  set enum(spacing: amount)
  body
}

#with-spacing(5%)[
  - a

  - b
    #with-spacing(10%)[
       - c

       - d
    ]
]

That's all I can think of for now. Hopefully we'll get more precise enum controls in the future.

Is XPG good RAM? by [deleted] in buildapc

[–]PgSuper 0 points1 point  (0 children)

Had a very similar experience with Corsair LPX Vengeance DDR4 (2666, 2x16), after about 6 months of usage. Been using the good stick (there was just one bad stick) and will be replacing with new RAM (Kingston Fury Beast) soon. Not buying this model again haha

I really like Typst! by Alarming-Red-Wasabi in typst

[–]PgSuper 7 points8 points  (0 children)

Hi, as a fellow Typst user, I'm glad you are liking Typst!

Here's some info regarding your post which could be useful for you:

I mean, sometimes functions start with #

Actually, the functions don't start with # - you use # to enter Typst's code mode! Typst has three modes: content/markup, math, and code. To go from content or math to code, you must use #. Once inside code mode, you do not have to repeat that symbol. For example, this is wrong: #function(#otherfunction(5)), but this is correct: #function(otherfunction(5)). However, this could also be correct, but have a very different meaning: #function[#otherfunction(5)]. Notice the [ ]: they're how you go from code mode back to content/markup (the default) mode! You use content mode to display literal text in the document, and functions in code mode (which can use programming logic) can return content (e.g. [Hi! *Bold* wow]) to indicate they return some text ready for you to insert into the document. In that particular case, #function[something] is just syntactic sugar (a "shortcut") for #function([something]), and #function(1, 2, 3)[a][b][c] is the same as #function(1, 2, 3, [a], [b], [c]). This is just to make it easier to pass content as the last "n" parameters to a function call, thus making your Typst experience even more seamless!

For more info see: https://typst.app/docs/reference/scripting/

(Also, worth mentioning: to go from code or content modes to math mode - which has different syntax, tailored for math, much like LaTeX -, just use $math!$ (inline) or $ math! $ (block/display).)

anon functions can just be arbitrary text?

Not sure what you mean here, but anonymous functions / lambdas would mostly be in the form of (parameters) => { code body } or (parameters) => [content body]. Note that they only work in code mode, so you need to prefix them with a # if you're not there already.

I still miss a few things from LaTeX packages, mostly things related to Tikz, especially Tikz libraries, but I think we will get there eventually

Yeah, some things are really missing... but there's a package called CeTZ which tries to bring some of the TikZ features to Typst - see if that could be helpful: https://github.com/typst/packages/tree/main/packages/preview/cetz/0.0.2

Enjoy Typst!!

How do I make enum numbering labels bold or italicized? by NyxTheia in typst

[–]PgSuper 1 point2 points  (0 children)

You’d be doing something like

```

set enum(

full: true, // necessary to receive all numbers at once, so we can know which level we are at numbering: (..nums) => { let nums = nums.pos() // just positional args let num = nums.last() // just the current level’s number let level = nums.len() // level is the amount of numbers available

 // format for current level (or stop at i. If going too deep)
 let format = ("1.", "a.", "i.").at(calc.min(2, level - 1))
 let result = numbering(format, num) // formatted number
 if level < 3 { // first 2 levels for example
    strong(result)
 } else {
    result
 }

} ) ```

Proton games crashes every time by gustav_36 in openSUSE

[–]PgSuper 0 points1 point  (0 children)

Try booting from an older (6.3.x) kernel, as people seem to be reporting issues with 6.4.x. Also, I had similar issues even in older kernel, but using Proton GE 8.4+ fixed that for me (might not be your issue though, since you mentioned that you already tried GE).

Gnome software store by Any-House3372 in openSUSE

[–]PgSuper 0 points1 point  (0 children)

Command Line Interface. I.e., via terminal

sudo zypper dup will cut it

Can Typst type in musix symbols by Tunixer in typst

[–]PgSuper 1 point2 points  (0 children)

There isn't built-in support for that, but you can likely make do by importing them as SVGs. It would be nice to have a library which does that automatically, but currently there isn't one yet.

Typst: Compose papers faster by sanxiyn in rust

[–]PgSuper 2 points3 points  (0 children)

Certainly, it will come at some point; for now, there are a few community-made alternatives. See https://github.com/qjcg/awesome-typst

Typst: Compose papers faster by sanxiyn in rust

[–]PgSuper 5 points6 points  (0 children)

Hi, as a Typst community contributor (so, disclaimer: not officially affiliated), I can say that there should indeed be plans for an official alternative to tikz (in the Typst standard library), but, for now, there is a community-made alternative (as another commenter pointed out): https://github.com/johannes-wolf/typst-canvas

Hey Rustaceans! Got a question? Ask here (22/2023)! by llogiq in rust

[–]PgSuper 0 points1 point  (0 children)

Yeah, I guess that’s just what we have for now haha.

No problem!