Skip to content

Commit

Permalink
Add instructions for CSS syntax highlighting to example
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuart Sierra committed Mar 9, 2012
1 parent 66e3438 commit 176c796
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 10 deletions.
44 changes: 38 additions & 6 deletions example.html
Expand Up @@ -7,7 +7,7 @@
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta name="title" content="Example Presentation"/> <meta name="title" content="Example Presentation"/>
<meta name="generator" content="Org-mode"/> <meta name="generator" content="Org-mode"/>
<meta name="generated" content="2012-02-24 10:58:39 EST"/> <meta name="generated" content="2012-03-09 18:48:13 EST"/>
<meta name="author" content="Stuart Sierra"/> <meta name="author" content="Stuart Sierra"/>
<meta name="description" content=""/> <meta name="description" content=""/>
<meta name="keywords" content=""/> <meta name="keywords" content=""/>
Expand Down Expand Up @@ -51,6 +51,7 @@ <h2>Table of Contents</h2>
<li><a href="#sec-2">2 Source Code</a> <li><a href="#sec-2">2 Source Code</a>
<ul> <ul>
<li><a href="#sec-2-1">2.1 Syntax Highlighting</a></li> <li><a href="#sec-2-1">2.1 Syntax Highlighting</a></li>
<li><a href="#sec-2-2">2.2 Syntax Highlighting with CSS Classes</a></li>
</ul> </ul>
</li> </li>
<li><a href="#sec-3">3 Images</a> <li><a href="#sec-3">3 Images</a>
Expand Down Expand Up @@ -219,16 +220,47 @@ <h3 id="sec-2-1"><span class="section-number-3">2.1</span> Syntax Highlighting &




<ul> <ul>
<li>Org-Mode HTML export uses htmlize.el <li>Org-Mode HTML export uses <a href="http://www.emacswiki.org/emacs/Htmlize">htmlize.el</a>
</li> </li>
<li>Code in exported HTML will match your current Emacs theme <li>Code in exported HTML will match your current Emacs theme
<ul> <ul>
<li>Choose a theme that looks good on slides! <li>Choose a theme that looks good on a projector!
</li> </li>
<li>Tip: launch Emacs with <code>-q</code> to skip your custom settings </ul>

</li>
</ul>


</div>

</div>

<div id="outline-container-2-2" class="outline-3">
<h3 id="sec-2-2"><span class="section-number-3">2.2</span> Syntax Highlighting with CSS Classes &nbsp;&nbsp;&nbsp;<span class="tag"><span class="slide">slide</span></span></h3>
<div class="outline-text-3" id="text-2-2">


<ul>
<li>Set the Emacs variable:
<ul>
<li><code>org-export-htmlize-output-type</code>
</li>
<li>to the symbol <code>css</code>
</li> </li>
</ul> </ul>


</li>
<li>Htmlize.el will add SPAN tags with CSS classes
<ul>
<li>Named for each font face, e.g. <code>org-comment</code>
</li>
</ul>

</li>
<li>Examine HTML output to see class names
</li>
<li>Add CSS styles to set colors
</li> </li>
</ul> </ul>


Expand All @@ -251,7 +283,7 @@ <h2 id="sec-3"><span class="section-number-2">3</span> Images &nbsp;&nbsp;&nbsp;
</ul> </ul>


</li> </li>
<li>See also these Emacs variables <li>See also these Emacs variables:
<ul> <ul>
<li><code>org-export-html-inline-images</code> <li><code>org-export-html-inline-images</code>
</li> </li>
Expand Down Expand Up @@ -395,7 +427,7 @@ <h3 id="sec-5-2"><span class="section-number-3">5.2</span> The End &nbsp;&nbsp;&
</div> </div>


<div id="postamble"> <div id="postamble">
<p class="date">Date: 2012-02-24 10:58:39 EST</p> <p class="date">Date: 2012-03-09 18:48:13 EST</p>
<p class="author">Author: Stuart Sierra</p> <p class="author">Author: Stuart Sierra</p>
<p class="creator">Org version 7.8.02 with Emacs version 23</p> <p class="creator">Org version 7.8.02 with Emacs version 23</p>
<a href="http://validator.w3.org/check?uri=referer">Validate XHTML 1.0</a> <a href="http://validator.w3.org/check?uri=referer">Validate XHTML 1.0</a>
Expand Down
17 changes: 13 additions & 4 deletions example.org
Expand Up @@ -54,16 +54,25 @@ Use =begin_src/end_src= blocks to include source code.


** Syntax Highlighting :slide: ** Syntax Highlighting :slide:


- Org-Mode HTML export uses htmlize.el - Org-Mode HTML export uses [[http://www.emacswiki.org/emacs/Htmlize][htmlize.el]]
- Code in exported HTML will match your current Emacs theme - Code in exported HTML will match your current Emacs theme
- Choose a theme that looks good on slides! - Choose a theme that looks good on a projector!
- Tip: launch Emacs with =-q= to skip your custom settings
** Syntax Highlighting with CSS Classes :slide:

- Set the Emacs variable:
- =org-export-htmlize-output-type=
- to the symbol =css=
- Htmlize.el will add SPAN tags with CSS classes
- Named for each font face, e.g. =org-comment=
- Examine HTML output to see class names
- Add CSS styles to set colors


* Images :slide: * Images :slide:


- Slides can contain images - Slides can contain images
- Any file type a browser can display - Any file type a browser can display
- See also these Emacs variables - See also these Emacs variables:
- =org-export-html-inline-images= - =org-export-html-inline-images=
- =org-export-html-inline-image-extensions= - =org-export-html-inline-image-extensions=
- Controls which file types get exported - Controls which file types get exported
Expand Down

0 comments on commit 176c796

Please sign in to comment.