Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content space of Metropolis's title slide option is not handling relative type correctly #175

Open
tapyu opened this issue Jun 24, 2024 · 3 comments

Comments

@tapyu
Copy link

tapyu commented Jun 24, 2024

#import "@preview/polylux:0.3.1": *
#import themes.metropolis: *

#show: metropolis-theme.with(
  footer: [Custom footer]
)

#set text(font: "Fira Sans", weight: "light", size: 20pt)

#title-slide(
  author: [Authors],
  title: "Title",
  subtitle: "Subtitle",
  date: "Date",
  extra: [
    #box(width: 100%, height: 100%, fill: blue)[
      #align(bottom)[
        test
      ]
    ]
  ]
)

image

test should be in the bottom of the title slide. Instead, I new slide was created... #title-slide should make its entries aware of how much space there is within the current slide. This is clearly not the case because a box with 100% in height and weight creates a space that cover the next slide totally.

@tapyu tapyu changed the title Page limits of Metropolis theme's tile slide is not correct Page limits of Metropolis theme's title slide is not correct Jun 24, 2024
@andreasKroepelin
Copy link
Owner

I think what you want is a height of 1fr which, if not possible now, will become possible in the next Typst version.

@tapyu
Copy link
Author

tapyu commented Jun 25, 2024

Fraction type is not allowed for #box's height.

will become possible in the next Typst version.

Do you have any issue or PR reference for that?

@tapyu
Copy link
Author

tapyu commented Jun 25, 2024

#slide(title: "Motivation")[
  #grid(
    columns: (1fr, 1fr),
    gutter: 10pt,
    box(width: 100%, height: 100%, fill: blue)[
        test
    ],
    box(width: 100%, height: 100%, fill: blue)[
        test
    ]
  )
]

image

Note that, in functions such as #grid, relative values are assessed with respect to the space reserved to its content, not the whole page space. I think #title-slide should have the same behavior for the sake of consistency.

@tapyu tapyu changed the title Page limits of Metropolis theme's title slide is not correct Content space of Metropolis's title slide option is not handling relative type correctly Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants