Centering content
Hello,
First of all, patat looks like a great tool and I really like the concept. I have looked into few similar projects and patat looks like the most robust tool.
I'm trying to create my first presentation with it and stumbled on few issues. First of all, the "centered title slide" (referenced here https://github.com/jaspervdj/patat#input-format) does not seem to work if you separate the slides with ----. It only works when not using separators (auto splitting). Don't know if this is intentional, but can't always use auto splitting if you want slides with no titles for example.
I would also like an option to center something myself. I know Markdown does not support that but would be nice to have some custom control for it.
Another thing that I think would allow to make nicer looking presentations would be to be able to add some padding before the content. Or ability define a desired line length and then it would center that accordingly depending how wide the terminal is (something similar that this CSS example achieves .content { width: 300px; margin: 0 auto; }). If you have a big screen then starting the content from top left is not really ideal to create good looking presentation. Here is another similar tool that has a screenshot in the README that demonstrates this nicely https://github.com/jclulow/vtmc
These are fair concerns.
-
Re: centered slides: that's a good concern. I would like to change the behaviour here a bit but I'm slightly wary of changing the semantics of slides in a non-backwards compatible way. I think what we could do is treat
----differently (just as a slide breaker) whenslideLevelis explicitly set. -
That's also a good suggestion. I think the best syntax would be to rely on the ability to put raw HTML into markdown, e.g.:
This is a normal paragraph. <center> This is a centered paragraph. </center>I would need to investigate how this works with other Pandoc frontends though -- markdown is not the only supported language.
-
It is already possible to set the width. Put something like this in your metadata block:
--- patat: columns: 40 ...And
patatwill behave like the terminal is 40 columns wide. Adding margins is a good idea though. I imagine that would look like:--- patat: margin: top: 1 left: 2 ...
Setting columns: 40 works, but still leaves the content to the left edge of the screen. It would be nicer to center the content (or another conf option to set it centered). At least I would personally more like the ability to center the fixed width columns rather than setting fixed margin, that way I don't need to know the terminal width.
Also, there is no mention about the columns option in the readme. So might want to update it at some point :)
It will be nice to extract all possible configuration options. For example now I'm looking for a way to set general background...
@majkrzak There is currently no way to set the background. If this is desired, please create a new issue -- this one is about having a way to center content.
@jaspervdj my point was mostly about documentation
hi guys
put raw HTML into markdown
as of today, this feature has not been implemented. correct? that is interesting, since markdown does support HTML as far as I know.. but it's probably a Pandoc thing. I might dig into your code then.
I vote for this feature! mdp has good centering, but it is bad with colors and syntax highlighting - so patat is my choice. But patat could be much better with auto-centering of content. Margins -- are not the best workaround...
This should be fixed on the main branch and will be included in the next release.
This is included in v0.11.0.0 and later :partying_face: