aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-05-31Merge pull request #2954 from tarleb/org-export-blocksJohn MacFarlane3-121/+165
Org export blocks
2016-05-31brazilian -> brazil for polyglossia.John MacFarlane1-1/+3
Closes #2953.
2016-05-29Org reader: support new syntax for export blocksAlbert Krewinkel2-1/+24
Org-mode version 9 usees a new syntax for export blocks. Instead of `#+BEGIN_<FORMAT>`, where `<FORMAT>` is the format of the block's content, the new format uses `#+BEGIN_export <FORMAT>` instead. Both types are supported.
2016-05-29Org reader: refactor BEGIN…END block parsingAlbert Krewinkel1-111/+131
- Reorder functions, grouping related functions together. - Demote simple functions to local functions if they are used just once. - Rename and document functions to increase code readability. - Fix handling of whitespace in blocks, allowing content to be indented less then the block header.
2016-05-29Org reader: rename `parseInlines` to `inlines`Albert Krewinkel2-10/+11
Having a function starting with `parse` in a parsing library is overly redundant. Let's use a nicer, shorter name more in line with the rest of the library.
2016-05-27Org reader: support org-ref style citationsAlbert Krewinkel3-7/+107
The *org-ref* package is an org-mode extension commonly used to manage citations in org documents. Basic support for the `cite:citeKey` and `[[cite:citeKey][prefix text::suffix text]]` syntax is added.
2016-05-25Merge pull request #2946 from tarleb/org-modularizationJohn MacFarlane7-1629/+1939
Org-mode reader modularization
2016-05-25Org reader: extract blocks parser to moduleAlbert Krewinkel3-844/+901
Block parsing code is moved to a separate module. This is part of the Org-mode reader cleanup effort.
2016-05-25Org reader: extract inline parser to moduleAlbert Krewinkel5-756/+889
Inline parsing code is moved to a separate module. Parsers for block starts are extracted as well, as those are used in the `endline` parser. This is part of the Org-mode reader cleanup effort.
2016-05-25Org reader: extract parsing function to moduleAlbert Krewinkel4-78/+198
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.
2016-05-24Merge pull request #2942 from mb21/epub-readerJohn MacFarlane1-2/+4
EPUB Reader: normalise Link id as well
2016-05-24EPUB Reader: normalise Link id as wellmb211-2/+4
2016-05-23Updated changelog.John MacFarlane1-0/+194
2016-05-23RELEASE-CHECKLIST - hint for more useful git log.John MacFarlane1-0/+1
2016-05-23Merge pull request #2941 from tarleb/org-drawer-improvementsJohn MacFarlane5-50/+152
Org drawer improvements
2016-05-23Org writer: add drawer capabilityCarlos Sosa1-0/+11
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-23Org reader: respect drawer export settingAlbert Krewinkel3-13/+103
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-22Org reader/writer: use CUSTOM_ID in propertiesAlbert Krewinkel4-37/+38
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-22Bumped upper-bounds to build with ghc 8.John MacFarlane1-3/+3
2016-05-21HTML reader: fixed bug in pClose.John MacFarlane1-1/+1
This caused exponential parsing behavior in documnets with unclosed tags in dl, dd, dt.
2016-05-20Merge pull request #2934 from tarleb/org-properties-drawerJohn MacFarlane4-35/+184
Org properties drawer
2016-05-20Org writer: add :PROPERTIES: drawer supportAlbert Krewinkel2-2/+114
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-20Org reader: add :PROPERTIES: drawer supportAlbert Krewinkel2-33/+70
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-19Added pandoc-citeproc to stack-appveyor.yaml extra-deps.John MacFarlane1-0/+1
2016-05-19LaTeX template: support for custom font families.John MacFarlane1-7/+7
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-19Merge pull request #2927 from tarleb/org-attr-htmlJohn MacFarlane3-84/+117
Org reader support for ATTR_HTML statements
2016-05-19Org reader: add support for ATTR_HTML attributesAlbert Krewinkel2-7/+39
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-19Org reader: use custom `anyLine`Albert Krewinkel1-3/+10
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-19Org reader: refactor block attribute handlingAlbert Krewinkel2-83/+77
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-17EPUB reader: unescape URIs in spine.John MacFarlane1-2/+4
This should fix #2924. Testing on the epub that caused the problem originally would be welcome.
2016-05-17LaTeX writer: Don't escape underscore in labels.John MacFarlane1-1/+1
Previously they were escaped as ux5f. Closes #2921.
2016-05-16stack.yamls - make sure proper flags used for texmath, pandoc-citeproc.John MacFarlane4-0/+14
2016-05-12Revert "New method for checking for presence of tex program."John MacFarlane2-8/+3
This reverts commit 285bbf61cf2b21278792e48aee7c25fa0ee62faa.
2016-05-12Revert "Use shell instead of proc to check for latex program."John MacFarlane1-29/+7
This reverts commit ee45be5723ef6001ae333110ce45ae2f7b1b17af.
2016-05-12Revert "Require process >= 1.2.1."John MacFarlane2-4/+9
This reverts commit 07a4320ba97cdd219e5cbb18f21dbbda00bc5543.
2016-05-12Merge pull request #2919 from janschulz/masterJohn MacFarlane1-4/+6
Better way to find the artifacts on appveyor
2016-05-13Better way to find the artifacts on appveyorJan Schulz1-4/+6
2016-05-12appveyor - enable automatic builds, fix zip creation.John MacFarlane1-3/+4
2016-05-12Require process >= 1.2.1.John MacFarlane2-9/+4
We need `createProcess_` to be exported.
2016-05-12Merge pull request #2894 from sid-kap/rst-code-classJohn MacFarlane2-6/+37
Add class option for code block in RST reader
2016-05-11Merge pull request #2913 from jlduran/strut-minipage-tablesJohn MacFarlane2-74/+74
Retake on strut with \minipage inside tables
2016-05-11Merge pull request #2910 from janschulz/masterJohn MacFarlane2-12/+50
Add appveyor artefacts for pandoc.exe
2016-05-11Added some CSS to handle older versions of process.John MacFarlane1-1/+6
`createProcess_` is in Internals until process 1.2.1.
2016-05-11Use windows stack.yaml on appveyor to embedded the templatesJan Schulz2-13/+43
2016-05-11Use shell instead of proc to check for latex program.John MacFarlane1-7/+24
This should get .bat files on Windows. Closes #2903, with luck.
2016-05-11Merge pull request #2912 from tarleb/org-export-settingsJohn MacFarlane4-159/+327
Org reader: basic support for export settings
2016-05-11Org reader: parse but ignore export optionsAlbert Krewinkel1-2/+35
All known export options are parsed but ignored.
2016-05-11Org reader: add support for sub/superscript export optionsAlbert Krewinkel3-3/+63
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-11Org reader: move parser state into separate moduleAlbert Krewinkel3-158/+233
The org reader code has become large and confusing. Extracting smaller parts into submodules should help to clean things up.
2016-05-11Retake on strut with \minipage inside tablesJose Luis Duran2-74/+74
Reimplement on 4c684561ee0665b014e887ae559b7020e4e9f2d3 The problem with 4c68456 was a space between the cell contents and the `\strut` that affected the alignment.