Commit 980f905

HPCesia <me@hpcesia.com>
2026-03-15 07:32:49
Improve example post
1 parent 6b5aafc
Changed files (1)
src
contents
src/contents/posts/typst-syntax.typ
@@ -89,26 +89,36 @@ $
   integral_(0)^(+infinity) (ln x) / (x^2 - 1) dif x = 1/2integral_(x > 0) integral_(y>0) (dif x dif y) / ((1+y)(1+x^2 y)) = pi^2 / 4.
 $
 
-A example from #link("https://github.com/ahxt/academic-homepage-typst/blob/55e76cb813f0096070fdda57dc81e13697af66b2/content/blog/grpo.typ")[academic-homepage-typst: GRPO]:
+= Tables
 
-$
-  cal(J)_text("PPO")(theta) = bb(E)_((q,a)~cal(D))
-  [
-    min ( (pi_theta(o_t|q, o_(<t)))/(pi_(theta_text("old"))(o_t|q,o_(<t))) hat(A)_t,
-      "clip" ( (pi_theta(o_t|q, o_(<t)))/(pi_(theta_text("old"))(o_t|q,o_(<t))), 1 - epsilon, 1 + epsilon ) hat(A)_t ) ]
-$
-
-= Figures
+Create a table using the ```typ #table()``` function. See more information about tables in #link("https://typst.app/docs/reference/model/table/")[Typst Reference: Table Function].
 
 #figure(
   table(
     columns: 4,
-    table.header(..lorem(4).split(" ")),
-    ..lorem(20).split(" "),
+    table.header([Framework], [Language], [License], [Description]),
+    [Astro], [TypeScript], [MIT], [The web framework for content-driven websites.],
+    [Eleventy], [JavaScript], [MIT], [A simpler site generator.],
+    [Hugo], [Go], [Apache-2.0], [The world’s fastest framework for building websites.],
+    [Zola], [Rust], [MIT / EUPL-1.2], [A static site generator in a single binary with everything built-in.],
   ),
-  caption: [Table with placeholder text],
+  caption: [Comparison of static site generators],
 )
 
+Prefer to Markdown tables? A Typst package #link("https://typst.app/universe/package/tablem")[tablem] can help you with that.
+
+#{
+  import "@preview/tablem:0.3.0": tablem
+  tablem[
+    | Name  | Location   | Height | Score |
+    | ----- | ---------- | ------ | ----- |
+    | John  | Second St. | 180 cm | 5     |
+    | Wally | Third Av.  | 160 cm | 10    |
+  ]
+}
+
+= Figures
+
 Use ```typ #tybios.frame()``` to wrap any content that can't automatically convert to HTML, convert them to SVGs. #footnote[
   Converted SVGs will adapt to dark theme by color invert and hue rotation, but the result may not be perfect.
 ]
@@ -135,8 +145,9 @@ Use ```typ #tybios.frame()``` to wrap any content that can't automatically conve
 6. You can also use numbers to specify the order.
 + After a specified order item, the next item will continue the order you specified.
 
-Term List
-
-/ Ligature: A merged glyph.
-/ HTML: HyperText Markup Language, a standard for structuring web content.
-/ Kerning: A spacing adjustment between two adjacent letters.
+/ Term: A word or expression that has a precise meaning in some uses or is peculiar to a science, art, profession, or subject. Here is a list of terms.
+/ SVG: #[*S*]calable #[*V*]ector #[*G*]raphics, an XML-based markup language for describing two-dimensional based vector graphics.
+/ XML: E#[*X*]tensible #[*M*]arkup #[*L*]anguage, a strict serialization of the DOM.
+/ DOM: #[*D*]ocument #[*O*]bject #[*M*]odel, connects web pages to scripts or programming languages by representing the structure of a document.
+/ HTML: #[*H*]yper#[*T*]ext #[*M*]arkup #[*L*]anguage, a standard for structuring web content.
+/ URL: #[*U*]niform #[*R*]esource #[*L*]ocator, a text string that specifies where a resource can be found on the Internet.