visit1985 / mdp

A command-line based markdown presentation tool.
GNU General Public License v3.0
4.96k stars 257 forks source link

Wish: Global/chapter headings #136

Closed ersi-dnd closed 5 years ago

ersi-dnd commented 5 years ago

Currently the top line in mdp is unused. In a competing program it is filled as follows Ekraanipilt_2019-04-22_18-12-13 For mdp, I suggest the following format to fill the top line.

The headings with # would be applicable for inline text as they are now. But the more global headings would use the equal-sign underline.

This is a heading for chapter or for the entire file
=====================================

It would be nice to not have to repeat the global/chapter headings. I have following use cases in mind.

Use case 1: Implicit or "smart"


This is an introductory heading 
========================

---

Some chunk of text in the next slide, on top of which 
the introductory heading would be visible, even though 
not explicitly repeated in the source input. If the user wants
to avoid the global/chapter heading on the top line, just type 
your headings with # as you mostly do anyway.

---

Ideally the first slide would present the introductory heading centred when the heading is the only item in the slide.

The second slide would repeat the heading, but this time on the top line, saving space while still keeping track of the topic.

The heading would run on top of the slides until a next heading is defined the same way, with equal-sign underline. From then on, the next heading would apply.

Use case 2: Explicit

This is an introductory heading 
========================
1. Some 
2. kind of
3. attempt at
4. a table 
5. of contents

---
Some
=====

chunk of text in the next slide, where the first item of 
the table of contents is visible on the top line.
Obviously, because I explicitly put it there.

The second use case would neatly fill the top line of the slides with explicitly defined items of table of contents - or whatever the user wishes to explicitly type there on the top line of slides.

visit1985 commented 5 years ago

Header and footer can be defined in the first two lines of your file as followed:

%title: my presentation
%author: by me

see sample.md