#Touying

282 messages · Page 1 of 1 (latest)

near nebula
#

Package for creating presentations

#

@deft pier

deft pier
#

Thanks!

gleaming bough
#

It's really awesome. I am writing slides for local academic workshop in Japan.

#

Thank you for working on this actively.

deft pier
deft pier
#

I made a poster for Touying. 😉

#

Styles are derived from moffee

deft pier
umbral umbra
#

Thanks for this fantastic package!

stiff talon
#

Is it possible to edit the page configuration for the first page of a section?

#

I am trying to put the heading body in the page header only for the first page of the section. The problem is, I need to make the top margin bigger for those pages and I can't find a way.
I could also use the subslide-preamble parameter but it is not in the page header and therefore not as optimal (for instance, I'd like to benefit for the 0-margin header to display a colored block)

deft pier
#

@stiff talon What's your first page of the section? If you're referring to new-section-slide-fn, just configure it. and #slide(config: config-page())[xxx] can also modify the configuration temporarily.

stiff talon
#

I was referring to the slide that contains the second level heading == for instance.
I want to display it in a special manner in the header only for the first slide of this subsection.

The new-subsection-slide-fn is not suitable because with it you can make a slide that contains only the subsection name, whereas I want my slide to have the subsection name plus the content of the subsection

#

Right now I'm using subslide-preamble with negative padding and all, it's kind of working but ugly code

low mantle
#

Is there an easy way to configure the background color and/or background image of title slide and normal slide? I do see an option for focus-slide in the theme file. Tried something like #set page(fill: gray) in the .typ document, but it did not change anything.

deft pier
#

#slide(config: config-page(fill: gray))[XXX]

low mantle
#

Thanks! This works on a single regular slide. Any way to do a global change? If not, how to make changes to title and section-title slides?

near nebula
#

Have you looked at the documentation?

low mantle
#

I did but not find what I was looking for

deft pier
#

#show: touying-set-config.with(config-page(fill: gray))

earnest birch
#

Um, is this intentional that triple minus creates a page break instead of em dash?

#

Same for the sym.dash.em, but works.

earnest birch
#

Another unwanted behavior that I found when using any of the hack from https://github.com/touying-typ/touying/issues/10, is that the full list on the last subslide will be shown at the correct position, but for all previous subslides it will show the list slightly move above.

#

This creates the artifact of noticeably moved list on the last subslide.

#

Oh, I've noticed that it works fine with the simple theme, but not with metropolis.

#import "@preview/touying:0.5.3": themes.metropolis, pause
#show: metropolis.metropolis-theme

== Slide
- one
#pause
- two
#pause
- three
#pause
- four
deft pier
deft pier
earnest birch
#

Ohhh, at the end....

earnest birch
#

I don't know if you know about this, can make an issue.

earnest birch
#

I've also noticed that with the latest update not only metropolis top-level headings now much bigger (for which I had to override the function), but also that now I have to insert a manual #pagebreak() after = Heading and before any content (from the implicit next page). Is this intentional, or is this a bug? I guess the nice part is that I can easily add stuff to that slide without using heading([name] + place()) or anything crazy like that.

deft pier
wispy pawn
#

How am I supposed to resize text with Touying?

#

I want to add smaller text on the title slide but it ends up on the next slide if I use text(size: ...)

wispy pawn
#

I suppose it works better with an explicit #title-slide[]

deft pier
#

After 0.5.x,#title-slide[] is all explicit.

deft pier
wispy pawn
#

I tried changing the font size of text after a title header (= title) but it broke out to a separate slide
after wrapping the whole thing in #title-slide the error didn't occur

deft pier
wispy pawn
#

?r Really just what I said

#import "@preview/touying:0.5.3": *
#import themes.simple: *

#show: simple-theme

= Title
#text(size: 11pt)[text]
tame iglooBOT
wispy pawn
#

oh wow it does multiple pages now

#

nice

deft pier
#

?r

#import "@preview/touying:0.5.3": *
#import themes.simple: *

#show: simple-theme

= Title

---

#text(size: 11pt)[text]
wispy pawn
#

doesn't --- break into a new slide, anyways?

deft pier
vague tartan
#

Is it normal that fit-to-height just doesn't show anything?

#

It's only buggy when shrink: true

#

Or does it not work on text?

deft pier
earnest birch
#

I finally figured out the problem:

#import "@preview/touying:0.5.5": *

// Not affected:
// #show: themes.simple.simple-theme
// #show: themes.university.university-theme
// #show: themes.aqua.aqua-theme
// #show: themes.dewdrop.dewdrop-theme
// #show: themes.default.default-theme

// Affected:
// #show: themes.stargazer.stargazer-theme
#show: themes.metropolis.metropolis-theme

== That
// #lorem(20)

- one #pause
- two #pause
- three
#

these 2 themes shift the whole content of the slide, which is why the list items move.

earnest birch
#

MRE

#import "@preview/touying:0.5.5": *

#let slide(setting: body => body, ..bodies) = touying-slide-wrapper(self => {
  let new-setting = body => {
    show: std.align.with(self.store.align)
    body
  }
  touying-slide(self: self, setting: new-setting, ..bodies)
})

#let metropolis-theme(align: horizon, ..args, body) = {
  show: touying-slides.with(
    config-common(slide-fn: slide),
    config-store(align: align),
    ..args,
  )
  body
}

#show: metropolis-theme

== Section
#lorem(20):
- one #pause
- two #pause
- three #pause
- four
#

so it's indeed only because of hozion alignment...

earnest birch
#

I was not able to figure out why show hide: set list(marker: [anything]) hides the marker if it was previously hidden. But it looks like if the marker is not hidden, then everything stays in place. So the only issue is how to make marker not visible but also still present, so the layout does not shift.

deft pier
earnest birch
#

yeah, I think so, it's just that it has been closed

#

so I thought then it must be a different issue

earnest birch
#
  show hide: it => {
    show list: l => {
    let marker = []
    let marker = [#v(5em)]
      if l.marker != marker {
        let fields = l.fields()
        let _ = fields.remove("marker")
        let children = fields.remove("children")
        return list(marker: marker, ..fields,tight: false,  ..children)
      }
      l
    }
    it
  }

This does increase vertical spacing, but I can't use negative one or pad().
And just by adding show list: l => l the marker is gone

daring merlin
earnest birch
#
    config-methods(
      cover: (self: none, x) => {
        let s = 15pt
        show hide: it => {
          set list(
            marker: level => {
              text("•")
            },
            spacing: s,
          )
          // Prevent misaligned bullet points with pause
          show: par.with(spacing: s)
          it
        }
        hide(x)
      },
    ),
#

it doesn't fix it

daring merlin
daring merlin
# earnest birch it doesn't fix it

Idk too much about typst but I don't understand why you are doing it so complicated. Just add the five lines i posted in the let new-setting = body => { HERE } of your slide template

earnest birch
#

It wasn't clear where I should put that, so I figured this is an override for the cover function.

#
    let s = 0.65em
    set list(spacing: s)
    set par(spacing: s)
#

so the problem was just with spacing?

#

It's nice, but now I'm stuck at this constraint

#

The list now takes more space, so I'll have to see if it will look good for all slides.

#

thanks

earnest birch
#

I've fixed one of my previous presentations by adding this:

    config-common(
      slide-fn: slide.with(
        setting: body => {
          set par(spacing: spacing) if fix-pause
          set list(spacing: spacing) if fix-pause
          body
        },
      ),
    ),

There was only 1 place with list + par, so there I just added a #v(1em). That's a great bargain for that particular presentation.

#

I've searched for "spacing" on the issue page... Yeah, I completely missed this.

earnest birch
#

What would be the best way to animate 2 columns, divided by a line, while showing the headers from the start?

#

I'm struggling with this so much... First I tried grid, but it is pretty limiting, then I switched to stack.

#

I want to preserve the unity of the data so it's easy to read and edit it:

#let custom-columns = (
  column[Работодатель #pause][
    - высокая эффективность и производительность труда #pause #h(1fr)
    - соблюдение дисциплины и установленных стандартов #pause
    - инициатива #pause
    - лояльность, неконфликтность #pause
    - участие в делах компании #pause
    - высокая трудовая мотивация #pause
    - способность и готовность к обучению и развитию
  ],
  column[Работник][
    - хорошая зарплата #pause #h(1fr)
    - стабильность #pause
    - интересная работа #pause
    - уважение #pause
    - профессиональный и карьерный рост #pause
    - возможность проявить себя, чего-то достичь #pause
    - признание заслуг #pause
    - баланс работы и личной жизни
  ],
)
earnest birch
#

Working, but messy:

#let column(header, list) = (strong(header), list)
#let custom-columns = (
  column[Работодатель][
    - высокая эффективность и производительность #h(1fr)
    - соблюдение дисциплины
    - инициатива
    - лояльность, неконфликтность
    - участие в делах компании
    - высокая трудовая мотивация
    - способность и готовность к обучению
  ],
  column[Работник][
    - хорошая зарплата #h(1fr)
    - стабильность
    - интересная работа
    - уважение
    - профессиональный и карьерный рост
    - возможность проявить себя, чего-то достичь
    - признание заслуг
    - баланс работы и личной жизни
  ],
)

