Re: [O] html export using html5 elements and bootstrap framework

2015-01-07 Thread R C
Bill White billw at wolfram.com writes:

 
 On Fri Jan 02 2015 at 09:47, R C recif at yahoo.com wrote:
 
  I would like to have org mode export a project using html5 elements
  and bootstrap framework adapting the worg tutorial:
  org-publish-html-tutorial.html
  
  I set it up as:
  - minimal org file to be published: ~/web/p2/org/tst.org
 
 I think this isn't quite what you need to export a single file, but
 o-blog by Sébastien Gross functions as an org-mode frontend for
 bootstrap: https://github.com/renard/o-blog
 
 Cheers -
 
 bw

Thanks. The layout of one of the websites listed as using o-blog:
http://common-lisp.net/ is pretty close to what I would like to have. I was
a little confused about whether v2 supported org-mode as the tutorial for v2
used pandoc mode and mentioned org-mode in connection with v1. But I will
try it.





Re: [O] html export using html5 elements and bootstrap framework

2015-01-07 Thread R C
Rick Frankel rick at rickster.com writes:

 As Rasmus mentioned in a previous email, there is no way currently to add html
 attributes to lists w/ ATTR_HTML.
 
 A filter, a mentioned above, is your simplest approach. The best (IMHO) would
 be to create a derived exporter (ox-bootstrap?) based on ox-html. You can look
 at one of the slideshow backends (ox-deck, ox-s5, ox-reveal) for
 examples (e.g., `org-deck-item' or org-s5-headline for how to advise the
 html exporter functions.)
 
 rick
 
 

Thanks for the pointers. One of the other responses mentioned o-blog and I
am going to try it. But setting up an export backend also seems fairly
straightforward to do.






Re: [O] html export using html5 elements and bootstrap framework

2015-01-06 Thread Bill White
On Fri Jan 02 2015 at 09:47, R C re...@yahoo.com wrote:

 I would like to have org mode export a project using html5 elements
 and bootstrap framework adapting the worg tutorial:
 org-publish-html-tutorial.html
 
 I set it up as:
 - minimal org file to be published: ~/web/p2/org/tst.org

I think this isn't quite what you need to export a single file, but
o-blog by Sébastien Gross functions as an org-mode frontend for
bootstrap: https://github.com/renard/o-blog

Cheers -

bw
-- 
Bill White . bi...@wolfram.com
No ma'am, we're musicians.




Re: [O] html export using html5 elements and bootstrap framework

2015-01-06 Thread Rick Frankel
On Sun, Jan 04, 2015 at 02:32:03AM +0100, Rasmus wrote:
 Hi,
 
 RC re...@yahoo.com writes:
 
  If the default heading and content classes used by ox-html could be
  changed or aliased it should work well with org-mode html
 
 Maybe you can set up filters then to replace e.g. section into the desired
 naming-scheme.  AFAIR class-names are hard-coded in ox-html.

As Rasmus mentioned in a previous email, there is no way currently to add html
attributes to lists w/ ATTR_HTML.

A filter, a mentioned above, is your simplest approach. The best (IMHO) would
be to create a derived exporter (ox-bootstrap?) based on ox-html. You can look
at one of the slideshow backends (ox-deck, ox-s5, ox-reveal) for
examples (e.g., `org-deck-item' or org-s5-headline for how to advise the
html exporter functions.)

rick




Re: [O] html export using html5 elements and bootstrap framework

2015-01-03 Thread Rick Frankel
On Fri, Jan 02, 2015 at 03:47:36PM +, R C wrote:
 I would like to have org mode export a project using html5 elements and
 bootstrap framework adapting the worg tutorial: 
 org-publish-html-tutorial.html 
 
 - template with links to bootstrap css and js files, and a local.js file
 with my macro definitions for mathjax: ~/web/org-templates/level-0.org 
 with lines of the form:
 #+STYLE:   link href=css/bootstrap.min.css rel=stylesheet 
 media=screen

