emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: another blog exporter
Date: Fri, 07 Feb 2014 18:35:03 +0100	[thread overview]
Message-ID: <87ob2i967s.fsf@gmx.us> (raw)
In-Reply-To: 52F5137D.2000003@roklein.de

Robert Klein <roklein@roklein.de> writes:

> Hi,
>
> around the org-mode 8.0 release I began to write a new blog exporter
> using the new export framework.
>
> I wanted one feature org2blog didn't offer, support for different syntax
> highlighters, and i wanted to learn about the new exporter and Emacs
> programming.
>
> Around Christmas I did some polishing to make it ready for a greater public.

Cool.

Could you provide an example blog so that we can see the output?

> ;;; Transcode Functions
>
> ;;;; Example Block
>
> (defun org-blog-example-block (example-block contents info)
>   "Transcode a EXAMPLE-BLOCK element from Org to HTML.
> CONTENTS is nil.  INFO is a plist holding contextual
> information."
>   (if (org-export-read-attribute :attr_html example-block :textarea)
>       (org-html--textarea-block example-block)
>     ;;; beginnin here we need org/wp-syntac/syntaxhl information!!!!
>     (format "<pre class=\"example\">\n%s</pre>"
> 	    (org-html-format-code example-block info))))

Isn't this an exact copy of the corresponding entry in ox-html (Less
the name)?  Why?

> ;;;; Latex Environment
>
> (defun org-blog-latex-environment (latex-environment contents info)
>   "Transcode a LATEX-ENVIRONMENT element from Org to HTML.
> CONTENTS is nil.  INFO is a plist holding contextual information."
>   (let ((processing-type (plist-get info :with-latex))
> 	(latex-frag (org-remove-indentation
> 		     (org-element-property :value latex-environment)))
> 	(attributes (org-combine-plists
>                      (org-export-read-attribute :attr_html latex-environment)
>                      (org-export-read-attribute :attr_blog latex-environment))))
>     (case processing-type
>       ((t mathjax)
>        (org-html-format-latex latex-frag 'mathjax info))
>       ((dvipng imagemagick)
>        (let ((formula-link
> 	      (org-html-format-latex latex-frag processing-type info)))
> 	 (when (and formula-link (string-match "file:\\([^]]*\\)" formula-link))
> 	   ;; Do not provide a caption or a name to be consistent with
> 	   ;; `mathjax' handling.
> 	   (org-html--wrap-image
> 	    (org-blog--format-image
> 	     (match-string 1 formula-link) attributes info) info))))
>       (t latex-frag))))

Same.  There seems to be a couple of these. . .

Rasmus

-- 
Don't panic!!!

  reply	other threads:[~2014-02-07 17:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-07 17:10 another blog exporter Robert Klein
2014-02-07 17:35 ` Rasmus [this message]
2014-02-07 19:17   ` Robert Klein
2014-02-08  0:27 ` Ken Mankoff
2014-02-08  8:40   ` Robert Klein
2014-02-08 20:41 ` Robert Klein
2014-02-09  7:55   ` Bastien
2014-02-09 14:25     ` Robert Klein
2014-02-10  8:48       ` Bastien
2014-02-10 11:30         ` Nicolas Goaziou
2014-03-04  9:51           ` Robert Klein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ob2i967s.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).