#let common-line = line(angle: 90deg, length: 90%)
#let common-slide(..args) = fix-list-pause-slide({
  set text(0.92em)
  let (left, line, right) = args.pos()
  let (left, right) = (left, right).map(block.with(width: 48%))
  stack(dir: ltr, spacing: 0.5em, left, line, right)
})

#common-slide(
  custom-columns
    .first()
    .enumerate()
    .map(((i, x)) => if i == 0 { x + pause } else {
      x.children.filter(x => x != [ ]).intersperse(pause).join()
    })
    .join(),
  [#meanwhile#common-line],
  custom-columns
    .last()
    .enumerate()
    .map(((i, x)) => if i == 1 { hide(x) } else { x })
    .join(),
)

#common-slide(
  custom-columns.first().join(),
  common-line,
  custom-columns
    .last()
    .enumerate()
    .map(((i, x)) => if i == 0 { x } else {
      x.children.filter(x => x != [ ]).intersperse(pause).join()
    })
    .join(),
)
earnest birch
#

I guess by drawing the line separately I can do this:

#fix-list-pause-slide({
  set text(0.9em)
  place(center + horizon, line(angle: 90deg, length: 90%))
  grid(
    columns: 2,
    align: top,
    row-gutter: 1em,
    column-gutter: 2em,
    ..array.zip(..custom-columns).flatten(),
  )
})

The annoying thing is that the vline isn't drawn in the center, but to the right. I may be able to hack it via grid.cell, but idk if it will be a better solution.

#

I think I got it:

#let column(header, list) = (strong(header), list)
#let grid(..arg) = std.grid(..arg.named(), ..array.zip(..arg.pos()).flatten())
#fix-list-pause-slide({
  set text(0.9em)
  place(center + horizon, line(angle: 90deg, length: 90%))
  grid(
    columns: 2,
    align: top,
    row-gutter: 1em,
    column-gutter: 2em,
    column[Работодатель][#pause
      - высокая эффективность и производительность труда #pause #h(1fr)
      - соблюдение дисциплины и установленных стандартов #pause
      - инициатива #pause
      - лояльность, неконфликтность #pause
      - участие в делах компании #pause
      - высокая трудовая мотивация #pause
      - способность и готовность к обучению и развитию
    ],
    column[Работник][#pause
      - хорошая зарплата #pause #h(1fr)
      - стабильность #pause
      - интересная работа #pause
      - уважение #pause
      - профессиональный и карьерный рост #pause
      - возможность проявить себя, чего-то достичь #pause
      - признание заслуг #pause
      - баланс работы и личной жизни
    ],
  )
})
earnest birch
fresh granite
#

Hi, with touying's sub-slide #pause function, is it possible to hide footnotes until the relevant part is uncovered?

low mantle
#

Is there an easy way to get ToC before each section, with the upcoming section highlighted in Touying? With Beamer, it can be achieved with \tableofcontents[currentsection]. Below is a random example I found online

deft pier
sick coyote
#

@deft pier How to use the function #slide() with the University theme?
When I try to use:

#slide(
  title: "The Scientific Method",
)[
    Foobar

    #speaker-note[Speaker note here]
]

I get:

error: assertion failed: unexpected named arguments:("title",)
     ┌─ @preview/touying:0.5.5/src/core.typ:1682:2
     │
1682 │   assert(bodies.named().len() == 0, message: "unexpected named arguments:" + repr(bodies.named().keys()))
     │   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

help: error occurred in this call of function `touying-slide`
   ┌─ src/presa/theme/university.typ:86:2
   │
86 │   touying-slide(self: self, config: config, repeat: repeat, setting: new-setting, composer: composer, ..bodies)
   │   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

help: error occurred in this function call
    ┌─ @preview/touying:0.5.5/src/core.typ:167:6
    │
167 │       slide-fn(self)
    │       ^^^^^^^^^^^^^^

help: error occurred in this call of function `call-slide-fn-and-reset`
    ┌─ @preview/touying:0.5.5/src/core.typ:223:89
    │  
223 │         (cont, recaller-map, current-headings, current-slide, new-start, is-first-slide) = call-slide-fn-and-reset(
    │ ╭──────────────────────────────────────────────────────────────────────────────────────────^
224 │ │         self + (headings: current-headings, is-first-slide: is-first-slide),
225 │ │         already-slide-wrapper: true,
226 │ │         child.value.fn,
227 │ │         none,
228 │ │         recaller-map,
229 │ │       )
    │ ╰───────^
sick coyote
sick coyote
#

Ignore the second question, I succeeded to make the changes to get it working 🙂

deft pier
sick coyote
#

Oh interesting. OK

