GithubHelp home page GithubHelp logo

Feature request: Line spacing about org-reveal HOT 3 CLOSED

yjwen avatar yjwen commented on August 10, 2024 2
Feature request: Line spacing

from org-reveal.

Comments (3)

yjwen avatar yjwen commented on August 10, 2024 1

Hi,
You can specify the line spacing in CSS, either by modifying the Reveal.js CSS file, or by specifying a custom CSS in the Org file. Say you have a org file line_spacing.org and a CSS file line_spacing.css in the same dir. The contents of the two files are as below:

line_spacing.org:

#+OPTIONS: toc:nil
#+REVEAL_EXTRA_CSS: ./line_spacing.css

* Line Spacing Examples

  Specify line spacing for paragraphs in custom CSS file. For example,
  ~.reveal p {line-height: 3}~ will set line height 3 times of font height,
  accross the whole Reveal.js presentation

  * ~.reveal .org-ul {line-height: 2}~ in css
  * For list items

line_spacing.css:

.reveal p {
    line-height: 3;
}
.reveal .org-ul {
    line-height: 2;
}

Then you can modify the line spacing of paragraphs across the whole presentation by changing the value for entry line-height in the first selector, .reveal p, and the line spacing of unordered list items by the same entry in the second selector, .reveal .org-ul.

Please refer to the CSS specification, http://www.w3schools.com/cssref/pr_dim_line-height.asp, for other ways of setting line spacing.

from org-reveal.

phaebz avatar phaebz commented on August 10, 2024 1

Thanks for your detailed answer - just thought there might be something like that built into org-reveal (customizable in .el) and undocumented. I see that with all the .css options out there, this approach is far better and less work...

from org-reveal.

drscotthawley avatar drscotthawley commented on August 10, 2024

Found this issue after noting that nothing I tried had any effect, e.g. using a custom CSS file to sett padding and margin as in this SE answer had no effect:

li { margin: 0; padding: 0em; }

The correct usage is instead

.reveal li { margin: 0; padding: 0em}

from org-reveal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.