Export: Interpret \par for HTML export.

"\par" will now be translated into "</p ><p >", so that this can be
used inside a footnote.
This commit is contained in:
Carsten Dominik 2009-01-25 13:31:37 +01:00
parent 4260aad09d
commit 3667772d15
3 changed files with 12 additions and 2 deletions

View File

@ -1378,8 +1378,9 @@ Org-mode supports the creation of footnotes. In contrast to the
larger document, not only for one-off documents like emails. The basic
syntax is similar to the one used by @file{footnote.el}, i.e. a footnote is
defined in a paragraph that is started by a footnote marker in square
brackets in column 0, no indentation allowed. The footnote reference is
simply the marker in square brackets, inside text. For example:
brackets in column 0, no indentation allowed. If you need a paragraph break
inside a footnote, use the LaTeX idiom @samp{\par}. The footnote reference
is simply the marker in square brackets, inside text. For example:
@example
The Org homepage[fn:1] now looks a lot better than it used to.

View File

@ -1,5 +1,7 @@
2009-01-25 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-export-as-html): Turn \par into a paragraph.
* org.el (org-agenda-tags-todo-honor-ignore-options): Declare
variable.

View File

@ -3884,6 +3884,13 @@ lang=\"%s\" xml:lang=\"%s\">
(org-export-preserve-breaks
(setq line (concat line "<br/>"))))
;; Check if a paragraph should be started
(while (and org-par-open
(string-match "\\\\par\\>" line))
;; Leave a space in the </p> so that the footnote matcher
;; does not see this.
(setq line (replace-match "</p ><p >" t t line)))
(insert line "\n")))))
;; Properly close all local lists and other lists