verbal anchor
#

Is touying following the (standard?) that templates are separate?

#

I see polylux is now releasing the templates split from the package.

earnest birch
#

there are some templates that are separate, IIRC

verbal anchor
earnest birch
#

idk, it is nice to have a few built-in so you can start right away. But also, since you can make them separate, I don't think it's great idea to bloat the library with different templates.

deft pier
#

I prefer to keep the built-in themes, which are easy to use and remember, and more guaranteed for timely and synchronized maintenance.

sick coyote
#

I wish I could have speaker-note on title-slide, for university theme. If you have a clue on how to do ... let me know

earnest birch
deft pier
sick coyote
#

I will submit a PR to fix it, I fixed it locally already.

grand needle
deft pier
grand needle
grand needle
grand needle
deft pier
grand needle
deft pier
#

Yes, just use []

fallow agate
#

With touying, how can I create a slide that does not belong to any section and does not show in outline?
Use: I want an arbitrary slide that is only relevant in slide show, and disappears in handout mode.

#

So it would be like

#if handout {
  slide(some-config)[ relavent-meme ]
}
native meadow
#

hello, I've been trying to have a nice "item by item" animation in touying for lists, and beyond manual "pause" after each item, it's a mess, impossible to put anything in show rules, with warnings about marks in context expressions

#

I've tried using the item-by-item and one-by-one functions from polylux, and manually calling them works, but not when using them in show rules

verbal anchor
#

Can you elaborate?

native meadow
#

so, I first tried having

#show list.item: it => [#it #pause]

 - item 1
 - item 2
#

this fails

#
error: panicked with: "Unsupported mark `touying-pause` at page 3. You can't use it inside some functions like `context`. You may want to use the callback-style `uncover` function instead."
   ┌─ @preview/touying:0.6.1/src/configs.typ:49:8
   │
49 │         panic("Unsupported mark `" + kind + "` at page " + str(page-num) + ". You can't use it inside some functions like `context`. You may want to use the callback-style `uncover` function instead.")
   │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#

then, I ported the one-by-one and item-by-item functions from polylux (removed the mode parameter)

#let one-by-one(start: 1, ..children) = {
  for (idx, child) in children.pos().enumerate() {
    uncover((beginning: start + idx), child)
  }
}

#let item-by-item(start: 1, body) = {
  let is-item(it) = type(it) == content and it.func() in (
    list.item, enum.item, terms.item
  )
  let children = if type(body) == content and body.has("children") {
    body.children
  } else {
    body
  }
  one-by-one(start: start, ..children.filter(is-item))
}
#

calling it directly works

#
#item-by-item[
 - item 1
 - item 2
]
#

but

#show list: item-by-item

 - item 1
 - item 2
#

yields the same error as before

#

i think what happens is that the show rules are resolved in a context expression in touying, and that's why it is complaining

deft pier
#

You can't use pause in show rule

stable dragon
#

Hello, is it expected that the layout do not converge within 5 attempts for a presentation of around 20 slides/60 pages?

#

Is there a way to fix the warning?

near nebula
#

Probably involved with a show rule

verbal anchor
#

And I've made very long touying presentations... This shouldn't happen.

stable dragon
#

That's strange, I am only using one show rule for touying, one for ctheorems + 2 simple ones for footnotes and outline. And commenting them out does not resolve the issue. I am using meanwhile, pause and uncover on the same slides, can it be because of that?

earnest birch
#

I think you can use them.

#

The most helpful hint would be a minimal reproducible example from your side.

verbal anchor
#

Is it on the web app?

#

Can you revert to a typst version that's earlier, than currently selected one, and tell me if you still get that warning?

stable dragon
#

here it is if you wanna have a look

#

I have the same issue in all versions of the compiler I have tested

#

it seems to be an issue with numering of headings and theorems 🤔

stable dragon
earnest birch
#

I didn't use and have no idea why ctheorems is needed, but perhaps it's a key problem, because otherwise it looks totally normal to me.

#
#import "@preview/ctheorems:1.1.3": *
#import "@preview/touying:0.6.1": *
#import themes.metropolis: *

#set heading(numbering: "1.1")
#show: metropolis-theme

== Theorem

#(thmbox("theorem", "Theorem"))[]

== a

1 #pause 2

== b

1 #pause 2

== c

1 #pause 2

stable dragon
#

I just found out there is already an issue open about that in the ctheorem repo

deft pier
#

@stable dragon You can use #show: metropolis-theme.with(config-common(enable-frozen-states-and-counters: false)) to disable feature of frozen counters and avoid this problem.

stable dragon
#

What is this option for ? I do not find it in the touying documentation

deft pier
stable dragon
#

