I write my presentations in Markdown, and use pandoc to compile into a PDF with latex's beamer.

An issue I frequently encounter is that I write too much, and so the content gets out of the slide.

Here is an example:

# Example

## Example

I'm writing too much.

I really write too much.




This is the equation for voltage.

Voltage is measures in Volts.

Resistance is measured in ohms ($\omega$).

Current is measured in amperes.

The previous one was an equation from physics.

It ties force with mass and acceleration. The equation before that was Einstein's.

Which results in:

enter image description here

As you can see, "was Einstein's" is out of the slide.

How can I have an horizontal ruler that tells me when there is no more space on the slide?

I'm using neovim.

  • 1
    Offtopic: the symbol for Ohm is a capital omega Ω. Lowercase omega ω is commonly used for angular frequency in AC circuits (or angular velocity in general).
    – Friedrich
    Mar 22 at 8:51
  • 1
    I am really wondering how should Vim know, whether this will fit on a slide on a totally different medium Mar 22 at 10:23
  • @ChristianBrabandt a horizontal ruler placed on the 25th line after the line that starts with "##" would be good enough for me, if there is no other way. Mar 22 at 11:02
  • FWIW, LaTeX doesn't even know how much fits on one slide and happily produces output beyond the page. What about the old rule of thumb to have no more than three bullet points per slide? Efficient use of slide real estate rarely makes for a good presentation.
    – Friedrich
    Mar 22 at 11:35
  • @robertspierre "a horizontal ruler"? what is that supposed to be? Mar 22 at 12:11

1 Answer 1


You can highlight the a specific line (line 25 in this example) of your text with the following calls:

hi LightBlue guibg=#00afff ctermbg=039
match LightBlue /\%25l.*/

Of course this is a very rough way. The limit in the number of lines will depend of the type of line (normal, list items, title, subtitle) but also on the symbol that you are using (e.g. mathematical formula).

I would personally use the markdown-preview plugin to have a visual hint of how my slides looks to avoid making them too long.

enter image description here

  • 1
    I have markdown-preview plugin, but it does not generate beamer slides, it generates a continuous HTML, no? How do I know where the slide would end? Mar 22 at 8:53
  • 1
    Also, I would need that horizontal line to move for a new slide Mar 22 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.