Age | Commit message (Collapse) | Author | Files | Lines |
|
The Org-mode reader uses many functions defined in the
`Text.Pandoc.Parsing` utility module. Some of the functions are
overwritten with versions adapted to Org-mode idiosyncrasies. These
special functions, as well as the normal Pandoc versions, are combined
in a single module to increase the ease of use.
This leads to decoupling of Org-mode and Pandoc and hence to slightly
cleaner code. The downside is code-bloat due to repeated import/export
statements.
|
|
|
|
For the implementation of the Drawer element in the Org Writer, we make
use of a generic Block container with attributes. The presence of a
`drawer` class defines that the `Div` constructor is a drawer. The first
class defines the drawer name to use. The key-value list in the
attributes defines the keys to add inside the Drawer. Lastly, the list
of Block elements contains miscellaneous blocks elements to add inside
of the Drawer.
Signed-off-by: Albert Krewinkel <albert@zeitkraut.de>
|
|
The `d` export option can be used to control which drawers are exported
and which are discarded. Basic support for this option is added here.
|
|
The `ID` property is reserved for internal use by Org-mode and should
not be used. The `CUSTOM_ID` property is to be used instead, it is
converted to the `ID` property for certain export format.
The reader and writer erroneously used `ID`. This is corrected by using
`CUSTOM_ID` where appropriate.
|
|
This caused exponential parsing behavior in documnets
with unclosed tags in dl, dd, dt.
|
|
This allows header attributes to be added to org documents in the form
of `:PROPERTIES:` drawers. All available attributes are stored as
key/value pairs. This reflects the way the org reader handles
`:PROPERTIES:` blocks.
This closes #1962.
|
|
Headers can have optional `:PROPERTIES:` drawers associated with them.
These drawers contain key/value pairs like the header's `id`. The
reader adds all listed pairs to the header's attributes; `id` and
`class` attributes are handled specially to match the way `Attr` are
defined.
This also changes behavior of how drawers of unknown type are handled.
Instead of including all unknown drawers, those are not read/exported,
thereby matching current Emacs behavior.
This closes #1877.
|
|
Org reader support for ATTR_HTML statements
|
|
Arbitrary key-value pairs can be added to some block types using a
`#+ATTR_HTML` line before the block. Emacs Org-mode only includes these
when exporting to HTML, but since we cannot make this distinction here,
the attributes are always added.
The functionality is now supported for figures.
This closes #1906.
|
|
Additional state changes need to be made after a newline is parsed,
otherwise markup may not be recognized correctly.
This fixes a bug where markup after certain block-types would not be
recognized. E.g. `/emph/` in the following snippet was not parsed as
emphasized.
foo
# comment
/emph/
|
|
A parser state attribute was used to keep track of block attributes
defined in meta-lines. Global state is undesirable, so block attributes
are no longer saved as part of the parser state. Old functions and the
respective part of the parser state are removed.
|
|
This should fix #2924.
Testing on the epub that caused the problem originally
would be welcome.
|
|
Previously they were escaped as ux5f.
Closes #2921.
|
|
Add class option for code block in RST reader
|
|
Retake on strut with \minipage inside tables
|
|
Org reader: basic support for export settings
|
|
All known export options are parsed but ignored.
|
|
Org-mode allows to specify export settings via `#+OPTIONS` lines.
Disabling simple sub- and superscripts is one of these export options,
this options is now supported.
|
|
The org reader code has become large and confusing. Extracting smaller
parts into submodules should help to clean things up.
|
|
Reimplement on 4c684561ee0665b014e887ae559b7020e4e9f2d3
The problem with 4c68456 was a space between the cell contents and the
`\strut` that affected the alignment.
|
|
|
|
Org fixes (reader and writer)
|
|
Empty table rows should not be dropped from the output, so row-height is
always set to be at least 1.
|
|
The last fix for whitespace handling of inline LaTeX commands was
incorrect, preventing correct recognition of inline LaTeX commands which
contain spaces. This fix ensures that only trailing whitespace is cut
off.
|
|
|
|
Org reader: table parsing code refactoring and fixes
|
|
The org-reader was droping space after unescaped LaTeX-style symbol
commands: `\ForAll \Auml` resulted in `∀Ä` but should give `∀ Ä`
instead. This seems to be because the LaTeX-reader treats the
command-terminating space as part of the command. Dropping the trailing
space from the symbol-command fixes this issue.
|
|
This fixes Org mode parsing of some corner cases regarding empty cells
and rows. Empty cells weren't parsed correctly, e.g. `|||` should be
two empty cells, but would be parsed as a single cell containing a pipe
character. Empty rows where parsed as alignment rows and dropped from
the output.
This fixes #2616.
|
|
This refactores the codes conversing a list table lines to an org table
ADT. The old code was simplified and is now slightly less ugly.
|
|
Emacs Org-mode doesn't add any padding to table rows. The first
row (header or first body row) is used to determine the column count, no
other magic is performed.
The org reader was padding rows to the length of the longest table row.
This was done due to a misunderstanding of how Org handles tables. This
feature reflected how Org-mode handles tables when pressing <TAB>. The
Org exporter however, which is what the reader should implement, doesn't
do any of this. So this was a mis-feature that made the reader more
complex and reduced comparability. It was hence removed.
|
|
Docbook5 write support
|
|
According to http://docutils.sourceforge.net/docs/ref/rst/directives.html#code,
the code directive supports the ":class:" option.
|
|
Commit 91dc3342 made `readDocx` throw PandocError if there was an
unarchiving error. This extends that fix to `readOdt` and `readEPUB`.
|
|
Closes #2892.
|
|
Previously, readDocx would error out if zip-archive failed. We change
the archive extraction step from `toArchive` to `toArchiveOrFail`, which
returns an Either value.
|
|
|
|
|
|
Previously if a document only had math in a footnote,
the MathJax link would not be added.
Closes #2881.
|
|
|
|
This reverts commit 4c684561ee0665b014e887ae559b7020e4e9f2d3.
See
https://groups.google.com/d/msg/pandoc-discuss/u6J-_aCProU/UufN3IYRAgAJ
This should fix uneven spacing issues in multiline tables.
|
|
LaTeX Writer: fix polyglossia to babel env mapping
|
|
LaTeX writer: Add missing languages.
|
|
Ignore leading space in org code blocks
|
|
Closes #2843.
|
|
Fixes #2862
Also fix up tab handling for leading whitespace in code blocks.
|
|
`moveTo` and `moveFrom` are track-changes tags that are used when a
block of text is moved in the document. We now recognize these tags and
treat them the same as `insert` and `delete`, respectively. So,
`--track-changes=accept` will show the moved version, while
`--track-changes=reject` will show the original version.
|
|
Closes #2799.
Also added -s to markdown-reader-more test.
|
|
We are now more forgiving about parsing invalid HTML with
unescaped `&` as raw HTML. (Previously any unescaped `&`
would cause pandoc not to recognize the string as raw HTML.)
Closes #2410.
|
|
Updates the list from the hyphenation files at <http://mirror.ctan.org/language/hyph-utf8/tex/generic/hyph-utf8/loadhyph/>.
|