Giter Club home page Giter Club logo

Comments (8)

Andrew15-5 avatar Andrew15-5 commented on July 30, 2024

If it's easy to fix, then I want to do it myself (with a hint at the problem place).

from typst.

laurmaedje avatar laurmaedje commented on July 30, 2024

This is working as intended. Fields are only present if explicitly set, so that they can still be affected by set rules otherwise. It's the same for all other elements. In a show rule, the field will also be populated since the style context is known by then.

from typst.

PgBiel avatar PgBiel commented on July 30, 2024

Maybe we can have a hint for this specific case (the field normally exists but was omitted by the constructor, so it's not yet known)?

from typst.

laurmaedje avatar laurmaedje commented on July 30, 2024

Sure

from typst.

Andrew15-5 avatar Andrew15-5 commented on July 30, 2024

In a show rule, the field will also be populated since the style context is known by then.

I don't know what you mean, since this is not true:

image
image

from typst.

PgBiel avatar PgBiel commented on July 30, 2024

elem doesn't seem to be the subject of the show rule in that case (Laurenz was referring specifically to the case where the raw comes from it in #show raw: it => ... instead of from #let myraw = raw(...)).

from typst.

bluebear94 avatar bluebear94 commented on July 30, 2024

Maybe we can have a hint for this specific case (the field normally exists but was omitted by the constructor, so it's not yet known)?

Maybe something like field {} in content is not set at this point?

from typst.

Andrew15-5 avatar Andrew15-5 commented on July 30, 2024

Laurenz was referring specifically to the case where the raw comes from it in #show raw: it => ....

Mmm, yeah, I have a general document show rule instead.

from typst.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.