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

Changing to 4:3 slide #163

Closed
fabulist-ssdd opened this issue May 16, 2019 · 2 comments
Closed

Changing to 4:3 slide #163

fabulist-ssdd opened this issue May 16, 2019 · 2 comments

Comments

@fabulist-ssdd
Copy link

Hi, this is maybe not an issue. But it really troubles me as:

  • in old Marp, i can change slide size by using $size: 4:3.
  • now, I have been trying the new Marpit on VScode and web app. And, I have noticed that changing slide size need to be done by defining height and width of root section tag in style. well, the output result is like below.
    screenshot 2019-05-16 pm 11 06 58
    It left a blank space on the right that I don't know how to remove. I have tried exporting as pdf, html, and image. Is there something that I have done wrong, or ... ?
  • Using traditional 4:3 slide is quite important to me, as this is the only display ratio that I can have in workplace.
@yhatt
Copy link
Member

yhatt commented May 16, 2019

Slide size cannot change via inline style. It comes from Marpit's technical restriction.
https://marpit.marp.app/theme-css?id=slide-size

Using custom theme CSS can do it. This is an example changing slide size to 4:3 based on uncover theme by community.
https://github.com/ttyskg/marp-themes/blob/master/themes/css/uncover43.css

And Marp CLI allows using custom theme. Please try this on CLI tool:

marp --theme default43.css your-markdown.md --pdf
/* default43.css */
@import 'default';

section {
  width: 960px;
  height: 720px;
}

Marp Web and Marp for VS Code does not yet support custom theme, sorry.

@fabulist-ssdd
Copy link
Author

Slide size cannot change via inline style. It comes from Marpit's technical restriction.
https://marpit.marp.app/theme-css?id=slide-size

Using custom theme CSS can do it. This is an example changing slide size to 4:3 based on uncover theme by community.
https://github.com/ttyskg/marp-themes/blob/master/themes/css/uncover43.css

And Marp CLI allows using custom theme. Please try this on CLI tool:

marp --theme default43.css your-markdown.md --pdf
/* default43.css */
@import 'default';

section {
  width: 960px;
  height: 720px;
}

Marp Web and Marp for VS Code does not yet support custom theme, sorry.

Yes, I've got it. And, it brings me another thing that, well, I am looking forward to the VS Code support, so that I could use live preview while I am trying out css code. Using Marp CLI can give me 4:3, but also extended my workflow as it requires terminal every time I change even a small piece of code. And, by the way, I use Marp for a very long training material, let's say about 100 slides.

Anyway, I will keep looking on how can I convert my old css file used in old Marp. in the meantime, still, looking forward to critical update on Marp Next. Thanks again.

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