-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Split slides #137
Comments
Marpit allows flexible and predictable layouting via theme CSS, so I'm afraid edge cases of unexpected layout for Marpit theme author by split slides. I think it is not impossible to implement but should stay simple in Marpit. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
We expect that it's a job by theme CSS, not framework. Marpit already provides section.title {
--title-height: 130px;
--subtitle-height: 70px;
overflow: visible;
display: grid;
grid-template-columns: 1fr;
grid-template-rows: 1fr var(--title-height) var(--subtitle-height) 1fr;
grid-template-areas: "." "title" "subtitle" ".";
}
section.title h1,
section.title h2 {
margin: 0;
padding: 0;
text-align: center;
height: var(--area-height);
line-height: var(--area-height);
font-size: calc(var(--area-height) * 0.7);
border: 1px dashed gray; /* debug */
}
section.title h1 {
grid-area: title;
--area-height: var(--title-height);
}
section.title h2 {
grid-area: subtitle;
--area-height: var(--subtitle-height);
} <!-- _class: title -->
# Title
## Subtitle |
@yhatt I can understand the example and idea that you were trying to present. However, I believe that there are still needs for split slide for some certain situation, such as presenting comparative contents in one slide. I have tried to solve it with theme CSS as you were suggested. However, the solution involved with using html tags. section.split {
overflow: visible;
display: grid;
grid-template-columns: 500px 500px;
grid-template-rows: 100px auto;
grid-template-areas:
"slideheading slideheading"
"leftpanel rightpanel";
}
/* debug */
section.split h3,
section.split .ldiv,
section.split .rdiv { border: 1.5pt dashed dimgray; }
section.split h3 {
grid-area: slideheading;
font-size: 50px;
}
section.split .ldiv { grid-area: leftpanel; }
section.split .rdiv { grid-area: rightpanel; } ### A split slide
<!-- _class: split -->
<div class=ldiv>
#### Title for the left panel
- listed item
- listed item
- listed item
</div>
<div class=rdiv>
#### Title for the right panel
- listed item
- listed item
- listed item
</div> As @jingsam has suggested, PowerPoint offers layout options which provide a range of solutions on presenting different types of contents for variety of purposes, for example, comparative content: "advantages" on the left and "disadvantages" on the right, or explaining data table: "table" on the left and "descriptions" on the right. Right now, the advanced background setting can offer 2 columns display for text and image, which will be placed on each side. But, the needs are:
These needs, (well, in my opinion), are essential for a common presentation, especially when involving data table, evaluation, comparison, and etc. in wide screen. If I understand the marpit css framework right, I can adjust element display with css individually on tag basis. Which means, under the condition of using grid display, a H3 title can go either left or right. But once the H3 title has been defined on the left, it can't really be placed on the right. And, without a parent container such as So, I can accept using html tags. But, just wondering, is there any other solution with no html tags involvement? |
I think it's surely difficult to provide a complex layout only in Markdown because container elements are required for grid layout to some contents as you were pointing out. (e.g. reveal.js) A remaining way is using plugin to extend Marpit. It needs a lot of knowledges about JavaScript, Marpit and markdown-it, but it would be able to control the result of DOM structure as you like, by manipulating tokens and instance in plugin. So Marpit does never prevent to enhance Markdown syntax through plugin to help building containers for layout. Actually markdown-it-container, explained in the document, already might help that case. In all cases, our framework had better to keep simple structure, based on CommonMark and plain CSS themeing, for making easy to extend. Marpit should not provide complex layouts until The Only Neat Thing to Do has found. |
I'll plant a seed for an idea: Split slides by <!-- _layout: two-columns -->
# Title
***
## Contents
- foo
- bar
***
![](image.jpg)
---
# Second page |
It actually a good idea of using I have checked markdown-it-container like months ago when I first spot this thread. It requires knowledge about JavaScript which I don't have. And I have tried to find a markdown preview plugin for markdown-it-container on VSCode, which failed again. It seems that adding container is not really a critical need for a markdown document. As you have kept mentioned about marpit should stay simple, a markdown document is meant to be simple as well. Then, it got me thinking and actually changing the structures of all my document templates. I am actually a Latex user for more than half decade, complex formatting seems a life for my work. I used a lot container in Latex beamer in order to separate different types of contents. To be honest, markdown+css is far more easier to maintain than latex, while I am not composing document with strict academic formatting requirements. Now, I can't really help with programming bit as I am never a programmer. But, here is what I thought about using For the most of time, Latex offers a concept of structural writing. A normal article will have front matter, main matter, and end matter for different functions. So does the presentation. In Latex beamer, even the slide page was edited frame by frame individually, it is still encouraged to separated them by sections or sub-sections. The frame title (slide title) were separated from section structure. As for Marpit, separating slides can be done in Now, the
These work perfectly under the current framework, while all elements in a slide are vertically line up and within a So, using
And, here are some predictable compatibility issues:
For advanced usage:
Well, here is all I can come out with right now. |
Have any progress about using *** as column separator ? |
No. That's just an idea and we don't think to start work for the built-in feature. We expect creating plugin for If the plugin has grown by accepting by community, we would consider to take in it. |
A benefit of sticking to markdown-it-container syntax, is that it's very close to a "fenced div" syntax Pandoc supports. One difference is that Pandoc works with explicit
(and nothing special for |
I agree with @yhatt that keeping this simple and compatible with standard Markdown sounds the sane way to go, as there are out there enough Markdown dialects already. Having said this, it is true that LaTeX does have different interpretations for document parts for book, article or beamer presentation, but LaTeX is a full typesetting system, in a way placed on the extreme opposite from Markdown, whose ethos was always to bring down the complexity. Here are my current solutions: 1. CSS
|
This comment has been minimized.
This comment has been minimized.
What about including syntax like Deckset's |
I use Atom to write markdown, and there is an atom-marp package for previewing marp slide decks. I feel the documentation for creating themes is still "not simple enough". Multi-column slide layout is very common practice. This needs to be provided with the built-in themes, and we need a few more choices for built-in themes. |
I find myself agreeing with @walterrowe . I'm pretty technical and comfortable using md, reSt, LaTeX, etc. Of course, when I'm making slides, I just want to make slides; not deal with thinking about coding and HTML/CSS. The purpose of markdown is to allow a writer to focus more on content and less on formatting. Doing something like Deckset's Marp is cool, but maybe Deckset or http://Slideas.app are better for me; acknowledging not every tool is meant for everyone. I love the idea of Marp, though. |
Our policy to achieve long-term maintainabillity of the ecosystem is "Keep following CommonMark and don't add too extra syntaxes". (A classic Marp app had burned out by lacking this) Marpit is a framework for JS developers and designers that have treating Markdown so we have to keep simple not only for Marp users but also for like them. And Marp team requires the proof of a new syntax usefullness by community plugin, to merge as the built-in feature (https://github.com/marp-team/.github/blob/master/CONTRIBUTING.md#before-adding-new-feature) Actually I'm wondering if why anyone does not try to make plugin, though the idea of extra syntax to split columns is supported by many users. An important difference from the other similar products like Deckset and Slideas is that Marp ecosystem is open-source and everyone can try to improve by extensible plugin architecture based on markdown-it. We have more technical documentation in https://marpit-api.marp.app/ and I hope someone of community makes a plugin for that by referring docs and our implementations. |
For users that came from search engine: More simple way with modern CSS is available in marp-team/marp#192. |
I was wondering if there is a way to split the canvas in the same way as you can split the slide for background images, i.e. a two-columns layout?
At the moment, this is possible,
but wouldn't it be nice to be able to split the slides for non-image contents,
or to even vertically split a column to include non-image contents or BG-images only within one column?
If this can not easily be added, I think it would already be very nice if this only works with BG-images.
Maybe this can be realized with additional keywords (e.g., left-top, left-bottom, right-top, right-bottom), like in the example above.
The text was updated successfully, but these errors were encountered: