uuidgen ids may start with a number and therefore are not valid names
in HTML. Therefore we now use and "ID-" prefix for such IDs when
exporting to HTML.
Before, the bibliography will exist inside the outline structure, as
part of the last section. This commit adds code to find it, cut it
out, and move it to a better location.
Links with description not create a note before the next headline that
contains the link. In the text, the description will be shown.
The new variable `org-export-ascii-links-to-notes' can be configured
to turn off this behavior, then the reference will be inserted inline
in the text. If the line becomes too long because of this, it will
be wrapped.
A line: #+MARCO: name replacement text
can be referenced by {{{name}}}. As special cases, {{{title}}} will
reference #+TITLE, and similar with similar lines.
Like TODO keywords before, now also tags each get their own CSS class,
given by the tag itself. Invalid characters in tags are all replaced
by "_" to make sure the resulting HTML remains valid.
Two new variables can be used to add a prefix to the class names for
TODO keywords and tags.
Clock lines are now by default captured into the drawer LOGBOOK. This
means that, if state notes are also captured into a drawer, they will
be mixed with notes.
Wanrong Lin writes:
Right now in the HTML export the TODO keywords have either
class="todo", or class="done". That loses all the face properties
in the original TODO keywords. I think the TODO keywords faces are
important visual aids to differentiate different types of TODO
items, so I just wonder whether it is possible to keep the faces
in the HTML.
This makes sense. This commit adds, to each TODO keyword, an
additional class named after the keyword. For example:
<span class="todo WAITING">WAITING</span>
So each todo keyword gets class "todo" or "done" depending on which
general type it is. And in addition it gets itself as class.
So go to your CSS file and configure like this:
.todo { font-weight:bold; }
.done { font-weight:bold; }
.TODO { color:red; }
.WAITING { color:orange; }
.DONE { color:green; }
Thanks to Sebastian Rose for the multiple-classes trick.
William Henney writes:
Consider a structure like this:
* first
** second
*** third
**** fourth
Currently, if I export the "third" sub-tree to html (via "C-c @
C-x C-e h"), then "third" becomes an <h1> heading, but "fourth"
becomes an <h5> heading. I would rather it were <h2>, i.e. that
all heading levels be relative to the root of the sub-tree. Is
there any way to achieve this?
This was not possible so far, but this commit measures the first
headline of the subtree and applies an offset to all level values.
The id for the footnotes div is now called "text-footnotes", not
"footnotes-text", to be more consistent with other divs used in
Org-mode.
Requested by Sebastian Rose.
There were two bugs:
1. Timestamp processing did not honor the setting of
`org-export-with-timestamps' in the text before the first
headline.
2. When `org-export-with-timestamps' was nil, time stamps were removed
even in tables. I think this is incorrect, so in tables, time
stamps are now never removed.
Two new variables, `org-export-html-inline-image-extensions' and
`org-export-latex-inline-image-extensions' now define the file
extensions that will be considered for inlining images. The default
for HTML is png, jpg, jpeg, and gif files. The default for LaTeX is
png, jpg, jpeg, and pdf, assuming processing with `pdflatex'.
For LaTeX export, this can lead to conflicts for links that point
to non-image PDF files. To avoid that such a link will be inlined by
accident, always give a description text for such a link, one that is
not equal to the path.
The special first column in some tables was not removed for LaTeX
export. This bug was probably introduces recently, while trying to
fix problems with special characters in LaTeX tables.
Export is now working again properly.
Reported by Giovanni Ridolfi.
The end of the last line of a colon example is not protected, and this
caused the time stamp removal protection to fail if a time stamp was
the last thing in such an example.
Lines preceded by a colon are treated as fixed-width examples.
This commit improves the moment when the protection of these lines
happens during preprocessing. And it enforces that a space must
follow the colon for the line to be treated in this way.
1. Export hangs during LaTeX export. That was a bug using an empty
regular expression that was defined only locally in Org files, but
not in the buffer used by the LaTeX exporter.
2. Underscores in links can get special treatment by the LaTeX
exporter. Now the link is protected from this.
When including s file in example or src markup, you can now also
specify the switches for code references and line numbering that work
also when directly adding SRC or EXAMPLE blocks.
Reported by Manish.
This commit removes some of the stuff that was specific for the LaTeX
exporter, and falls back to the default configuration that works for
all backends.
Here is what the commit does:
- The variable `org-export-latex-remove-from-headlines' is now
obsolete. Instead, also LaTeX export now responds to the settings
in the variables org-export-with-todo-keywords',
`org-export-with-priority', and `org-export-with-tags' and in the
corresponding OPTION settings.
- Removal of time stamps and related keywords now already happens in
the preprocessor, so that it will be perfectly the same for all
backends.
- The list functions have been extended to accept an additional
parameter list, to overrule the default setting for a particular
list function. This is used to make the checkbox appearance in
LaTeX configurable, through the new variable
`org-export-latex-list-parameters'.
This patch introduces more hooks for preprocessing the export buffer,
at various strategic moments. See the Changes.org file for a
description of the hooks.
Org-mode allows multiple references to the same footnote. However,
the HTML exporter cannot use the same name for all these references,
because names have to be unique. This patch appends numbers to
footnote reference names, to make sure they remain unique.
The dark side of this patch means that from the footnote definition,
there is only a single link, to the first reference of the note.
However, in a browser you can always press BACK to go back after
jumping to a footnote definition.
This patch covers the three main backends, html, latex, and ascii. It
adds the code to make sure the coderef links identified by the
preprocessing will be implemented correctly when a backend does its work.
This patch covers the much of the new line numbering and code line
referencing.
We introduce a new function with the longish name
`org-export-replace-src-segments-and-examples'. It is an extension of
the earlier `org-export-replace-src-segments'. It now also covers
EXAMPLE blocks, not only source code blocks. This was necessary to
allow line numbering also in EXAMPLE blocks.
Both clock types now accept a string with options which will be given
in the BEGIN line. Options currently recognized are -n, +n, and -r.
A bit unsatisfactory about this patch may be that LaTeX-specific code
is now defined in org-exp.el, maybe eventually we want to think of a
way to move this code back to org-export-latex.el. Really, all it
does is adding line numbers and wrapping them into a verbatim
environment.
Besides adding line numbers in a backend specific way, this patch also
adds code to search or special cookies in source code, like "((1))" or
"((name))". These are labels that can be addressed by links as
references to specific line in source code.
This patch adds a new constant with javascript functions. Each
exported HTML file will contain these definitions. Also, we add to
the default export CSS style a new class, code-highlighted, which will
be used to highlight lines in code whenever the mouse overs over a
link to this line.
Unique identifiers for entries can now be used more efficiently.
Internally, a hash array has replaced the alist used so far to
keep track of the files in which an ID is defined. This makes it
quite fast to find an entry by ID.
There is now a new link type which looks like this:
id:GLOBALLY-UNIQUE-IDENTIFIER
This link points to a specific entry. When you move the entry to
a different file, for example if you move it to an archive
file, this link will continue to work.
The file /org-id.el/ contains an API that can be used to write
code using these identifiers, including creating IDs and finding
them wherever they are.
Org has its own method to create unique identifiers, but if the
system has /uuidgen/ command installed (Mac's and Linux systems
generally do), it will be used by default. You an also select
the method by hand, using the variable =org-id-method=.
If the ID system ever gets confused about where a certain ID is,
it initiates a global scan of all agenda files with associated
archives, all files previously known containing any IDs, and all
currently visited Org-mode files to rebuild the hash. You can
also initiate this by hand: =M-x org-id-update-id-locations=.
Running this command will also dump into the =*Messages*= buffer
information about any duplicate IDs. These should not exist, but
if you /copy/ an entry with its properties, duplicate IDs will
inevitably be produced. This is unavoidable in a plain text
system that allows you to edit the text in arbitrary ways, and a
portion of care on your side is needed to keep this system clean.
The hash is stored in the file =~/.emacs.d/.org-id-locations=.
This is also a change from previous versions where the file was
=~/.org=id-locations=. Therefore, you can remove this old file
if you have it. I am not sure what will happen if the =.emacs.d=
directory does not exists in your setup, but in modern Emacsen, I
believe it should exist. If you do not want to use IDs across
files, you can avoid the overhead with tracking IDs by
customizing the variable =org-id-track-globally=. IDs can then
still be used for links inside a single file.
IDs will also be used when you create a new link to an Org-mode
buffer. If you use =org-store-link= (normally at =C-c l=) inside
en entry in an Org-mode buffer, and ID property will be created
if it does not exist, and the stored link will be an =id:= link.
If you prefer the much less secure linking to headline text, you
can configure the variable =org-link-to-org-use-id=. The default
setting for this variable is =create-if-interactive=, meaning
that an ID will be created when you store a link interactively,
but not if you happen to be in an Org-mode file while you create
a remember note (which usually has a link to the place where you
were when starting remember).
Tables, and Hyperlinks that represent inlined images, can now be
equipped with additional information that will be used during
export. The information will be taken from the following special
lines in the buffer and apply to the first following table or
link.
- #+CAPTION: :: The caption of the image or table. This string
should be processed according to the export backend, but
this is not yet done.
- #+LABEL: :: A label to identify the figure/table for cross
references. For HTML export, this string will become the
ID for the `<div class="figure">' element that encapsulates
the image tag and the caption. For LaTeX export, this
string will be used as the argument of a `\label{...}'
macro. These lables will be available for internal links
like `[[label][Table] ]'.
- #+ATTR_HTML: :: Attributes for HTML export of image, to be
added as attributes into the `<img...>' tag. This string
will not be processed, so it should have immediately the
right format.
- #+ATTR_LaTeX: :: Attributes for LaTeX export of images, to
be inserted into the optional argument of the
`\includegraphics[...]{file}' command, to specify scaling,
clipping and other options. This string will not be
processed, so it should have immediately the right
format, like `width=5cm,angle=90'
For LaTeX export, if either a caption or a label is given, the
element will be exported as a float, i.e. wrapped into a figure
or table environment.
Xerxes Folupa writes:
> I spotted a little inconsistency in the way Org strips tags when
> processing #+begin_verse ... #+end_verse, and #+begin_quote
> ... #+end_quote blocks, compared with other literal blocks that strip
> superfluous <p> tags correctly (e.g. #+html)
[...]
> Additional question: is the space before the <br/> in verse blocks a
> design decision?
This patch fixes these issues.
It seems that CSS and Java-script stuff should be quoted in a very
strange way in order to make sure that the resulting file functions
correct in current browsers *and* validates against various XHTML and
XML standards. To be honest, the quoting technique seem really
strange, but Sebastian Rose argues, that this is the way to handle
this issue.
Harri Kiiskinen suggested that it might be useful to make the LOCATION
property an inherited property during iCalendar export. In this way
you can have set the LOCATION for a whole set of items by setting it
only in the parent.
While this will slow down iCalendar export for large files, I think it
can be quite useful. This patch does implement the basic code needed
for this functionality. However, you still need to tell Org that
LOCATION should be inherited, by setting org-use-property-inheritance.
If you set it to t, beware that this may trigger a significant
slowdown when creating the match view in the agenda. So it may be
better to set this variable to
(setq org-use-property-inheritance '("LOCATION"))
instead.
This patch improves the internal handling of the large number of
export options that Org-mode has. In particular, it now defines a
single constant, `org-export-plist-vars' that contains the full list
of options, and how these can be accessed through variables, and
through the #+OPTIONS line. Before the patch, there used to be a
separate list or the OPTIONS handling, which has gotten out of sync.
This now no longer can happen.
Also, this patch adds two new variables, `org-export-with-priority',
and `org-export-with-todo-keywords', which can be used to turn the
export of TODO keywords and priority cookies on and off, so that these
can simply disappear and not be shown in the exported file. In fact,
the default for the priority cookie is to remove it.
When the export skips the text before the first headline, we now
include the comment line before the first headline, if any.
This makes sure that we can specify an anchor for this headline.
"\\" at the end of a line marks forces line breaks for HTML and LaTeX
export. ASCII export does preserve lines anyway, but these line break
indicators might still be present and need to be removed.
Reported by Rustom Mody.
A link to an image can function as the description part of a link, to
create a clickable image. The corresponding image tag was
erroneously processed like normal text. This patch protects such
descriptions from processing.
Reported by Richard Riley.
Org allows to define invisible anchors in a document in comment lines
like
If such a line is directly before or after a headline, previously this
anchor was removed, and all references to it were replaced with
references to the anchor that the headline had anyway.
Matthew Lundin pointed out that this makes it impossible to have
permanent links to headlines that can also be used from outside the
current page.
This patch changes his situation by adding the additional targets as
empty anchors to the section heading. If works by creating, during
preprocessing, an alist with targets that do have aliases. During
publishing, these aliases are looked up and converted into anchors.
In LaTeX export, these additional targets become additional labels.