Re: [O] Seeking advice on a worg contribution
Hi James, James Harkins writes: > Here's a patch for worg.css. Captions for source code blocks are > rendered as in the HTML export, with the class name > org-src-name. I checked in Firefox, and it does change the appearance > of the captions. Applied, thanks. Should be active on Worg in a little while. > It's getting kind of late here and I'm running out of steam, so I'll > deal with the links and pushing the text tomorrow. Thanks! -- Bastien
Re: [O] Seeking advice on a worg contribution
On Tuesday, May 6, 2014 6:08:10 PM HKT, Bastien wrote: If not, what do I have to do to make it do that? (At least, display the captions slightly smaller.) Propose a diff against this CSS: http://orgmode.org/worg/style/worg.css adding text properties (like font-size, for example?) to a new .figure p {...} class. Here's a patch for worg.css. Captions for source code blocks are rendered as in the HTML export, with the class name org-src-name. I checked in Firefox, and it does change the appearance of the captions. It's getting kind of late here and I'm running out of steam, so I'll deal with the links and pushing the text tomorrow. hjh From 67961f8baa13318e846c6b09f38f779ae8665c90 Mon Sep 17 00:00:00 2001 From: James Harkins Date: Tue, 6 May 2014 22:35:10 +0800 Subject: [PATCH] Add class definition for label.org-src-name for source-block captions --- style/worg.css |5 + 1 file changed, 5 insertions(+) diff --git a/style/worg.css b/style/worg.css index 2553546..1807f28 100644 --- a/style/worg.css +++ b/style/worg.css @@ -926,6 +926,11 @@ content: "*** " .rss_item a:hover {} .rss_date {} +label.org-src-name { + font-size: 80%; + font-style: italic; +} + #show_source {margin: 0; padding: 0;} #postamble { -- 1.7.9.5
Re: [O] Seeking advice on a worg contribution
James Harkins writes: > On May 6, 2014 6:15:35 PM Bastien wrote: > >> The formatting looks fine to me! >> Please go ahead and push it on Worg. > > Ok! I guess I should add some links to the new page too? Yes -- depends on where you put it of course. >> Propose a diff against this CSS: >> http://orgmode.org/worg/style/worg.css >> >> adding text properties (like font-size, for example?) to a new >> .figure p {...} class. > > Ahh... The #+HTML_HEAD is good to know, but *this* is the droid I was > looking for. Thanks! You're welcome, -- Bastien
Re: [O] Seeking advice on a worg contribution
On May 6, 2014 6:15:35 PM Bastien wrote: The formatting looks fine to me! Please go ahead and push it on Worg. Ok! I guess I should add some links to the new page too? Propose a diff against this CSS: http://orgmode.org/worg/style/worg.css adding text properties (like font-size, for example?) to a new .figure p {...} class. Ahh... The #+HTML_HEAD is good to know, but *this* is the droid I was looking for. Thanks! hjh Sent with AquaMail for Android http://www.aqua-mail.com
Re: [O] Seeking advice on a worg contribution
Hi James, James Harkins writes: > I finally finished a draft (attached, and not carefully proofread yet) > of a new worg page to outline what I had to do for a big Beamer > publishing project. Could somebody look it over and advise of any > formatting problems? I guess it should be basically OK; I copied the > standard worg header, and I stuck to normal org markup throughout. The formatting looks fine to me! Please go ahead and push it on Worg. > A specific formatting question: I have several source code blocks with > captions. The captions are formatted exactly the same as normal > paragraphs. Will worg use a different CSS style for captions? No. > If not, what do I have to do to make it do that? (At least, display > the captions slightly smaller.) Propose a diff against this CSS: http://orgmode.org/worg/style/worg.css adding text properties (like font-size, for example?) to a new .figure p {...} class. Thanks in advance! -- Bastien
Re: [O] Seeking advice on a worg contribution
On Tuesday, 6 May 2014 at 10:17, James Harkins wrote: [...] > Let's assume I'm an HTML idiot (which is true...). Is it really true, > according to [1], that the only way to add this CSS class definition > is to put it in a separate file and link it? It seems to be the only > *documented* method. No, you can put definitions in the org file directly as part of the HTML header, as in this example which changes the behaviour for the whole document body and how figures are presented: #+begin_src org ,#+HTML_HEAD: #+end_src You will be able to define the CSS for your code block caption in a similar way. eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.6-937-g60502a
Re: [O] Seeking advice on a worg contribution
James Harkins writes: >> The HTML code produced by the normal HTML export, which is what I assume >> Worg uses, has the captions as special label classes (org-src-name) so >> CSS could easily be defined if not there already. > > Let's assume I'm an HTML idiot (which is true...). Is it really true, > according to [1], that the only way to add this CSS class definition is to > put it in a separate file and link it? It seems to be the only *documented* > method. > > [1] http://orgmode.org/manual/CSS-support.html#CSS-support Hi, This is the bit of [1] that you were looking for: "You could also directly write a section in this way, without referring to an external file." Like this: #+HTML_HEAD: org-src-name {color: blue; } (I haven't gone back over the discussion to see what you want to do with captions, so coloring them blue is just an example.) You can also use multiple HTML_HEAD lines, e.g.: #+HTML_HEAD: #+HTML_HEAD: p {text-indent: 1em; line-height: 150%} #+HTML_HEAD: p.footnote {font-size: x-small} #+HTML_HEAD: ...but if you have more than a few of those, you *will* want to put them in a separate file and link them. Yours, Christian
Re: [O] Seeking advice on a worg contribution
On Tuesday, May 6, 2014 1:04:38 AM HKT, Eric S Fraga wrote: On Sunday, 4 May 2014 at 09:38, James Harkins wrote: I finally finished a draft (attached, and not carefully proofread yet) of a new worg page to outline what I had to do for a big Beamer publishing project. Interesting and very useful document. Thanks! Thanks for taking a look. H:3 is a good idea -- I've done that, and the result looks much better. The HTML code produced by the normal HTML export, which is what I assume Worg uses, has the captions as special label classes (org-src-name) so CSS could easily be defined if not there already. Let's assume I'm an HTML idiot (which is true...). Is it really true, according to [1], that the only way to add this CSS class definition is to put it in a separate file and link it? It seems to be the only *documented* method. I apologize if this is too basic a question... it's just, I've had a bunch of extra computer problems to solve lately and by now, I've pretty much hit the limit of web searching and teaching myself technologies that are new to me. It would be very helpful to me if someone could provide a for-dummies example of the least intrusive way to add one CSS class style. (Otherwise, sorry to say -- this is a relatively low priority task for me, so I will just submit the document as is and leave it for someone else to beautify.) Thanks, hjh [1] http://orgmode.org/manual/CSS-support.html#CSS-support
Re: [O] Seeking advice on a worg contribution
On Sunday, 4 May 2014 at 09:38, James Harkins wrote: > I finally finished a draft (attached, and not carefully proofread yet) > of a new worg page to outline what I had to do for a big Beamer > publishing project. Interesting and very useful document. Thanks! > Could somebody look it over and advise of any > formatting problems? I guess it should be basically OK; I copied the > standard worg header, and I stuck to normal org markup throughout. The only thing I would suggest is changing H:2 to H:3 as your 3rd level headings are being converted into bullet list items. > A specific formatting question: I have several source code blocks with > captions. The captions are formatted exactly the same as normal > paragraphs. Will worg use a different CSS style for captions? If not, > what do I have to do to make it do that? (At least, display the > captions slightly smaller.) The HTML code produced by the normal HTML export, which is what I assume Worg uses, has the captions as special label classes (org-src-name) so CSS could easily be defined if not there already. -- : Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.6-923-g233c11
[O] Seeking advice on a worg contribution
I finally finished a draft (attached, and not carefully proofread yet) of a new worg page to outline what I had to do for a big Beamer publishing project. Could somebody look it over and advise of any formatting problems? I guess it should be basically OK; I copied the standard worg header, and I stuck to normal org markup throughout. A specific formatting question: I have several source code blocks with captions. The captions are formatted exactly the same as normal paragraphs. Will worg use a different CSS style for captions? If not, what do I have to do to make it do that? (At least, display the captions slightly smaller.) Thanks, hjh#+TITLE: Using Beamer export to produce slideshows and article-style handouts from the same org source #+AUTHOR:James Harkins #+EMAIL: #+DATE: #+LANGUAGE: en #+OPTIONS: H:2 num:nil toc:t \n:nil ::t |:t ^:t -:t f:t *:t #+OPTIONS: tex:t d:(HIDE) tags:not-in-toc #+STARTUP: fold #+CATEGORY: worg * Project overview The project is training material for a one-week intensive workshop in audio synthesis and live-performance control in the SuperCollider programming language. The workshop was commissioned by CHEARS, the China ElectroAcoustic Resource Survey, and will be given first in Shenyang, PRC. I wanted to have thorough presentation slides available, for some kinds of explanation that are difficult otherwise, and also give a PDF book to workshop attendees for their future reference. During the writing process, the book became more important, as a way to provide copyright-free tutorials for translation into Chinese. The book eventually grew to 237 pages (with, admittedly, more white space per page than a standard prose layout), rendered from 10849 lines of LaTeX code, all of which were generated directly by the org Beamer exporter with no manual edits to any of the =tex= files. Achieving that required some ingenuity in both org mode and LaTeX. This worg page documents the project's design and implementation. * Requirements - One org source to produce slideshows and printed material. - Beamer export for both formats. - Normal /beamer/ document class for slides. - Document class /article/ for the book, with =\usepackage{beamerarticle}= in the preamble. - Header files to determine PDF layout. - Additional explanatory text that will be omitted from slideshows. - Use the beamer class option /ignorenonframetext/ for slides. - Put notes under frame-level headings, with the beamer tag =B_ignoreheading=. - Indexed glossaries of terms, classes and methods, without writing cumbersome LaTeX syntax for the glossaries package. - Keep glossary definitions in org tables. - Convert to LaTeX syntax using emacs-lisp source blocks. - Convert only once in the book combining all chapters, but once per slideshow. - Extract captioned source blocks into plain-text files for SuperCollider. - =org-element-map= did all the hard work. * Implementation ** One source: File structure The LaTeX preamble controls the output format; so, to have different output from the same org source, the preamble must be separate from the content. Here, we have two headers: - =slidehead.org=, which specifies the document class /beamer/ with the /presentation/ option. - =printhead2.org=, which specifies the /article/ class and adds the /beamerarticle/ package so that the article class can interpret beamer formatting commands. Other formatting differences are implemented here. For instance, inline code fragments are colored green in the slides, but remain black in the article. Header files contain nothing specific to any chapter, and content files are strictly content, no formatting definitions. Neither of these are exported directly. The export files provide the title and author fields, and include (=#+INCLUDE:=) the appropriate header and content files. They also include the glossary file; details to follow. #+name: slidehead #+caption: Primary export options for slideshow format. #+begin_src org ,#+startup: beamer ,#+LaTeX_CLASS: beamer ,#+LaTeX_CLASS_OPTIONS: [ignorenonframetext,presentation] ,#+BEAMER_THEME: default #+end_src #+name: printhead #+caption: Primary export options for article format. #+begin_src org ,#+startup: beamer ,#+LaTeX_CLASS: article ,#+LaTeX_CLASS_OPTIONS: [a4paper,twoside,11pt] ,#+BEAMER_THEME: default ,#+LATEX_HEADER: \usepackage{beamerarticle} #+end_src #+name: contents #+caption: Beginning of one of the contents files. #+begin_src org ,#+startup: beamer ,* Workshop introduction ,** Workshop introduction ,*** Workshop goals , Teach synthesis techniques by experimentation - SC lets us take apart synthesizer components, and put them back together. - SC's /Just-In-Time library/ makes it easy to re-patch components interactively. , Teach techniques for live control and performance - Control by graphic interfaces and e