I don't believe `STYLE' is used by the HTML exporter. See: `HTML_HEAD'
(`org-html-head') and `HTML_HEAD_EXTRA' (`org-html-head-extra'.)

 I also have: (setq org-html-html5-fancy t)

This only affects the use of html5 specific tags (section, article). The
exported doctype is controlled by HTML_DOCTYPE (`org-html-doctype')

 However tst.html does not show any inclusions from the level-0.org file and
 does not seem to use the html5 doctype:

Because there were no valid HTML options in level-0 and the doctype wasn't
set? Not having the contents of the file I can't be 100% sure.


Regardless, I don't think bootstrap will work very well. Doesn't it require
specific classes on the markup? To make it work you will probably need to add
additonal classes to every heading, etc.

rick



Re: [O] html export using html5 elements and bootstrap framework

2015-01-03 Thread RC
Rick Frankel rick at rickster.com writes:
 On Fri, Jan 02, 2015 at 03:47:36PM +, R C wrote:
  with lines of the form:
  #+STYLE:   link href=css/bootstrap.min.css rel=stylesheet 
media=screen 
 I don't believe `STYLE' is used by the HTML exporter. See: `HTML_HEAD'
 (`org-html-head') and `HTML_HEAD_EXTRA' (`org-html-head-extra'.)

I did change this based on the v 8 documentation and that fixed many of 
the issues I was having.

 Regardless, I don't think bootstrap will work very well. Doesn't it 
require
 specific classes on the markup? To make it work you will probably need 
to add
 additonal classes to every heading, etc.
 
 rick
 
I can use #+ATTR_HTML to include bootstrap specific classes for tables, 
etc but I have been unable to find a way to add a desired class to the 
ul for the TOC, or change the default outline-N and outline-text-N 
classes for headings and contents, respectively. It may be possible to 
alias bootstrap classes using a CSS preprocessor. 

RC





Re: [O] html export using html5 elements and bootstrap framework

2015-01-03 Thread Rasmus
Hi,

RC re...@yahoo.com writes:

 I can use #+ATTR_HTML to include bootstrap specific classes for tables, 
 etc but I have been unable to find a way to add a desired class to the 
 ul for the TOC, or change the default outline-N and outline-text-N 
 classes for headings and contents, respectively. It may be possible to 
 alias bootstrap classes using a CSS preprocessor. 

At the moment you can't add extra classes to lists (patch welcomed).
However, you can add CUSTOM_HEADERs to your sections and do stuff like
this:

   #text-my-sec li {display: inline;}
   #text-my-sec li:after {content: , ;}
   #text-my-sec li:last-child:after {content: ;}

I don't know what bootstrap is though, so I don't know if it helps.

—Rasmus

-- 
To err is human. To screw up 10⁶ times per second, you need a computer




Re: [O] html export using html5 elements and bootstrap framework

2015-01-03 Thread RC
Rasmus rasmus at gmx.us writes:

 
 Hi,
 At the moment you can't add extra classes to lists (patch welcomed).
 However, you can add CUSTOM_HEADERs to your sections and do stuff like
 this:
 
#text-my-sec li {display: inline;}
#text-my-sec li:after {content: , ;}
#text-my-sec li:last-child:after {content: ;}

I use a custom css file for specific styling of elements.

 
 I don't know what bootstrap is though, so I don't know if it helps.
 
 —Rasmus
 
(twitter-)Bootstrap provides a nice set of classes for navigation (TOC) 
bars, and control over layout, e.g side-by-side locks figures, etc using a 
grid-based framework. If the default heading and content classes used by 
ox-html could be changed or aliased it should work well with org-mode html 
export.

RC






Re: [O] html export using html5 elements and bootstrap framework

2015-01-03 Thread Rasmus
Hi,

RC re...@yahoo.com writes:

 If the default heading and content classes used by ox-html could be
 changed or aliased it should work well with org-mode html

Maybe you can set up filters then to replace e.g. section into the desired
naming-scheme.  AFAIR class-names are hard-coded in ox-html.

—Rasmus

-- 
Vote for proprietary math!




[O] html export using html5 elements and bootstrap framework

2015-01-02 Thread R C
I would like to have org mode export a project using html5 elements and
bootstrap framework adapting the worg tutorial: org-publish-html-tutorial.html 

I set it up as:
- minimal org file to be published: ~/web/p2/org/tst.org
#+SETUPFILE: ~/web/org-templates/level-0.org
#+TITLE: Testing
* heading 1
  abc

- template with links to bootstrap css and js files, and a local.js file
with my macro definitions for mathjax: ~/web/org-templates/level-0.org 
with lines of the form:
#+STYLE:   link href=css/bootstrap.min.css rel=stylesheet media=screen
etc

- my project is setup as:
  (p2-org
   :base-directory ~/web/p2/org
   :publishing-directory ~/web/p2/public_html
   :recursive t
   :base-extension org
   :publishing-function org-html-publish-to-html
   :style-include-default nil
   :creator-info nil)
  (p2-extra
   :base-directory ~/web/p2/org
   :publishing-directory ~/web/p2/public_html
   :base-extension css\\|pdf\\|png\\|jpg\\|gif
   :publishing-function org-publish-attachment
   :recursive t
   :author nil)
  (p2
   :components (p2-org p2-extra

I also have: (setq org-html-html5-fancy t)

However tst.html does not show any inclusions from the level-0.org file and
does not seem to use the html5 doctype:
?xml version=1.0 encoding=utf-8?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html xmlns=http://www.w3.org/1999/xhtml; lang=en xml:lang=en
head
titleTesting/title
!-- 2015-01-02 Fri 10:41 --
meta  http-equiv=Content-Type content=text/html;charset=utf-8 /
meta  name=generator content=Org-mode /

script type=text/javascript src=js/org-info.js
...
/script
/head
body
div id=content
h1 class=titleTesting/h1
div id=table-of-contents
h2Table of Contents/h2
div id=text-table-of-contents
ul
lia href=#sec-1heading 1/a/li
/ul
/div
/div

div id=outline-container-sec-1 class=outline-2
h2 id=sec-1heading 1/h2