0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-27 16:32:57 +00:00
Commit graph

239 commits

Author SHA1 Message Date
Carsten Dominik df07e0a4f3 Export: New hooks for preprocessing
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.
2008-12-31 18:37:33 +01:00
Carsten Dominik 70930f09ba Footnotes: Introduce STARTUP options for footnotes
New STARTUP options fninline and nofninline can be used to configure
the option `org-footnote-define-inline'.
2008-12-31 00:33:31 +01:00
Carsten Dominik 572caeb155 Footnotes: Allow validated XHTML with multiple references to one note
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.
2008-12-31 00:33:31 +01:00
Carsten Dominik 01def9d28e Footnotes: Make sure footnotes are normalized by the preprocessor
The preprocessor now calls `org-footnote-normalize' to collect
footnotes and to change all references into numeric.
2008-12-31 00:33:20 +01:00
Carsten Dominik 49f0a8d8b7 Coderefs: Insert links in export backends
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.
2008-12-26 23:23:39 +01:00
Carsten Dominik 88a78204c3 Coderefs: Implement line numbering and code references
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.
2008-12-26 23:23:31 +01:00
Carsten Dominik a4d72cbda5 Coderefs: Add a java script constant to HTML exported buffers
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.
2008-12-26 17:23:20 +01:00
Carsten Dominik 8915859c08 Version number back to 6.16trans. 2008-12-25 11:10:02 +01:00
Carsten Dominik 20f2f8e1e1 Release 6.16c 2008-12-25 11:06:35 +01:00
Carsten Dominik a8282e38c3 Version number: Pushed to 6.16trans. 2008-12-22 07:35:14 +01:00
Carsten Dominik f35b0549ec Release 6.16a 2008-12-21 12:47:50 +01:00
Carsten Dominik d89284b240 Release 6.16 2008-12-20 11:16:01 +01:00
Carsten Dominik c668817bf3 Revert "HTML export: Remove the name attribute from anchors that do not need it."
This reverts commit 642620ebb3.
2008-12-19 15:06:47 +01:00
Carsten Dominik 642620ebb3 HTML export: Remove the name attribute from anchors that do not need it. 2008-12-19 12:50:36 +01:00
Carsten Dominik 1b655ff4af Fix problem with <pre> of source code inside a paragraph. 2008-12-19 12:46:46 +01:00
Carsten Dominik db2485cb41 Fix invalid <img> tag. 2008-12-19 12:38:17 +01:00
Carsten Dominik 952c6b9901 Version number to 6.15trans. 2008-12-19 09:14:00 +01:00
Carsten Dominik 8ff0c60894 Release 6.15f 2008-12-18 23:38:53 +01:00
Carsten Dominik 2075b26a92 Pushing version number to 6.15trans. 2008-12-18 09:04:15 +01:00
Carsten Dominik ec702aa4ba Release 6.15d. 2008-12-17 11:52:55 +01:00
Carsten Dominik 181235f605 Release 6.15c. 2008-12-17 09:59:25 +01:00
Carsten Dominik 9029d93e3a Release 6.15b. 2008-12-17 09:18:32 +01:00
Carsten Dominik db6004ae1d Fix some additional typos. 2008-12-17 09:08:06 +01:00
Bernt Hansen cda33628ff Fix typos in org-exp.el 2008-12-16 12:10:50 -05:00
Bernt Hansen fb6a774f4a Whitespace 2008-12-16 12:10:47 -05:00
Carsten Dominik 96d9a2e467 Release 6.15a 2008-12-16 10:40:42 +01:00
Carsten Dominik 67a50839e9 Release 6.15 2008-12-16 08:30:55 +01:00
Carsten Dominik cf75cdb7f3 Fix bugs with new figure <div>. 2008-12-10 23:43:24 +01:00
Carsten Dominik c5ca477c38 Pushed version number to 6.14trans. 2008-12-10 23:34:16 +01:00
Carsten Dominik ac83bc01d7 Better implementation of unique entry IDs.
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).
2008-12-10 23:32:37 +01:00
Carsten Dominik b2ad719f51 Implement a new link type "id:" to link to entry ids. 2008-12-10 14:31:18 +01:00
Carsten Dominik 45102b68ce Captions and attributes for images and tables during export
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.
2008-12-10 12:50:07 +01:00
Carsten Dominik 0216c9a27c Fix minor problems with blockquote and verse HTML export.
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.
2008-12-07 21:16:14 +01:00
Carsten Dominik 7b6ad9054e Release 6.14. 2008-12-06 07:34:30 +01:00
Carsten Dominik 0e157c59ba 6.14pre01
Moving toward a release.
2008-12-05 14:55:58 +01:00
Carsten Dominik db782da26b Remove unnecessary whitespace. 2008-12-04 15:33:43 +01:00
Carsten Dominik 760c3ec098 Implement new quoting for CDATA elements.
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.
2008-12-03 23:55:10 +01:00
Carsten Dominik c7fc66edbe Document a function. 2008-12-03 09:33:24 +01:00
Carsten Dominik b266f5a90c Make LOCATION property inheritable for iCalendar export.
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.
2008-12-03 08:28:26 +01:00
Carsten Dominik aa07f68c12 Better handling of export options.
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.
2008-12-03 07:33:05 +01:00
Carsten Dominik c0a779bd9d Fix bug with handling of targets in ASCII export.
Target text used to disappear, now it is kept as it should be.
2008-11-26 07:32:10 +01:00
Carsten Dominik 825fdfa95e Change version number to 6.13trans. 2008-11-25 20:42:53 +01:00
Carsten Dominik eb48aaa7c1 Release 6.13a. 2008-11-24 12:22:56 +01:00
Carsten Dominik 06edd56942 Release 6.13 2008-11-23 08:10:04 +01:00
Carsten Dominik 5810f0a8c9 6.13pre05
Getting close.....
2008-11-22 10:25:55 +01:00
Carsten Dominik 33744b0de5 Allow one comment line before the first headline.
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.
2008-11-21 19:45:51 +01:00
Carsten Dominik db5c609be9 6.13pre04 2008-11-21 13:35:45 +01:00
Carsten Dominik 94e8fa7ca0 Remove "\\" during ASCII export.
"\\" 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.
2008-11-21 13:16:18 +01:00
Carsten Dominik 7d45c9f4bf 6.13p03 2008-11-21 07:18:35 +01:00
Carsten Dominik 81e3b95843 6.13pre02. 2008-11-20 15:02:53 +01:00