Oh yeah sorry, the warning disappears yes but now the counter for the theorem is not frozen... It's arguably worse

deft pier
#

Yes, there is no real frozen state yet, so there will be this non-convergence warning

maiden reef
#

Would someone be able to help my with creating a reducer for this?

#ded-nat(
  arr: (
    (0, $U => Z$, "P"), 
    (0, $(Z and R) => A$, "P"), 
    (0, $U$, "P"), 
    
    (0, $Z$, [e $=>$, 1]),
    (1, $R$, "P"),
    (1, $Z and R$, [i $and$, 4, 5]),
    (1, $A$, [e $=>$, 6, 2]),
    
    (0, [$R => A$], [i $=>$, 5 -- 7]),
  )
)
lethal willow
#

How can I get a box around the title of slide in this form?

#

Moreover I see that I can only put institute logo either in header or the container. Putting it in header makes it too small.

somber scarab
#

Hi, when I do


#import "@preview/touying-brandred-uobristol:0.1.3": *


#show: uobristol-theme

// #set math.mat(delim: "[")
= test
#set math.mat(delim: "[")

$ mat() $

= text

I get the error "page configuration is not allowed inside of containers" from the line #set math.mat(delim: "[") (as shown #bot-corner message )

somber scarab
#

I still dont know why it happens but a workaround is

#{
set math.mat(delim: "[")

$ mat() $
}
deft pier
deft pier
dusky trench
#

how exactly do frozen counters work?

#import "@preview/touying:0.6.1": *
#import themes.simple: *

#show: simple-theme.with(
  config-common(
    enable-frozen-states-and-counters: true
  ),
)

== test

#counter("test").step()
#context counter("test").get()

#pause
#context counter("test").get()

what am i missing? how do i make this counter freeze?

stable dragon
#

You should add your counter to the array of frozen counters frozen-counters in config-common

dusky trench
#

i wish this were documented...

magic gulch
#

Is bibliography-as-footnote supposed to work? I can cite papers, but nothing appears on the slides

somber scarab
magic gulch
#

This is what I have, but it doesn't show...
I also added

#show: magic.bibliography-as-footnote.with(bibliography("bibliography.bib", title: none))
#

I'm using the Metropolis theme

somber scarab
magic gulch
#

Ok, thanks for the workaround 🙂

somber scarab
#

No prob!

somber scarab
# magic gulch This is what I have, but it doesn't show... I also added ```typst #show: magic.b...

I just check with the metropolis theme and it does work.

The MWE is

#import "@preview/touying:0.6.1": *


#import themes.metropolis: *


#show: metropolis-theme.with(
  config-info(title: [title], subtitle: [sub], author: [authors], date: datetime.today(), institution: []),
  config-common(new-section-slide-fn: none, show-bibliography-as-footnote: bibliography(
    title: none,
    "./src/bib.bib",
    style: "src/aps.csl",
  )),
)

#title-slide()


= test footnote bib

This is the citation: @abc2024
magic gulch
#

Wow, for me if I don't add #show: magic.bibliography-as-footnote.with(bibliography("bibliography.bib", title: none)), it complains that references do not exist

magic gulch
#

Well, I had bibliography-as-footnote instead of show-bibliography-as-footnote 🤦‍♂️

magic gulch
#

Why are bibliography items numbering reset at each slide?

#

Shouldn't they be incremented along the entire document?

maiden reef
#

Hi, I seem to be getting warning: layout did not converge within 5 attempts whenever I do #pause at the start of a slide - would anyone know how to avoid this?

verbal anchor
#

I'm just going to ask here. What if I don't want these "title slides"? I just want, a title page and then slides, and non of that section title page thing.

deft pier
#

config-common(new-section-slide-fn: none)

verbal anchor
lethal timber
#

Any ideas on how I can get the total number of slides in the current section in Touying? I'm trying to have a secondary progress counter on each slide aside from the one that displays the total progress (i.e., current_slide / total_slides is already there, I want current_slide_out_of_the_current_section / total_slides_in_current_section). I would like the current slide number in this secondary progress counter (not a progress bar) to reset on each new section as well.

#

I tried an absolute mess with counters, but then I can't get the context to work as it either breaks Touying's assertions:

assertion failed: you must use touying-slide-wrapper in your slide function

and I also can't use context with self as self is declared outside of the context scope. :(

earnest birch
#

I wanted to update dependencies of a document, but it was compiled with touying 0.5.3. And apparently it's the last version before a breaking change. After it you have to wrap slides with align to return old behavior?

#

It's such a weird bug, I don't even know what to think. Do I report it? You have 2 toggle lines + version change.

#

Basically, if I don't want an explicit show: align(left), I can't use set rules right below heading and before slide content.

