Broken list of figures
Hello,
I updated typst to version 0.14. Afterwards the list of figures / tables looks weird.
1.3
Figure 1.3: Lines of code in the Linux kernel. Generated by kernelstats [3]
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Consequently, the list number is used twice and breaks the layout.
In addition, I had to update the template as followed:
iff --git a/my-outline.typ b/my-outline.typ
index 9b9ab41..8ee9947 100644
--- a/my-outline.typ
+++ b/my-outline.typ
@@ -95,7 +95,7 @@
#set text(size: textSize)
#box(width: 100%)[
#box(width: 0.75cm, align(right, [#it.prefix().at("children").at(2) #h(0.2cm)]))
- #link(it.element.location(), it.element.at("caption").body)
+ #link(it.element.location(), it.element.at("caption"))
#box(width: 1fr, repeat(text(weight: "regular")[. #h(4pt)]))
#link(it.element.location(),heading_page)
]
Otherwise, I get an compiler error.
Thanks, I will look into it in the next days
I am not sure if this is a good solution. But following changes work for me:
diff --git a/my-outline.typ b/my-outline.typ
index 8ee9947..a812744 100644
--- a/my-outline.typ
+++ b/my-outline.typ
@@ -94,10 +94,7 @@
[
#set text(size: textSize)
#box(width: 100%)[
- #box(width: 0.75cm, align(right, [#it.prefix().at("children").at(2) #h(0.2cm)]))
- #link(it.element.location(), it.element.at("caption"))
- #box(width: 1fr, repeat(text(weight: "regular")[. #h(4pt)]))
- #link(it.element.location(),heading_page)
+ #link(it.element.location(), it.indented(it.prefix(), it.inner()))
]
]
}
Can you please share a Minimal Reproducible Expample on Typst Web App to replicate this bug? I can't reproduce it in the example that is shipped with the package.
Your solution is not optimal, beacuse it writes the word "Figure" while the template should not. Thanks
Currently, #part doesn't work
https://typst.app/project/rBsPMovehmuncuhBa6ipMT
I think you have to import it
I thought that #import "@preview/orange-book:0.6.1": book is the correct way to import it. How should I import the template?
import "@preview/orange-book:0.6.1": book, part, chapter
or
import "@preview/orange-book:0.6.1": *
Argh... Too early in the morning. At typst.app is seems to work. On my laptop I got following error message:
watching main.typ
writing to main.pdf
[09:12:54] compiled with errors
error: cannot access fields on type none
┌─ @preview/orange-book:0.6.1/my-outline.typ:98:62
│
98 │ #link(it.element.location(), it.element.at("caption").body)
│ ^^^^
help: error occurred while applying show rule to this entry
┌─ @preview/orange-book:0.6.1/my-outline.typ:104:2
│
104 │ ╭ outline(
105 │ │ title: list-of-figure-title,
106 │ │ target: target,
107 │ │ )
│ ╰───^
I installed typst 0.14.0 on my laptop. I try to find the differences...
Try to locate the packages file in App data ad delete It, so Typst can download It again. Maybe Is corrupted. You can locale by CTRL+click on the package in visual studio code
Ah, I know the reason. I have some figures without captions. In the past, it was not an issue. Now I get a compiler error.
Also caption = none doesn't work.
Hm, I have an appendix. The chapters in the appendix starts with a letter. However, the first figure in the appendix has the number 1.1 and not A.1. Is this behavior intentional?
I will look at this, thanks for reporting!
https://github.com/typst/packages/pull/3612
Fixed in orange-book:0.6.2
Thank you for your support!
The appendix is now numbered correctly. However, an image must still have a caption. Is this what you want?
Not really, it's still a bug...