aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)AuthorFilesLines
2018-01-05Update copyright notices to include 2018Albert Krewinkel91-187/+187
2018-01-05data/pandoc.lua: fix attribute names of CitationAlbert Krewinkel1-6/+6
The fields were named like the Haskell fields, not like the documented, shorter version. The names are changed to match the documentation and Citations are given a shared metatable to enable simple extensibility. Fixes: #4222
2018-01-04Use hslua utils where possibleAlbert Krewinkel4-33/+16
Some helper functions and types have been moved to hslua. Change: minor
2018-01-04Powerpoint writer: remove some code duplication.Jesse Rosenthal1-10/+3
2018-01-03Powerpoint writer: Ignore Notes divJesse Rosenthal1-0/+1
For now, ignore notes div for parity with other slide outputs.
2018-01-03Powerpoint writer: Set default slidelevel correctly.Jesse Rosenthal1-1/+2
We had previously defaulted to slideLevel 2. Now we use the correct behavior of defaulting to the highest level header followed by content. We change an expected test result to match this behavior.
2018-01-03Powerpoint writer: Split blocks correctly for linked imagesJesse Rosenthal1-10/+15
We treat links with an image as the first inline as an image with a link picProp -- so we have to split on it the same as if it were an image.
2018-01-03Powerpoint writer: combine adjacent runs.Jesse Rosenthal1-2/+19
This will make the xml easier to read for debugging purposes. It should also make links behave more consistently across numerous words.
2018-01-03Powerpoint writer: Fix new replaceNamedChildrenJesse Rosenthal1-11/+9
Previous version replaced *each* element from the template with the new elements -- leading to multiple overlapping frames. This only replaces the first instance, and throws out the rest.
2018-01-03PowerPoint writer: make inline code inherit code size.Jesse Rosenthal1-6/+6
Previously (a) the code size wasn't set when we force size, and (b) the properties was set from the default, instead of inheriting. Both of those problems were fixed.
2018-01-03Powerpoint writer: simplify replaceNamedChildren functionJesse Rosenthal1-9/+17
A lot of work in the powerpoint writer is replacing XML from within slidelayouts from templates. This function does a good deal of that work, and this makes it preserve element order, as well as making it a bit easier to understand.
2018-01-03Powerpoint writer: code cleanupJesse Rosenthal1-103/+0
Remove commented-out functions and imports.
2018-01-03Powerpoint writer: Allow linked images.Jesse Rosenthal1-11/+32
The following markdown: [![Image Title](image.jpg)](http://www.example.com) will now produce a linked image in the resulting PowerPoint file.
2018-01-03PowerPoint writer: Fix error with empty table cell.Jesse Rosenthal1-6/+10
We require an empty "<a:p>" tag, even if the cell contains no paragraphs -- otherwise PowerPoint complains of corruption.
2018-01-03Powerpoint writer: Fix compiler error (again)Jesse Rosenthal1-3/+3
The record syntax in a pattern match seems to be confusing the 8.X compilers. Stop using it.
2018-01-03Powerpoint writer: Appease compilerJesse Rosenthal1-8/+11
2018-01-03Powerpoint writer: Implement two-column slides.Jesse Rosenthal1-12/+95
This uses the columns/column div format described in the pandoc manual. At the moment, only two columns (half the screen each) are allowed. Custom widths are not supported.
2018-01-02Merge pull request #4219 from stalmon/masterJohn MacFarlane1-4/+2
fixes for docx writer
2018-01-02Docx reader: remove MultiWayIfJesse Rosenthal1-38/+39
Different formatting rules across 7.X and 8.X. Use empty case expression instead.
2018-01-02Docx reader: Allow for insertion/deletion of paragraphs.Jesse Rosenthal1-4/+44
If the paragraph has a deleted or inserted paragraph break (depending on the track-changes setting) we hold onto it until the next paragraph. This takes care of accept and reject. For this we introduce a new state which holds the ils from the previous para if necessary. For `--track-changes=all`, we add an empty span with class `paragraph-insertion`/`paragraph-deletion` at the end of the paragraph prior to the break to be inserted or deleted. Closes #3927.
2018-01-02Docx reader: Parse track changes info into paragraph props.Jesse Rosenthal1-15/+27
This will tell us whether a paragraph break was inserted or deleted. We add a generalized track-changes parsing function, and use it in `elemToParPart` as well.
2018-01-02Docx reader: Extract tracked changes type from parpart.Jesse Rosenthal2-6/+19
We're going to want to use it elsewhere as well, in upcoming tracking of paragraph insertion/deletion.
2018-01-02firstRow table definition compatibility for Word 2016Sebastian Talmon1-1/+1
Word 2016 seems to use a default value of "1" for table headers, if there is no firstRow definition (although a default value of 0 is documented), so all tables get the first Row formatted as header. Setting the parameter to 0 if the table has no header row fixes this for Word 2016
2018-01-01Docx writer: Fix custom styles with spaces in the name.John MacFarlane1-1/+1
Custom styles with spaces worked for divs but not for spans. This commit fixes the problem. Closes #3290.
2018-01-01Markdown reader: rewrite inlinesInBalancedBrackets.John MacFarlane1-19/+13
The rewrite is much more direct, avoiding parseFromString. And it performs significantly better; unfortunately, parsing time still increases exponentially. See #1735.
2018-01-02Removed redundant subtitle in titlestalmon1-3/+1
subtitle is allready used to create a subtitle for the document appending the subtitle to the main title leads to double subtitle in the document
2018-01-01Lua.Module.Utils: make stringify work on MetaValues.John MacFarlane1-1/+4
I'm sure this was intended in the first place, but currently only Meta is supported.
2017-12-31Docx reader: minor cleanup.Jesse Rosenthal1-1/+2
2017-12-31Docx Reader: Combine adjacent anchors.Jesse Rosenthal1-20/+47
There isn't any reason to have numberous anchors in the same place, since we can't maintain docx's non-nesting overlapping. So we reduce to a single anchor, and have all links pointing to one of the overlapping anchors point to that one. This changes the behavior from commit e90c714c7 slightly (use the first anchor instead of the last) so we change the expected test result. Note that because this produces a state that has to be set after every invocation of `parPartToInlines`, we make the main function into a primed subfunction `parPartToInlines'`, and make `parPartToInlines` a wrapper around that.
2017-12-30Markdown reader: Avoid parsing raw tex unless \ + letter seen.John MacFarlane1-1/+2
This seems to help with the performance problem, #4216.
2017-12-30LaTeX reader: Simplified a check for raw tex command.John MacFarlane1-2/+2
2017-12-30Docx reader: Remove unused anchors.Jesse Rosenthal1-5/+27
Docx produces a lot of anchors with nothing pointing to them -- we now remove these to produce cleaner output. Note that this has to occur at the end of the process because it has to follow link/anchor rewriting. Closes #3679.
2017-12-31Muse reader: automatically translate #cover into #cover-imageAlexander Krotov1-1/+3
Amusewiki uses #cover directive to specify cover image.
2017-12-30Muse writer: don't escape URIs from ASTAlexander Krotov1-1/+1
2017-12-30Docx reader: Read multiple children of w:sdtContents`Jesse Rosenthal1-5/+9
Previously we had only read the first child of an sdtContents tag. Now we replace sdt with all children of the sdtContents tag. This changes the expected test result of our nested_anchors test, since now we read docx's generated TOCs.
2017-12-29Lua filters: stop exporting pushPandocModuleAlbert Krewinkel1-6/+0
The function `pushPandocModule` was exported by Text.Pandoc.Lua to enable simpler testing. The introduction of `runPandocLua` renders direct use of this function obsolete. (API change)
2017-12-29data/pandoc.lua: drop function pandoc.global_filterAlbert Krewinkel3-13/+8
The function `global_filter` was used internally to get the implicitly defined global filter. It was of little value to end-users, but caused unnecessary code duplication in pandoc. The function has hence been dropped. Internally, the global filter is now received by interpreting the global table as lua filter. This is a Lua API change.
2017-12-28Merge pull request #4170 from oltolm/opendocumentJohn MacFarlane2-9/+49
improve formatting of formulas in OpenDocument
2017-12-28Class: make FileTree opaque.John MacFarlane1-1/+1
This forces uses to interact with it using `insertInFileTree` and `getFileInfo`, which normalize file names.
2017-12-28Filter changes.John MacFarlane1-34/+46
* Previously we ran all lua filters before JSON filters. * Now we run filters in the order they are presented on the command line, whether lua or JSON. * The type of `applyFilters` has changed (incompatible API change). * `applyLuaFilters` has been removed (incompatible API change). * Bump version to 2.1. See #4196.
2017-12-28improve formatting of formulas in OpenDocumentoltolm2-9/+49
2017-12-28Alphabetical order Extension constructors.John MacFarlane1-61/+61
This makes them appear in order in `--list-extensions`.
2017-12-28Changed format of --list-extensions.John MacFarlane1-4/+3
Now the + or - occurs first.
2017-12-28Powerpoint writer tests: use IO.John MacFarlane1-2/+2
Otherwise we can't find the data files when compiled with -embed_data_files.
2017-12-28Moved makeCanoncial definition out of ifdef!John MacFarlane1-9/+11
Also added slide2 to the default pptx, and reordered the data files in pandoc.cabal.
2017-12-28Class: use makeCanonical for normalization in FileTree and data files.John MacFarlane1-8/+11
2017-12-28Text.Pandoc.Class: add insertInFileTree (API change).John MacFarlane1-7/+13
This gives a pure way to insert an ersatz file into a FileTree. In addition, we normalize paths both on insertion and on lookup, so that "foo" and "./foo" will be judged equivalent.
2017-12-28LaTeX writer: Use \endhead after \toprule in headerless tables.John MacFarlane1-4/+3
Closes #4207.
2017-12-28LaTeX reader: be more tolerant of `&` character.John MacFarlane1-1/+1
This allows us to parse unknown tabular environments as raw LaTeX. Closes #4208.
2017-12-28Org reader: support minlevel option for includesAlbert Krewinkel1-14/+37
The level of headers in included files can be shifted to a higher level by specifying a minimum header level via the `:minlevel` parameter. E.g. `#+include: "tour.org" :minlevel 1` will shift the headers in tour.org such that the topmost headers become level 1 headers. Fixes: #4154