#

Now set text below heading also affects heading above unless you put show: std.align.with(left) in let setting = it => {.

#

In 0.5.3 it only affected what's below, which does make sense.

deft pier
#

I think this might be a regression bug, I'll check it later, thanks!

young matrix
#

I don't quite get how this is supposed to work, why does the following code not produce anything under "Introduction"? In general first level heading don't generate any content, I remember doing a presentation with Touying and it was working how I had expected in 0.5.2

#import "@preview/touying:0.6.1": *
#import themes.dewdrop: *

#show: dewdrop-theme

= Introduction

- #lorem(10)

== Test

- #lorem(10)
#

it does work as expected if I put it in a #slide[] but that comes with some other problems

young matrix
# deft pier

or are you supposed to start from heading level 2? But then the outline doesn't work

young matrix
#

also how do you include a bibliography? I remember having it as a show rule in the first level 1 heading but these don't work anymore and I can't understand why having it in the config-common also doesn't work

#import "@preview/touying:0.6.1": *
#import themes.dewdrop: *

#show: dewdrop-theme.with(
  config-common(
    bibliography-as-footnote: bibliography(title: none, "works.yaml"),
  ),
)

= Introduction

- #lorem(10)

== Test

- #lorem(10) @HAWEN
foggy nova
young matrix
#

oh tank you

#

and is there a way to change the font size of the bibliography?

echo coral
#

Does anyone know how to make a table in Touying where the last column appear only on the second subslide?

young matrix
young matrix
#

Is there a way to remove both the dots and the page number for the new section slide?

young matrix
#

hello, when compling touying to HTML with the touying CLI a GIF that I hae in my presentation becomes extremely laggy, is there a way to improve the perfomance of the JS presentation? My computer isn't the best but it's really a very small GIF

somber scarab
# young matrix Is there a way to remove both the dots and the page number for the new section s...

Usually for the customization of outline, you may first check the Typst intrinsicoutline function https://typst.app/docs/reference/model/outline/
A specific theme could have its own way under the hood to generate an outline based on the intrinsic outline. So very possibly you need also to locate the function that's responsible for the outline in your picture. Note that in Touying there're also progressive-outline and in this theme Dewdrop, sidebar outline.
So before customizing a theme, it's better check through the source code of the theme to see how it's interfacing between the typst intrinsic functions and theme-specific functions accessible for users. For example, the outline seems to be generated here https://github.com/touying-typ/touying/blob/99fa25528b72933ffeda075c041589043c87073a/themes/dewdrop.typ#L193 .
And the fill parameter looks like to apply only to sidebar navigation, according to https://github.com/touying-typ/touying/blob/99fa25528b72933ffeda075c041589043c87073a/themes/dewdrop.typ#L9

young matrix
somber scarab
# young matrix Yes, customizations to the outline only apply to the first slide, that’s why I’m...

Sorry you mean you want to change exactly the sidebar outline?
Then maybe you should modify the theme initialization

#show: dewdrop-theme(
  aspect-ratio: "16-9",
  navigation: "sidebar",
  sidebar: (
    width: 10em,
    filled: false,
    fill: [ ], // <= disable dots by using sth else. Not tested 
    numbered: false,
    indent: .5em,
    short-heading: true,
  ),
...
)

See also https://github.com/touying-typ/touying/blob/99fa25528b72933ffeda075c041589043c87073a/themes/dewdrop.typ#L310

young matrix
somber scarab
# young matrix Nono, I want to change the outline that is show between a new section. What in t...

Now I see. Then please change the default outline function style. For example, add the following show rule into your main file. Be sure that it comes after the #show: dewdrop-theme.with(...) block.

// From Typst documentation https://typst.app/docs/reference/model/outline/
#show outline.entry: it => link(
  it.element.location(),
  // Keep just the body, dropping
  // the fill and the page.
  it.indented(it.prefix(), it.body()),
)
young matrix
near nebula
#

I was going to ask here, but forgout about it

#

Would it be possible to make the search only search for things in the current version?

#

It's a bit hard to find stuff in the documentation when you keep getting thrown to earlier versions

near nebula
#

I wish the templates would have a b etter implementation of author and institution

#

Often when making academic talks you include coauthors, and each have their own institution, which sometimes also overlap

broken magnet
#

touying creates a state to be populated with the bibliography, using the following function, but in typst 0.14 it gives an empty state (I believe):

#let record-bibliography(bibliography) 
  show grid: it => {
    bibliography-state.update(
      range(it.children.len()).filter(i => calc.rem(i, 2) == 1).map(i => it.children.at(i).body),
    )
  }
  place(hide(bibliography))
}
errant plume
#

