diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-09-11 15:53:20 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-09-11 15:53:20 +0200 |
| commit | 3a979e88da7be6240821ba8acfdd376b7f4e0f09 (patch) | |
| tree | b41a095a11d710f0fc5547e5bd0627deafa02af2 /docs/tutorial/3-advanced.md | |
| parent | 305524d005df075d53575552ee090fb53192a3fe (diff) | |
Docs generation for types
Diffstat (limited to 'docs/tutorial/3-advanced.md')
| -rw-r--r-- | docs/tutorial/3-advanced.md | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/docs/tutorial/3-advanced.md b/docs/tutorial/3-advanced.md index bb0362ef..2393a474 100644 --- a/docs/tutorial/3-advanced.md +++ b/docs/tutorial/3-advanced.md @@ -78,7 +78,7 @@ by the conference style guide. We use the `align` function to align the text to the right. Last but not least is the `numbering` argument. Here, we can provide a -[numbering pattern]($func/numbering) that defines how to number the pages. By +[numbering pattern]($numbering) that defines how to number the pages. By setting into to `{"1"}`, Typst only displays the bare page number. Setting it to `{"(1/1)"}` would have displayed the current page and total number of pages surrounded by parentheses. And we could even have provided a completely custom @@ -126,16 +126,16 @@ supervisor, we'll add our own and their name. ``` The two author blocks are laid out next to each other. We use the -[`grid`]($func/grid) function to create this layout. With a grid, we can control +[`grid`]($grid) function to create this layout. With a grid, we can control exactly how large each column is and which content goes into which cell. The -`columns` argument takes an array of [relative lengths]($type/relative-length) -or [fractions]($type/fraction). In this case, we passed it two equal fractional -sizes, telling it to split the available space into two equal columns. We then -passed two content arguments to the grid function. The first with our own -details, and the second with our supervisors'. We again use the `align` function -to center the content within the column. The grid takes an arbitrary number of -content arguments specifying the cells. Rows are added automatically, but they -can also be manually sized with the `rows` argument. +`columns` argument takes an array of [relative lengths]($relative) or +[fractions]($fraction). In this case, we passed it two equal fractional sizes, +telling it to split the available space into two equal columns. We then passed +two content arguments to the grid function. The first with our own details, and +the second with our supervisors'. We again use the `align` function to center +the content within the column. The grid takes an arbitrary number of content +arguments specifying the cells. Rows are added automatically, but they can also +be manually sized with the `rows` argument. Now, let's add the abstract. Remember that the conference wants the abstract to be set ragged and centered. @@ -249,7 +249,7 @@ on another title, we can easily change it in one place. ## Adding columns and headings { #columns-and-headings } The paper above unfortunately looks like a wall of lead. To fix that, let's add some headings and switch our paper to a two-column layout. The -[`columns`]($func/columns) function takes a number and content, and layouts the +[`columns`]($columns) function takes a number and content, and layouts the content into the specified number of columns. Since we want everything after the abstract to be in two columns, we need to apply the column function to our whole document. @@ -386,7 +386,8 @@ function that gets passed the heading as a parameter. That parameter can be used as content but it also has some fields like `title`, `numbers`, and `level` from which we can compose a custom look. Here, we are center-aligning, setting the font weight to `{"regular"}` because headings are bold by default, and use the -[`smallcaps`]($func/smallcaps) function to render the heading's title in small capitals. +[`smallcaps`]($smallcaps) function to render the heading's title in small +capitals. The only remaining problem is that all headings look the same now. The "Motivation" and "Problem Statement" subsections ought to be italic run in @@ -493,9 +494,9 @@ the conference! The finished paper looks like this: style="box-shadow: 0 4px 12px rgb(89 85 101 / 20%); width: 500px; max-width: 100%; display: block; margin: 24px auto;" > -## Review { #review } +## Review You have now learned how to create headers and footers, how to use functions and -scopes to locally override styles, how to create more complex layouts with the [`grid`]($func/grid) function and how to write show rules for individual functions, and the whole document. You also learned how to use the +scopes to locally override styles, how to create more complex layouts with the [`grid`]($grid) function and how to write show rules for individual functions, and the whole document. You also learned how to use the [`where` selector]($styling/#show-rules) to filter the headings by their level. The paper was a great success! You've met a lot of like-minded researchers at |
