[O] Applying style to a paragraph for HTML export
(I thought this would be a FAQ, but I can't find anything similar) Hi, I'm exporting from org to html, which is working well. Since my final target is MSWord, I'd like to add style information to various paragraphs, ie bold, underline etc. I can see how to do eg *bold* for individual words, but how do I apply that kind of formatting to a span of text? (I'm CSS-ignorant, so please use small words and talk slowly) Thanks Robert
Re: [O] Applying style to a paragraph for HTML export
Robert Pluim rpl...@gmail.com writes: (I thought this would be a FAQ, but I can't find anything similar) Hi, I'm exporting from org to html, which is working well. Since my final target is MSWord, I'd like to add style information to various paragraphs, ie bold, underline etc. I can see how to do eg *bold* for individual words, but how do I apply that kind of formatting to a span of text? I recommend using the odt exporter and then use LibreOffice to convert the resulting file to MSWord. http://orgmode.org/worg/org-faq.html#convert-to-open-office You can search for org-odt in this mailing list if you need further info. Jambunathan K. (I'm CSS-ignorant, so please use small words and talk slowly) Thanks Robert --
Re: [O] Applying style to a paragraph for HTML export
Jambunathan K kjambunat...@gmail.com writes: Robert Pluim rpl...@gmail.com writes: (I thought this would be a FAQ, but I can't find anything similar) Hi, I'm exporting from org to html, which is working well. Since my final target is MSWord, I'd like to add style information to various paragraphs, ie bold, underline etc. I can see how to do eg *bold* for individual words, but how do I apply that kind of formatting to a span of text? I recommend using the odt exporter and then use LibreOffice to convert the resulting file to MSWord. http://orgmode.org/worg/org-faq.html#convert-to-open-office Whilst that would work, it's inherently a 2-step process, versus 1 for the html route, plus it requires installing yet-another-application. In any case, the example file for the odt-converter has corrected my misunderstanding: *bold* works even for multiple words (although it appears the various style markers don't nest: */bold-italic/* give me the same as *bold*). Thanks Robert
Re: [O] Applying style to a paragraph for HTML export
Robert Pluim rpl...@gmail.com writes: Jambunathan K kjambunat...@gmail.com writes: Robert Pluim rpl...@gmail.com writes: (I thought this would be a FAQ, but I can't find anything similar) Hi, I'm exporting from org to html, which is working well. Since my final target is MSWord, I'd like to add style information to various paragraphs, ie bold, underline etc. I can see how to do eg *bold* for individual words, but how do I apply that kind of formatting to a span of text? I recommend using the odt exporter and then use LibreOffice to convert the resulting file to MSWord. http://orgmode.org/worg/org-faq.html#convert-to-open-office Whilst that would work, it's inherently a 2-step process, versus 1 for the html route, plus it requires installing yet-another-application. I thought you said your final target is MSWord and not html. In any case, the example file for the odt-converter has corrected my misunderstanding: *bold* works even for multiple words (although it appears the various style markers don't nest: */bold-italic/* give me the same as *bold*). Spanned text has to be part of the single emacs line and not be broken across multiple lines. Thanks Robert --
Re: [O] Applying style to a paragraph for HTML export
Robert Pluim rpl...@gmail.com writes: Jambunathan K kjambunat...@gmail.com writes: Robert Pluim rpl...@gmail.com writes: (I thought this would be a FAQ, but I can't find anything similar) Hi, I'm exporting from org to html, which is working well. Since my final target is MSWord, I'd like to add style information to various paragraphs, ie bold, underline etc. I can see how to do eg *bold* for individual words, but how do I apply that kind of formatting to a span of text? I recommend using the odt exporter and then use LibreOffice to convert the resulting file to MSWord. http://orgmode.org/worg/org-faq.html#convert-to-open-office Whilst that would work, it's inherently a 2-step process, versus 1 for the html route, plus it requires installing yet-another-application. In any case, the example file for the odt-converter has corrected my misunderstanding: *bold* works even for multiple words (although it appears the various style markers don't nest: */bold-italic/* give me the same as *bold*). If you are using the odt exporter and if you don't use strikethrough (let's say) you can repurpose OrgStrike style to render bold italic style using the Stylist. Thanks Robert --
Re: [O] Applying style to a paragraph for HTML export
Jambunathan K kjambunat...@gmail.com writes: Robert Pluim rpl...@gmail.com writes: Jambunathan K kjambunat...@gmail.com writes: Robert Pluim rpl...@gmail.com writes: (I thought this would be a FAQ, but I can't find anything similar) Hi, I'm exporting from org to html, which is working well. Since my final target is MSWord, I'd like to add style information to various paragraphs, ie bold, underline etc. I can see how to do eg *bold* for individual words, but how do I apply that kind of formatting to a span of text? I recommend using the odt exporter and then use LibreOffice to convert the resulting file to MSWord. http://orgmode.org/worg/org-faq.html#convert-to-open-office Whilst that would work, it's inherently a 2-step process, versus 1 for the html route, plus it requires installing yet-another-application. I thought you said your final target is MSWord and not html. It is, but MSWord can read html directly, so no extra step is required. In any case, the example file for the odt-converter has corrected my misunderstanding: *bold* works even for multiple words (although it appears the various style markers don't nest: */bold-italic/* give me the same as *bold*). Spanned text has to be part of the single emacs line and not be broken across multiple lines. Ah, I don't think that's documented anywhere. Looks like I'll have to turn off auto-fill. Thanks Robert
Re: [O] Applying style to a paragraph for HTML export
Robert Pluim rpl...@gmail.com wrote: (I thought this would be a FAQ, but I can't find anything similar) Hi, I'm exporting from org to html, which is working well. Since my final target is MSWord, I'd like to add style information to various paragraphs, ie bold, underline etc. I can see how to do eg *bold* for individual words, but how do I apply that kind of formatting to a span of text? (I'm CSS-ignorant, so please use small words and talk slowly) Reading section 12.5.8, CSS support, and experimenting a bit, I came up with a short example that I hope will clarify that section for the CSS-ignorant (which I mostly am): --8---cut here---start-8--- #+OPTIONS: ^:nil #+STYLE: style type=text/css .bold {color: red;} /style #+STYLE: style type=text/css .inner {color: blue;} /style * Headline :PROPERTIES: :HTML_CONTAINER_CLASS: bold :END: This is a bold section. This is done by using the HTML_CONTAINER_CLASS property of the subtree and giving it the value bold, then setting the style for class _bold_ to accomplish the desired goal. But you can selectively #+HTML: span class=inner change some things like this #+HTML: /span if you want. --8---cut here---end---8--- Here is what I know about CSS (but take it with the appropriate grain of salt - as I said, I'm mostly CSS-ignorant): The thing to remember is that you can add span.../span to delimit HTML inline elements and div.../div for HTML block elements. Each can be given a class: span class=foo.../span or an id: span id=bar.../span. Classes are hierarchical, ids are targeted. In the style definitions, you write .foo { style info; ...} for classes and #bar {style info; ...} for ids. So you can use #+HTML: ... to add spans or divs at the appropriate places, giving them a class or id as you see fit, and then add #+STYLE: definitions at the top to style them. Be careful when typing: the slightest error will cause the browser to just ignore whole swaths of styling, which makes debugging ... interesting. I tend to edit the html file one tiny thing at a time and redisplaying. When I've figured out what's wrong, I go back to the org file and try the result. Nick
Re: [O] Applying style to a paragraph for HTML export
Nick Dokos nicholas.do...@hp.com writes: Robert Pluim rpl...@gmail.com wrote: (I thought this would be a FAQ, but I can't find anything similar) Hi, I'm exporting from org to html, which is working well. Since my final target is MSWord, I'd like to add style information to various paragraphs, ie bold, underline etc. I can see how to do eg *bold* for individual words, but how do I apply that kind of formatting to a span of text? (I'm CSS-ignorant, so please use small words and talk slowly) Reading section 12.5.8, CSS support, and experimenting a bit, I came up with a short example that I hope will clarify that section for the CSS-ignorant (which I mostly am): #+OPTIONS: ^:nil #+STYLE: style type=text/css .bold {color: red;} /style #+STYLE: style type=text/css .inner {color: blue;} /style * Headline :PROPERTIES: :HTML_CONTAINER_CLASS: bold :END: This is a bold section. This is done by using the HTML_CONTAINER_CLASS property of the subtree and giving it the value bold, then setting the style for class _bold_ to accomplish the desired goal. But you can selectively #+HTML: span class=inner change some things like this #+HTML: /span if you want. or like this: --8---cut here---start-8--- @span class=inner change some things like this @/span --8---cut here---end---8--- Note the ats preceding the html tags. Here is what I know about CSS (but take it with the appropriate grain of salt - as I said, I'm mostly CSS-ignorant): The thing to remember is that you can add span.../span to delimit HTML inline elements and div.../div for HTML block elements. Each can be given a class: span class=foo.../span or an id: span id=bar.../span. Classes are hierarchical, ids are targeted. In the style definitions, you write .foo { style info; ...} for classes and #bar {style info; ...} for ids. So you can use #+HTML: ... to add spans or divs at the appropriate places, giving them a class or id as you see fit, and then add #+STYLE: definitions at the top to style them. Be careful when typing: the slightest error will cause the browser to just ignore whole swaths of styling, which makes debugging ... interesting. I tend to edit the html file one tiny thing at a time and redisplaying. When I've figured out what's wrong, I go back to the org file and try the result. Nick --