(#contributors message)
-# (also [#quick-questions](#quick-questions message))

burnt fractal
#

it doesn't matter (because using grid is only the right thing if the typst version is frozen and the bibliography style is known to use grid), but show rule on grid.cell will still expose the same data, still in 0.14. If one wanted to continue using this method it's maybe possible that way.

burnt fractal
# broken magnet hey, please I need help with touying and bibliographies, is there someone with k...

you can recreate that style without using any bibiography magic like this (default ieee style)

#let cite-note(key, form: "normal", enumerate: false) = {
  set footnote(numbering: _ => none) if not enumerate
  footnote[#cite(form: "full", key)]
  if not enumerate {
    super[#cite(form: form, key)]
  }
}

You can also use enumerate: true for styles that have a too long marker for the normal form, and you could also use a bibliography style that always uses footnotes which is even better

scarlet escarp
#

im using university theme and have this setup:

#show: university-theme.with(
    aspect-ratio: "16-9",
    progress-bar: false,
...
)

however, the progress bar is still there. am i doing something wrong?

#

oh i just realized progress bar controls another component...

scarlet escarp
#

ideally id like the header to look like the subheader

#

i looked at the documentation and havent found a way to change that

near nebula
scarlet escarp
#

ahh

#

i did use this as a workaround but the downside is that the header color is black

#

one last thing, it is possible to disable this text on the top right?

broken magnet
burnt fractal
#

The best would be a natively footnote using cite style I guess, if you could convert your style to that. To change @ you can use a show rule on ref or cite. There's one thing we can do..

#

This way - mark any cite with "author" just as a marker, we won't use. Then translate all the default cites to cite-note. The author trick avoids recursion in the show rule (cite-note doesn't use that form)

#set cite(form: "author")
#show cite.where(form: "author"): it => cite-note(it.key)
Yep@CitekeyBook No@CitekeyMisc
#

if you need supplement, then you improve cite-note to support that and forward it through the rule above too

broken magnet
#

If anyone has the same use case as me, I currently am showing the references as in IEEE doc style:

#

This allows to write "This is used in [1] and [2] provides..."

#

Using a footnote CSL is quicker but the superscript does not really allow to do this

#

I slightly modified the snippet above because while obtaining this style, the citations where always coming next to the previous word (as if it was a supescript index, as in footnotes), I just added an empty space before in cite-note function (quick and dirty):

#
#let cite-note(key, form: "normal", enumerate: false) = {
  set footnote(numbering: _ => none) if not enumerate
  footnote[#cite(form: "full", key)]
  if not enumerate {
    // super[#cite(form: form, key)] // apice
    " " + cite(form: form, key) // normale
  }
}

#set cite(form: "author")
#show cite.where(form:"author"): it => cite-note(it.key)

and then cite with @key

broken magnet
#

update: the solution was horrible. I am still learning typst scripting so I can't solve the issue of refs attaching to the previous word ignoring spaces, here's a working solution:

#
#let cite-note(key, form: "normal", enumerate: false) = {
  set footnote(numbering: _ => none) if not enumerate
  "" + footnote[#cite(form: "full", key)]
  if not enumerate {
    cite(form: form, key) // normale
    // super[#cite(form: form, key)] // apice
  }
}
#

I just precede the ref with an empty string, this allows the ref to be placed mantaining spaces in the source before and after it.

burnt fractal
#

that doesn't seem so horrible

broken magnet
vocal tapir
#

Hi, I have successfully reimplemented our corporate design in touying, but now I am trying to make the slide title optional. In beamer, I used to just leave the title empty, and the full title (with separating line) would vanish, leaving more space for the content. I partly solved this (detecting slides started with == without text) via

  config-store(
    header: self => [
      #context if utils.current-heading().body != [] {

but I would now also like to reduce margin.top in this case, so that I can actually make use of the additional space. How would you address this? (I know I could write a custom slide function, but I would argue that it is much nicer to be able to just use empty headings, and the slide is not really of a different type. (I would consider a plain-slide for a completely empty one, or maybe just add a boolean show-footer argument to the slide function, so that I can have footerless slides with titles as well.)

#

Oh, cool, I found I can just set self.page.margin.top = self.page.margin.x, for instance. Now I only need to find out the correct place in my own code for conditional application.

#

(In the docs, only reading self.page was mentioned, but I now understand it's also writeable.)

vocal tapir
vocal tapir
#

Maybe it is touying-related after all, because it concerns the context-awareness of the touying-slide-wrapper, so it would be nice if some of you could take a look at that support thread as well!

stable dragon
#

I am not completely sure of what you are doing and I've seen that you've been able to solve your context issues. However, I suspect you don't actually need to use context here. From what I understand, the value of the slide header is supposed to be in self.store.header

vocal tapir
#

I will also implement subcaptions, analoguously, so I can just do

= Introduction
== Introducing the Main Application
=== (Informative subcaption here, still part of slide header)

- Feature 1
- Feature 2
...

== More Details on the Application

...
(Screenshot follows on next slide)

==

#image("large_screenshot.png", height: 100%)

for instance.

stable dragon
#

But are you writing a new theme, ie a new slide function or are you trying to tweak an existing one?

vocal tapir
#

A new one, mostly for the corporate design of my institute. But now that I did that, I guess that part could be useful for other themes as well.

#

But for now, I'll play with mine (which is not fully finished). I'll have to check whether I can put it into the universe as-is, because of logo copyrights.

stable dragon
fading shard
#

Is there a way to make bullet list items from two lists appear at the same time? I have a two column wide grid and each has a list and I want to compare the two

stable dragon
fading shard
#

Yeah, I know about meanwhile and have used it before. But it doesn’t seem to be working here.

#

Do you have a working example? Basically just a list on the right with 1. 2. 3. and on the right. all 1 appear at the same time and all 2, etc

#

Should I add the meanwhile as a grid cell content?

deft pier
#
#import "@preview/touying:0.6.3": *
#import themes.simple: *

#show: simple-theme.with(aspect-ratio: "16-9")

== Item by item

#slide[
  #item-by-item[
    - 1
    - 2
    - 3
  ]
][
  #item-by-item[
    - 1
    - 2
    - 3
  ]
]

== Or you can

#slide[
  - 1 #pause
  - 2 #pause
  - 3
][
  #meanwhile
  - 1 #pause
  - 2 #pause
  - 3
]
earnest birch
#

There is a very interesting and touch problem on the forum regarding page margin precedence. I wonder if these "user-defined config" markers can be added to fix the issue? I don't see any other way to solve this. Like it's a minor thing, but a paper cut nevertheless, and there is a potential to make the user experience smoother.
Or just check for the keys (updated the post).

foggy nova
earnest birch
#

exactly

#

I think the fix is actually not that hard, though feels still a bit jank. with checking the keys. though maybe with a separate named function it can be still ergonomic.
Yeah, I think it's pretty good: https://github.com/touying-typ/touying/pull/322.

earnest birch
gloomy cloak
#

I'm trying to create a presentation with touying (v0.7.1) using the dewdrop theme. When I create a new section (=) I always get a new outline in the previous page. Is it possible to disable this and just have the main outline?

deft pier
gloomy cloak
#

Great, thanks! I will try that! (It didn't thought about using none as a fn!)

plain oracle
#

Is there a way for alternatives to just take in a range of subslides? Using alternatives(a, a, a, b, b, b, b) feels a bit whack

near nebula
#

alternatives(...((a,)*3 + (b,)*4)) should work

plain oracle
#

Yea, a syntax like beamer with <1-5> and stuff like that

austere flame
#

Hi, I wanted to add an appendix to my presentation, modifying the heading numbering to "A.", but i have noticed that this is creating an extra (empty) slide before it. I think it may be related to commit 446cc68. Of course, I am using the latest available version: 0.7.3.

#

Here is an minimal example:

#

?r

#import "@preview/touying:0.7.3": *
#import themes.simple: *

#show: simple-theme.with(aspect-ratio: "16-9")
#set heading(numbering: "1.")

= Title

== First Slide

#slide[
  #lorem(20)
]

== Second Slide

#slide[
  #lorem(20)
]

#counter(heading).update(0)
#set heading(numbering: "A.1", supplement: [Anexo])
#show: appendix

= Appendices

#slide[
  #lorem(15)
]

austere flame
#

Should I open an issue? Maybe it has been already reported, I have searched in the open issues, but maybe I have skipped it.

austere flame
cold zinc
#

let's say i want to make a script for a youtube slides presentation, can i have a normal document and then implement touying to have my script reference slide pages?
so script and then slides, in the same doc

echo coral
#

@deft pier Thanks a lot for your work on Touying and its documentation. Would you welcome a pull request on the documentation website that would reveal the existence of other code editors than VSCode? Your description of Tinymist is currently “A full-featured Typst LSP extension for VS Code. Provides syntax highlighting, autocomplete, error diagnostics, and a built-in slide preview panel.” but this has nothing to do with VSCode. Tinymist is first a LSP server that can work with any code editor. It also contains a VSCode plugin but everything from your description is available when using Tinymist in other code editors.

near nebula
#

Is there a way to make touying get document metadata from #set document instead of vice versa?

#

I can only make it work if I put set document after the show rule