Open NonDairyNeutrino opened 2 weeks ago
Could you provide an MWE with this bug? (Or if necessary, and if you're comfortable with it, you can email me your main.typ.) I copied your preamble, made a few slides with the Fib example, and even mixed in some #pause commands, but couldn't produce a panic. I'm also testing it on the Typst web app, so I'm not sure if that makes a difference.
Using the example from the slide template
#import "@preview/touying:0.4.2": *
#import "@preview/unify:0.6.0": num //标号
//#import "../themes/aus-beamer.typ" as theme-aus
#import "@preview/academic-conf-pre:0.1.0" as theme-aus
#import "@preview/algo:0.3.3": algo, i, d, comment, code
// 首先注册PPT的基本信息
#let s = theme-aus.register(aspect-ratio: "4-3") //4-3, 16-9
#let s = (s.methods.info)(
self: s,
title: [This is a template for academic research presentation in Typst],
short-title: [My essay short title],
subtitle: [This is the subtitle],
author: [Jun Liu],
date: datetime.today(),
institution: [My Institution \
University of Blablabla],
)
// 这些是一些常用的方法
// tblock是小方框
#let (init, slides, touying-outline, alert, speaker-note, tblock) = utils.methods(s)
#let (slide, empty-slide, title-slide, outline-slide, new-section-slide, ending-slide) = utils.slides(s)
// 封面
#show: init
#show: slides.with(title-slide: false)
= section
== Slide title
This is content
#algo(
title: "Fib",
parameters: ("n",)
)[
if $n < 0$:#i\ // use #i to indent the following lines
return null#d\ // use #d to dedent the following lines
if $n = 0$ or $n = 1$:#i #comment[you can also]\
return $n$#d #comment[add comments!]\
return #smallcaps("Fib")$(n-1) +$ #smallcaps("Fib")$(n-2)$
]
produces a panic using a local cli, but if the #algo...
is commented out, it compiles just fine.
When creating a slide show with touying and using
#algo
on a slide,results in the error
This can be recreated with the basic Fibonacci example
My preamble:
NOTE: the error does not occur with
#code
and everything compiles just fine.