Commit graph

7029 commits

Author SHA1 Message Date
John MacFarlane
cc937eea2f Merge pull request #2942 from mb21/epub-reader
EPUB Reader: normalise Link id as well
2016-05-24 11:49:25 -07:00
mb21
340f0aaef8 EPUB Reader: normalise Link id as well 2016-05-24 17:42:37 +02:00
John MacFarlane
bfb18df27e Updated changelog. 2016-05-23 13:38:49 -07:00
John MacFarlane
8466477047 RELEASE-CHECKLIST - hint for more useful git log. 2016-05-23 13:23:13 -07:00
John MacFarlane
654bdf72bf Merge pull request #2941 from tarleb/org-drawer-improvements
Org drawer improvements
2016-05-23 10:39:08 -07:00
Carlos Sosa
5667e0959a Org writer: add drawer capability
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>
2016-05-23 10:00:14 +02:00
Albert Krewinkel
a4717c2fc5 Org reader: respect drawer export setting
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.
2016-05-23 09:44:37 +02:00
Albert Krewinkel
f3d27e4c80 Org reader/writer: use CUSTOM_ID in properties
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.
2016-05-22 23:01:47 +02:00
John MacFarlane
e3ca9793aa Bumped upper-bounds to build with ghc 8. 2016-05-22 09:21:49 -07:00
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