aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-01-13data/pandoc.lua: accept single block as singleton listAlbert Krewinkel2-23/+42
Every constructor which accepts a list of blocks now also accepts a single block element for convenience. Furthermore, strings are accepted as shorthand for `{pandoc.Str "text"}` in constructors.
2018-01-13MANUAL: recommend use of `raw_attribute` extension in header includes.John MacFarlane1-0/+11
See #4253.
2018-01-13LaTeX reader: allow macro definitions inside macros.John MacFarlane1-0/+8
Previously we went into an infinite loop with ``` \newcommand{\noop}[1]{#1} \noop{\newcommand{\foo}[1]{#1}} \foo{hi} ``` See #4253.
2018-01-13LaTeX reader: allow macro definitions inside macros.John MacFarlane1-6/+9
Previously we went into an infinite loop with ``` \newcommand{\noop}[1]{#1} \noop{\newcommand{\foo}[1]{#1}} \foo{hi} ``` See #4253.
2018-01-13Powerpoint writer: read presentation size from reference file.Jesse Rosenthal1-29/+45
Our presentation size is now dependent on the reference/template file we use. This will make it easier to set different output sizes by supplying different reference files. The alternative (allowing a user to explicitly set output size regardless of the template) will lead to too many thorny issues, as explicitly set sizes at the various level of powerpoint layout would have to be reset.
2018-01-13data/pandoc.lua: accept singleton inline as a listAlbert Krewinkel2-17/+36
Every constructor which accepts a list of inlines now also accepts a single inline element for convenience.
2018-01-13data/pandoc.lua: drop _VERSIONAlbert Krewinkel1-3/+0
Having a _VERSION became superfluous, as this module is closely tied to the pandoc version, which is available via PANDOC_VERSION.
2018-01-13Powerpoint writer: code cleanupJesse Rosenthal1-7/+0
Last commit accidentally left commented-out code in.
2018-01-13Powerpoint writer: Handle (sub)headers above slidelevel correctly.Jesse Rosenthal1-27/+29
Above the slidelevel, subheaders will be printed in bold and given a bit of extra space before them. Note that at the moment, no distinction is made between levels of headers above the slide header, though that can be changed. (It has to be changed in pandoc, since PowerPoint has no concept of paragraph or character classes.) This allows us to clean up the code as well: the code in `blockToParagraphs` since it will only touch content blocks, and therefore will not deal with headers at or below the slidelevel.
2018-01-13Powerpoint writer: Check for required filesJesse Rosenthal1-71/+30
Since we now import from reference/dist file by glob, we need to make sure that we're getting the files we need to make a non-corrupt Powerpoint. This performs that check. (In the process, this change also cleaned up a lot of commented-out code left from the switch to the new reference-doc method.)
2018-01-12Powerpoint writer: Improve templating using `--reference-doc`Jesse Rosenthal1-69/+145
Templating should work much more reliably now. There is still some problem with image placement when we change sizes. A further commit will address this.
2018-01-13Lua modules: add function pandoc.utils.run_json_filterAlbert Krewinkel3-4/+59
Runs a JSON filter on a Pandoc document.
2018-01-13Move filter functions to separate moduleAlbert Krewinkel6-96/+273
2018-01-12Lua filters: improve error messagesAlbert Krewinkel5-15/+45
Provide more context about the task which caused an error.
2018-01-12Powerpoint writer: Include Notes slide in TOCJesse Rosenthal1-19/+42
2018-01-12Lua filters: make PANDOC_READER_OPTIONS availableAlbert Krewinkel4-11/+63
The options which were used to read the document are made available to Lua filters via the `PANDOC_READER_OPTIONS` global.
2018-01-12Powerpoint writer: allow setting toc-title in metadata.Jesse Rosenthal2-161/+164
Accompanying change in MANUAL.txt
2018-01-12Move `metaValueToInlines` to T.P.W.SharedJesse Rosenthal2-11/+10
This will allow the Powerpoint writer to use it as well.
2018-01-12Powerpoint writer: Set notes slide header with slide-levelJesse Rosenthal1-1/+2
It used to be hardcoded to 2. This will set it to the appropriate slide-level.
2018-01-12Powerpoint writer: Add table of contentsJesse Rosenthal1-2/+33
This is triggered by the `--toc` flag. Note that in a long slide deck this risks overrunning the text box. The user can address this by setting `--toc-depth=1`.
2018-01-12Powerpoint writer: Set notes slide number correctlyJesse Rosenthal1-10/+8
Previously, this hadn't been aware of a metadata slide. We also clarify the logic for setting the startnumber of different slide sections correctly.
2018-01-12Powerpoint writer: Ignore internal links without targets.Jesse Rosenthal1-12/+31
If the user entered an internal link without a corresponding anchor, it would produce a corrupted file. Now we check the anchor map, and make sure the target is in the file. If it isn't, we ignore it.
2018-01-12Powerpoint writer: Clean up adding metadata slideJesse Rosenthal1-6/+8
We want to count the slide numbers correctly if it's in there.
2018-01-12Powerpoint writer: Add anchor linksJesse Rosenthal1-20/+47
For anchor-type links (`[foo](#bar)`) we produce an anchor link. In powerpoint these are links to slides, so we keep track of a map relating anchors to the slides they occur on.
2018-01-12Powerpoint writer: Make the slide number available to the blocks.Jesse Rosenthal1-2/+10
For anchors, block-processing functions need to know what slide number they're in. We make the envCurSlideId available to blocks.
2018-01-12Powerpoint writer: move curSlideId to environment.Jesse Rosenthal1-16/+16
It really isn't a moving state, and that can be misleading.
2018-01-11MANUAL.txt: clarify otherlangs in LaTeX.John MacFarlane1-14/+5
Closes #4072.
2018-01-10LaTeX reader: fix inconsistent column widths.John MacFarlane1-2/+2
This fixes a bug whereby column widths for the body were different from widths for the header in some tables. Closes #4238.
2018-01-10RST reader: better handling for headers with an anchor.John MacFarlane2-2/+45
Instead of creating a div containing the header, we put the id directly on the header. This way header promotion will work properly. Closes #4240.
2018-01-09Fixed a test case so it works on windows too.John MacFarlane1-1/+1
2018-01-09HTML writer: Fixed footnote backlinks with --id-prefix.John MacFarlane2-1/+13
Closes #4235.
2018-01-09Bump criterion upper bound.John MacFarlane1-1/+1
2018-01-09data/pandoc.lua: fix access to Attr componentsAlbert Krewinkel1-6/+4
Accessing an Attr value (e.g., ` Attr().classes`) was broken; the more common case of accessing it via an Inline or Block element was unaffected by this.
2018-01-09data/pandoc.lua: slightly de-complicate accessor codeAlbert Krewinkel1-20/+20
Change: minor
2018-01-08Allow tasty 1.0.John MacFarlane2-2/+3
2018-01-08data/pandoc.lua: cleanup code, remove cruftAlbert Krewinkel2-83/+92
2018-01-08MANUAL.txt update ICML linkmb211-1/+1
2018-01-07Fixed an item that went missing in changelog for 2.1.John MacFarlane1-0/+2
2018-01-07Added oltolm to AUTHORSJohn MacFarlane1-0/+1
2018-01-07More RELEASE_CHECKLIST tweaks.John MacFarlane1-2/+2
2018-01-07Update RELEASE_CHECKLIST.John MacFarlane1-3/+3
2018-01-07Update changelog and man page.John MacFarlane4-157/+317
2018-01-07Use latest skylighting and omit the 'missingincludes' check.John MacFarlane4-14/+5
If you use a custom syntax definition that refers to a syntax you haven't loaded, pandoc will now complain when it is highlighting the text, rather than at the start. This saves a huge performance hit from the `missingIncludes` check. Closes #4226.
2018-01-07data/pandoc.lua: fix docstringsAlbert Krewinkel2-9/+20
Change: minor
2018-01-07data/pandoc.lua: make Attr an AstElementAlbert Krewinkel1-9/+7
Attr is an AST element, which is now reflected in the type hierarchy.
2018-01-07data/pandoc.lua: drop 'pandoc-api-version' from Pandoc objectsAlbert Krewinkel1-4/+2
This attribute was out-of-sync with the actual version as is mostly irrelevant in the context Lua filters and custom writers. Use the global `PANDOC_API_VERSION` instead.
2018-01-07Lua: make pandoc-types version available as PANDOC_API_VERSIONAlbert Krewinkel2-1/+11
The current pandoc-types version is made available to Lua programs in the global PANDOC_API_VERSION. It contains the version as a list of numbers.
2018-01-07Lua: make pandoc version available as PANDOC_VERSIONAlbert Krewinkel2-13/+29
The current pandoc version is made available to Lua programs in the global PANDOC_VERSION. It contains the version as a list of numbers.
2018-01-07data/pandoc.lua: make all types subtypes of AstElementAlbert Krewinkel1-25/+28
*Pandoc*, *Meta*, and *Citation* were just plain functions and did not set a metatable on the returned value, which made it difficult to amend objects of these types with new behavior. They are now subtypes of AstElement, meaning that all their objects can gain new features when a method is added to the behavior object (e.g., `pandoc.Pandoc.behavior`).
2018-01-06data/pandoc.lua: split type and behavior tablesAlbert Krewinkel1-51/+83
Clearly distinguish between a type and the behavioral properties of an instance of that type. The behavior of a type (and all its subtypes) can now be amended by adding methods to that types `behavior` object, without exposing the type objects internals. E.g.: pandoc.Inline.behavior.frob = function () print'42' end local str = pandoc.Str'hello' str.frob() -- outputs '42'