Skip to content

Commit

Permalink
textproc/hs-typst: update to typst-0.6.1
Browse files Browse the repository at this point in the history
## 0.6.1

  * Fix precedence for functions (#55).
    `1(x)` and `!(x)` should not be parsed as functions.
    Note that we still don't match typst's behavior for `f_"!"(x)`.
    For us this works just like `f_!(x)`, but for typst we get
    a function in the subscript for the former but not the latter.
    Fixing this would require some changes in the types.

  * Define sys.version and sys.inputs.typst-hs-version (#56).
    The former is set to the version of typst we are trying to
    implement. The latter is a stringified version number from typst-hs.
    This will allow typst programs to tell when they're running
    on typst-hs (or pandoc), and react accordingly.

  * Rename stBeforeSpace -> stSpaceBefore to avoid confusion.

  * Fix precedence issues in math parsing (#54).
    Increased precedence of ! (factorial).
    `_` or `^` should eagerly gobble a grouped argument (`c_(a)`).

  * Minimal support for `context` (#53). Parse `context` keyword.
    New Context constructor in Expr [API change].
    Evaluate this by just evaluating the expression, for now.
    Note that we don't support the features (like location or
    numbering) that context is used to affect anyway, so this change
    probably won't be enough for meaningful support. But it might
    prevent some documents from issuing errors.

  * Arguments at method.

  * Array windows, reduce, to-dict methods.

  * Allow parentheses in import.

  * Make standard module available under std (typst 0.12).

  * Add over/underparen, over/undershell in math module.

  * Add stretch function.

  * Add skew.

  * Depend on typst-symbols 0.1.7 and start to target typst 0.12.

  * Reset indentation requirements inside `[]` content block. e.g.
    ```
    / B: #block[
    - a
    ]
    ```
    We don't need indentation inside the block content.


## 0.6

  * Recognize figure.caption function (#52).

  * Allow defined identifiers to override math defaults (#51).
    Previously we evaluated all math in a special environment that
    shadowed any user-defined functions with the same-named functions
    from the math or sym modules. This change gives user-defined identifiers
    priority over the math defaults, allowing things like `bb` to be
    overridden.

  * Typst.Types: EvalState now has two new fields, `evalMathIdentifiers` and
    `evalStandardIdentifiers`. `evalIdentifiers` is now just for user-defined
    identifiers. [API change]

  * Don't implicitly load sys module for math.

## 0.5.0.5

  * Allow numbers like `1.` in math mode (#50).

## 0.5.0.4

  * Add built-in identifiers for standard types (#21):
    array, bool, content, int, float, regex, length,
    alignment, color, symbol, string.

  * Adjust emphasis parser for CJK characters (#49).
    Typst documentation says that `*` strong emphasis
    "only works at word boundaries." However, in typst/typst#2648
    this was changed for CJK.
  • Loading branch information
depressed-pho committed Jan 30, 2025
1 parent a5ab172 commit 28c656d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
13 changes: 6 additions & 7 deletions textproc/hs-typst/Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# $NetBSD: Makefile,v 1.4 2024/05/09 01:32:48 pho Exp $
# $NetBSD: Makefile,v 1.5 2025/01/30 13:44:12 pho Exp $

DISTNAME= typst-0.5.0.3
PKGREVISION= 1
DISTNAME= typst-0.6.1
CATEGORIES= textproc print
DIST_SUBDIR= hs-typst # So that it won't conflict with textproc/typst

MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= Parsing and evaluating typst syntax
LICENSE= modified-bsd

.include "../../converters/hs-aeson/buildlink3.mk"
.include "../../textproc/hs-cassava/buildlink3.mk"
.include "../../textproc/hs-typst-symbols/buildlink3.mk"
.include "../../devel/hs-vector/buildlink3.mk"
.include "../../devel/hs-ordered-containers/buildlink3.mk"
.include "../../textproc/hs-cassava/buildlink3.mk"
.include "../../converters/hs-aeson/buildlink3.mk"
.include "../../textproc/hs-regex-tdfa/buildlink3.mk"
.include "../../math/hs-scientific/buildlink3.mk"
.include "../../textproc/hs-toml-parser/buildlink3.mk"
.include "../../textproc/hs-typst-symbols/buildlink3.mk"
.include "../../devel/hs-vector/buildlink3.mk"
.include "../../textproc/hs-xml-conduit/buildlink3.mk"
.include "../../textproc/hs-yaml/buildlink3.mk"
.include "../../mk/haskell.mk"
Expand Down
5 changes: 4 additions & 1 deletion textproc/hs-typst/PLIST
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@comment $NetBSD: PLIST,v 1.2 2024/05/02 10:49:38 pho Exp $
@comment $NetBSD: PLIST,v 1.3 2025/01/30 13:44:12 pho Exp $
${PLIST.shlibs}lib/${HS_PLATFORM}/libHS${HS_PKGID}-${HS_VER}.so
${PLIST.shlibs}lib/${HS_PLATFORM}/${HS_PKGID}/Paths_typst.dyn_hi
lib/${HS_PLATFORM}/${HS_PKGID}/Paths_typst.hi
${PLIST.prof}lib/${HS_PLATFORM}/${HS_PKGID}/Paths_typst.p_hi
${PLIST.shlibs}lib/${HS_PLATFORM}/${HS_PKGID}/Typst.dyn_hi
lib/${HS_PLATFORM}/${HS_PKGID}/Typst.hi
${PLIST.prof}lib/${HS_PLATFORM}/${HS_PKGID}/Typst.p_hi
Expand Down
14 changes: 7 additions & 7 deletions textproc/hs-typst/buildlink3.mk
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# $NetBSD: buildlink3.mk,v 1.4 2024/05/09 01:32:48 pho Exp $
# $NetBSD: buildlink3.mk,v 1.5 2025/01/30 13:44:12 pho Exp $

BUILDLINK_TREE+= hs-typst

.if !defined(HS_TYPST_BUILDLINK3_MK)
HS_TYPST_BUILDLINK3_MK:=

BUILDLINK_API_DEPENDS.hs-typst+= hs-typst>=0.5.0
BUILDLINK_ABI_DEPENDS.hs-typst+= hs-typst>=0.5.0.3nb1
BUILDLINK_API_DEPENDS.hs-typst+= hs-typst>=0.6.1
BUILDLINK_ABI_DEPENDS.hs-typst+= hs-typst>=0.6.1
BUILDLINK_PKGSRCDIR.hs-typst?= ../../textproc/hs-typst

.include "../../converters/hs-aeson/buildlink3.mk"
.include "../../textproc/hs-cassava/buildlink3.mk"
.include "../../textproc/hs-typst-symbols/buildlink3.mk"
.include "../../devel/hs-vector/buildlink3.mk"
.include "../../devel/hs-ordered-containers/buildlink3.mk"
.include "../../textproc/hs-cassava/buildlink3.mk"
.include "../../converters/hs-aeson/buildlink3.mk"
.include "../../textproc/hs-regex-tdfa/buildlink3.mk"
.include "../../math/hs-scientific/buildlink3.mk"
.include "../../textproc/hs-toml-parser/buildlink3.mk"
.include "../../textproc/hs-typst-symbols/buildlink3.mk"
.include "../../devel/hs-vector/buildlink3.mk"
.include "../../textproc/hs-xml-conduit/buildlink3.mk"
.include "../../textproc/hs-yaml/buildlink3.mk"
.endif # HS_TYPST_BUILDLINK3_MK
Expand Down
8 changes: 4 additions & 4 deletions textproc/hs-typst/distinfo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$NetBSD: distinfo,v 1.2 2024/05/02 10:49:38 pho Exp $
$NetBSD: distinfo,v 1.3 2025/01/30 13:44:12 pho Exp $

BLAKE2s (hs-typst/typst-0.5.0.3.tar.gz) = 3f23c7279e6d230e745ccb9c4968b9a374e8872ebcf06b914c8b345bbac9a486
SHA512 (hs-typst/typst-0.5.0.3.tar.gz) = 68ecbf4fef9777a5d6486eea36258a6a8965357a30c4252657724b83592251551e79dcb5e5eb30fd8ad74345e9552afc436bc53e2e56baafc240b3a59863251c
Size (hs-typst/typst-0.5.0.3.tar.gz) = 6432307 bytes
BLAKE2s (hs-typst/typst-0.6.1.tar.gz) = a985b6d00b23e815dcdec127f957e65b42c35900e43d19f6054d16f552bd7145
SHA512 (hs-typst/typst-0.6.1.tar.gz) = fce95fd211e5a71eb2be4bec07bb1e724ca72ad72ad9560f93f6fb8f13d083def3b049f205354633ca06ea9807af8ea6f8e075522f7a48eaa38d12f9efc1da12
Size (hs-typst/typst-0.6.1.tar.gz) = 6435451 bytes

0 comments on commit 28c656d

Please sign in to comment.