Commit graph

7020 commits

Author SHA1 Message Date
John MacFarlane
446cf6a1cf HTML reader: fixed bug in pClose.
This caused exponential parsing behavior in documnets
with unclosed tags in dl, dd, dt.
2016-05-21 23:05:00 -07:00
John MacFarlane
2e266b6a3a Merge pull request #2934 from tarleb/org-properties-drawer
Org properties drawer
2016-05-20 10:38:32 -07:00
Albert Krewinkel
cd3282b08d Org writer: add :PROPERTIES: drawer support
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.
2016-05-20 17:01:50 +02:00
Albert Krewinkel
68d388f833 Org reader: add :PROPERTIES: drawer support
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.
2016-05-20 17:01:26 +02:00
John MacFarlane
0160e85017 Added pandoc-citeproc to stack-appveyor.yaml extra-deps. 2016-05-19 13:09:50 -07:00
John MacFarlane
8cce668713 LaTeX template: support for custom font families.
Needed for correct polyglossia operation with Cyrillic fonts and perhaps
can find some other usages.  Example usage in YAML metadata:

```
fontfamilies:
- name: \cyrillicfont
  font: Liberation Serif
- name: \cyrillicfonttt
  options: Scale=MatchLowercase
  font: Liberation
```

(vladipus)
2016-05-19 11:11:00 -07:00
John MacFarlane
0958f2f5d0 Merge pull request #2927 from tarleb/org-attr-html
Org reader support for ATTR_HTML statements
2016-05-19 10:44:11 -07:00
Albert Krewinkel
16e233475a Org reader: add support for ATTR_HTML attributes
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.
2016-05-19 09:55:12 +02:00
Albert Krewinkel
26e8d98be2 Org reader: use custom anyLine
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/
2016-05-19 09:35:47 +02:00
Albert Krewinkel
1dda535378 Org reader: refactor block attribute handling
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.
2016-05-19 09:33:51 +02:00
John MacFarlane
847167804a EPUB reader: unescape URIs in spine.
This should fix #2924.

Testing on the epub that caused the problem originally
would be welcome.
2016-05-17 09:38:52 -07:00
John MacFarlane
7be30a40f1 LaTeX writer: Don't escape underscore in labels.
Previously they were escaped as ux5f.

Closes #2921.
2016-05-17 09:18:52 -07:00
John MacFarlane
ad669e486e stack.yamls - make sure proper flags used for texmath, pandoc-citeproc. 2016-05-16 20:50:08 -07:00
John MacFarlane
054e6abd0d Revert "New method for checking for presence of tex program."
This reverts commit 285bbf61cf.
2016-05-12 21:01:30 -07:00
John MacFarlane
5d8d8b0de1 Revert "Use shell instead of proc to check for latex program."
This reverts commit ee45be5723.
2016-05-12 21:00:33 -07:00
John MacFarlane
1b8d006ac8 Revert "Require process >= 1.2.1."
This reverts commit 07a4320ba9.
2016-05-12 20:59:08 -07:00
John MacFarlane
f3039d3af9 Merge pull request #2919 from janschulz/master
Better way to find the artifacts on appveyor
2016-05-12 17:41:43 -07:00
Jan Schulz
92fad7be01 Better way to find the artifacts on appveyor 2016-05-13 01:33:16 +02:00
John MacFarlane
dd649f19a9 appveyor - enable automatic builds, fix zip creation. 2016-05-12 11:48:40 -07:00
John MacFarlane
07a4320ba9 Require process >= 1.2.1.
We need `createProcess_` to be exported.
2016-05-12 11:08:56 -07:00
John MacFarlane
344412cba8 Merge pull request #2894 from sid-kap/rst-code-class
Add class option for code block in RST reader
2016-05-12 00:03:14 -07:00
John MacFarlane
609fb33302 Merge pull request #2913 from jlduran/strut-minipage-tables
Retake on strut with \minipage inside tables
2016-05-11 23:57:47 -07:00
John MacFarlane
803ba92198 Merge pull request #2910 from janschulz/master
Add appveyor artefacts for pandoc.exe
2016-05-11 23:56:16 -07:00
John MacFarlane
1ddc71e01e Added some CSS to handle older versions of process.
`createProcess_` is in Internals until process 1.2.1.
2016-05-11 17:43:47 -07:00
Jan Schulz
7590d19445 Use windows stack.yaml on appveyor to embedded the templates 2016-05-11 23:51:26 +02:00
John MacFarlane
ee45be5723 Use shell instead of proc to check for latex program.
This should get .bat files on Windows.  Closes #2903, with luck.
2016-05-11 14:01:18 -07:00
John MacFarlane
3800cb3d42 Merge pull request #2912 from tarleb/org-export-settings
Org reader: basic support for export settings
2016-05-11 13:36:02 -07:00
Albert Krewinkel
be5cccf248 Org reader: parse but ignore export options
All known export options are parsed but ignored.
2016-05-11 19:13:43 +02:00
Albert Krewinkel
76143de97e Org reader: add support for sub/superscript export options
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.
2016-05-11 19:13:43 +02:00
Albert Krewinkel
7a0729ea09 Org reader: move parser state into separate module
The org reader code has become large and confusing.  Extracting smaller
parts into submodules should help to clean things up.
2016-05-11 19:13:42 +02:00
Jose Luis Duran
ec2fc30288 Retake on strut with \minipage inside tables
Reimplement on 4c684561ee

The problem with 4c68456 was a space between the cell contents and the
`\strut` that affected the alignment.
2016-05-11 14:02:09 -03:00
Jan Schulz
9a2be80722 Add appveyor artefacts for pandoc.exe 2016-05-10 23:14:05 +02:00
John MacFarlane
02993c2cc7 Made detection of latex program more robust.
Catch not-found error.
Improves on 285bbf61cf to fix #2903.
2016-05-10 09:29:11 -07:00
John MacFarlane
285bbf61cf New method for checking for presence of tex program.
Now instead of using `findExecutable`, which has limitations
on Windows, we just do `progname --version` and see if it
returns successfully.  Closes #2903.
2016-05-09 20:52:20 -07:00
John MacFarlane
efd02db689 Merge pull request #2908 from ickc/master
Use the full MathJax configuration to maximize loading speed
2016-05-09 20:19:41 -07:00
KolenCheung
59ddbdee4f Loading the full MathJax config to maximize loading speed 2016-05-09 19:49:09 -07:00
ickc
0ae60a9153 Merge pull request #1 from jgm/master
Merge from jgm's master
2016-05-09 19:24:40 -07:00
John MacFarlane
f7601297f0 Avoid lazy foldl in LaTeX writer. 2016-05-09 18:25:57 -07:00
John MacFarlane
e08c26c777 Change default mathjax setup to use TeX-AMS_CHTML configuration.
This is designed for cases where the input is always TeX and maximal
conformity with TeX is desired.

It seems to be smaller and load faster than what we used before.
See #2858.
2016-05-09 13:40:13 -07:00
John MacFarlane
2571328700 Use new CommonHTML output for MathJax (updated default MathJax URL).
Closes #2858.
2016-05-09 13:29:35 -07:00
John MacFarlane
888a273c1b README: clarified documentation of implicit_header_references.
Closes #2904.
2016-05-09 13:04:12 -07:00
John MacFarlane
fd9ec835ec Merge pull request #2907 from tarleb/org-fixes
Org fixes (reader and writer)
2016-05-09 10:17:56 -07:00
Albert Krewinkel
d32878b84b Org writer: print empty table rows
Empty table rows should not be dropped from the output, so row-height is
always set to be at least 1.
2016-05-09 19:06:24 +02:00
Albert Krewinkel
10a809f126 Org reader: fix inline-LaTeX regression
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.
2016-05-09 19:06:04 +02:00
John MacFarlane
c1b19b17c4 Merge pull request #2906 from roblabla/feature-mediaWikiTableHeaderSpaces
Allow spaces before '!' in MediaWiki table header
2016-05-09 09:37:12 -07:00
roblabla
acd492c7f4 Allow spaces before '!' in MediaWiki table header 2016-05-09 17:54:40 +02:00
John MacFarlane
21d1a3b57c Merge pull request #2898 from tarleb/org-table-refactoring
Org reader: table parsing code refactoring and fixes
2016-05-05 16:22:56 -07:00
John MacFarlane
f7a5c17a63 Merge pull request #2900 from tarleb/org-symbol-fix
Org reader: fix spacing after LaTeX-style symbols
2016-05-05 13:20:09 -07:00
Albert Krewinkel
405c3e9c36 Org reader: fix spacing after LaTeX-style symbols
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.
2016-05-04 23:16:23 +02:00
Albert Krewinkel
2d825603c6 Org reader: fix handling of empty table cells, rows
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.
2016-05-04 16:02:03 +02:00