summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Docx reader: Ensure one-row tables don't have header.Jesse Rosenthal2016-12-08
| | | | | | | | | | | | | | Tables in MS Word are set by default to have special first-row formatting, which pandoc uses to determine whether or not they have a header. This means that one-row tables will, by default, have only a header -- which we imagine is not what people want. This change ensures that a one-row table is not understood to be a header only. Note that this means that it is impossible to produce a header-only table from docx, even though it is legal pandoc. But we believe that in nearly all cases, it will be an accidental (and unwelcome) result Closes #3285.
* Removed debug trace from HTML reader.John MacFarlane2016-12-08
|
* HTML reader: Understand `style=width:` as well as `width` in `col`.John MacFarlane2016-12-07
| | | | Closes #3286.
* RST reader: print warnings when keys, substitition, notes not found.John MacFarlane2016-12-07
| | | | | | Previously the parsers failed and we got raw text. Now we get a link with an empty URL, or empty inlines in the case of a note or substitution.
* RST reader: fix hyperlink aliases.John MacFarlane2016-12-07
| | | | | | | | | | `link <google_>`_ .. _google: https://google.com is really a reference link. Closes #3283.
* Fixed some bad regressions in HTML table parser.John MacFarlane2016-12-06
| | | | | | | This regression leads to the introduction of empty rows in some circumstances. Closes #3280.
* Man writer: Ensure that periods are escaped at beginning of line.John MacFarlane2016-12-05
| | | | Closes #3270.
* Pretty: Added `afterBreak`.John MacFarlane2016-12-05
| | | | | This makes it possible to insert escape codes for content that needs escaping at the beginning of a line.
* LaTeX writer: Fix unnumbered headers when used with `--top-level`Albert Krewinkel2016-12-04
| | | | | | | | Fix interaction of top-level divisions `part` or `chapter` with unnumbered headers when emitting LaTeX. Headers are ensured to be written using stared commands (like `\subsection*{}`). Fixes: #3272
* Markdown writer: Fixed incorrect word wrapping.John MacFarlane2016-12-04
| | | | | | | Previously pandoc would sometimes wrap lines too early due to this bug. Closes #3277.
* Options: Removed writerStandalone, made writerTemplate a Maybe.John MacFarlane2016-11-30
| | | | | | | | Previously setting writerStandalone = True did nothing unless a template was provided in writerTemplate. Now a fragment will be generated if writerTemplate is Nothing; otherwise, the specified template will be used and standalone output generated. [API change]
* Use new module from texmath to lookup MS font codepoints.John MacFarlane2016-11-30
| | | | | | | | + Removed Text.Pandoc.Readers.Docx.Fonts + Moved its code to texmath; we now use (from texmath 0.9) Text.TeXMath.Unicode.Fonts + Use texmath 0.9 (currently from git). + Updated epub tests because texmath now handles more mathml.
* Shared.fetchItem: Better handling of protocol-relative URL.John MacFarlane2016-11-27
| | | | | | | | If URL starts with `//` and there is no "base URL" (as there would be if a URL were used on the command line), then default to http:. Closes #2635.
* Updated renderHtml import in HTML writer to avoid deprecated function.John MacFarlane2016-11-27
|
* Refactor top-level division selection (#3261)Albert Krewinkel2016-11-27
| | | | | | | | | | | | | | The "default" option is no longer represented as `Nothing` but via a new type constructor, making the `Maybe` wrapper superfluous. The default behavior of using heuristics can now be enabled explicitly by setting `--top-level-division=default`. API change (`Text.Pandoc.Options`): The `Division` type was renamed to `TopLevelDivision`. The `Section`, `Chapter`, and `Part` constructors were renamed to `TopLevelSection`, `TopLevelChapter`, and `TopLevelPart`, respectively. An additional `TopLevelDefault` constructor was added, which is now also the new default value of the `writerTopLevelDivision` field in `WriterOptions`.
* HTML reader: improved table parsing.John MacFarlane2016-11-26
| | | | | | | | | | | | We now check explicitly for non-1 rowspan or colspan attributes, and fail when we encounter them. Previously we checked that each row had the same number of cells, but that could be true even with rowspans/colspans. And there are cases where it isn't true in tables that we can handle fine -- e.g. when a tr element is empty. So now we just pad rows with empty cells when needed. Closes #3027.
* Revert "Open Document writer: set first level of blockquotes to not use ↵John MacFarlane2016-11-26
| | | | | | | | | | | | indent (#2757)" This reverts commit fee0b913c5dd95e50845f6f35430b7582322ef0b. The previous commit did not provide a good way to get increased indentation for nested block quotes. Rolling it back for now. @jjsheets feel free to submit something that handles multiple levels of block quote smoothly, if you like.
* Open Document writer: set first level of blockquotes to not use indent (#2757)Jeff Sheets2016-11-26
| | | | | | | | | * Open Document writer: set first level of blockquotes to not use indent Nested blockquotes start using indents like before. Quotation style is still in use, so the style's indent settings take effect on the first level of blockquotes. * Removed list construction to improve pull request to fix #2747
* [Tex] Remove invalid inlines in sections (#3218)hubertp-lshift2016-11-26
| | | | | | | | | | | Latex doesn't like when hypertargets or images are put in the options list of the section. They are not lost since they were actually duplicated and present also in the second argument list. Note on the implementation: I had to inline the definiton of 'foldMap' since it is not implemented in every version of Haskell that Pandoc supports.
* [odt] Infer table's caption from the paragraph (#3224)hubertp-lshift2016-11-26
| | | | | | | | | | | | | | | ODT's reader always put empty captions for the parsed tables. This commit 1) checks paragraphs that follow the table definition 2) treats specially a paragraph with a style named 'Table' 3) does some postprocessing of the paragraphs that combines tables followed immediately by captions The ODT writer used 'TableCaption' style name for the caption paragraph. This commit follows the open office approach which allows for appending captions to table but uses a built-in style named 'Table' instead of 'TableCaption'. Any users of odt format (both writer and reader) are therefore required to change the style's name to 'Table', if necessary.
* Allow to overwrite top-level division type heuristics (#3258)Albert Krewinkel2016-11-26
| | | | | | | | | | | | | Pandoc uses heuristics to determine the most resonable top-level division type when emitting LaTeX or Docbook markup. It is now possible to overwrite this implicitly set top-level division via the `top-level-division` command line parameter. API change (`Text.Pandoc.Options`): the type of the `writerTopLevelDivision` field in of the `WriterOptions` data type is altered from `Division` to `Maybe Division`. The field's default value is changed from `Section` to `Nothing`. Closes: #3197
* LaTeX reader: don't treat `\vspace` and `\hspace` as block commands.John MacFarlane2016-11-26
| | | | | | | Fixed an error which came up, for example, with `\vspace` inside a caption. (Captions expect inlines.) Closes #3256.
* Org reader: respect column width settingsAlbert Krewinkel2016-11-24
| | | | | | | | | | | | | Table column properties can optionally specify a column's width with which it is displayed in the buffer. Some exporters, notably the ODT exporter in org-mode v9.0, use these values to calculate relative column widths. The org reader now implements the same behavior. Note that the org-mode LaTeX and HTML exporters in Emacs don't support this feature yet, which should be kept in mind by users who use the column widths parameters. Closes: #3246
* LaTeX writer: use `\autocites*` when "suppress-author" citation used.John MacFarlane2016-11-24
|
* Fixed some bugs in Pretty that caused blank lines in tables.John MacFarlane2016-11-23
| | | | | | | | | The bugs caused spurious blank lines in grid tables when we had things like blankline $$ blankline Closes #3251.
* Docx writer: Give full detail when there are errors converting tex math.John MacFarlane2016-11-22
|
* Put 'warn' in MonadIO. Add warnings for math conversions in docx.John MacFarlane2016-11-22
|
* Allow beamer-style <...> options in raw LaTeX (also in Markdown).John MacFarlane2016-11-20
| | | | | | | This allows use of things like `\only<2,3>{my content}` in Markdown that is going to be converted to beamer. Closes #3184.
* LaTeX writer: ensure that simple tables have simple cells.John MacFarlane2016-11-20
| | | | | | | If cells contain more than a single Plain or Para, then we need to set nonzero widths and put contents into minipages. Closes #2666.
* Fix for calculation of column widths for aligned multiline tablesBjörn Peemöller2016-11-19
| | | | | | | | | | | | This also fixes excessive CPU and memory usage for tables when --columns is set in such a way that cells must be very tiny. Now cells are guaranteed to be big enough so that single words don't need to line break, even if this pushes the line length above the column width. Closes #1911.
* Added function to compute the minimal width of a documentBjörn Peemöller2016-11-19
|
* Added error message for illegal call to Pretty.blockBjörn Peemöller2016-11-19
|
* LaTeX reader: improved table handling.John MacFarlane2016-11-19
| | | | | | | | | | We can now parse all of the tables emitted by pandoc in our tests. The only thing we don't get yet are alignments and column widths in more complex tables. See #2669.
* LaTeX reader: limited support for minipage.John MacFarlane2016-11-19
|
* Un-break Travis buildAlbert Krewinkel2016-11-19
| | | | | | Remove whitespace before function documentation The extra spaced cause problems with documentation tools and Travis tests are failing because of this.
* LaTeX reader: improved parsing of tables.John MacFarlane2016-11-19
| | | | | | | | | | Reader can now parse simple LaTeX tables such as those generated by pandoc itself. We still can't handle pandoc multiline tables which involve minipages and column widths. Partially addresses #2669.
* Fixed xref lookup in DocBook reader. Closes #3243.John MacFarlane2016-11-19
| | | | | It previously only worked when the qnames lacked the docbook namespace URI.
* Org reader: Ensure images in paragraphs are not parsed as figuresAlbert Krewinkel2016-11-19
| | | | | This fixes a regression introduced in 7e5220b57c5a48fabe6e43ba270db812593d3463.
* Export Text.Pandoc.getDefaultExtensions.John MacFarlane2016-11-18
| | | | See #3178.
* Docx writer: fixed XML markup for empty cells.John MacFarlane2016-11-18
| | | | | | | Closes #3238. Previously the Compact style wasn't being applied properly to empty cells.
* Markdown writer: Use bracketed form for native spans...John MacFarlane2016-11-18
| | | | | | ...when `bracketed_spans` enabled. Closes #3229.
* Small caps in Bracketed Spans (#3191)ickc2016-11-16
| | | | | | | | * Markdown reader: modify bracketedSpan to check small caps * MANUAL.txt: add description on the use of `bracketed_spans` in small cap * Improve markdown readers: bracketedSpan function EXACTLY as spanHtml
* Adjust widths in Markdown grid tables so that they match on round-trip.John MacFarlane2016-11-15
|
* Allow alignments to be specified in Markdown grid tables.John MacFarlane2016-11-15
|
* Markdown writer: fixed inconsistent spacing issue.John MacFarlane2016-11-15
| | | | | | | | Previously a tight bullet sublist got rendered with a blank line after, while a tight ordered sublist did not. Now we don't get the blank line in either case. Closes #3232.
* HTML reader: only treat "a" element as link if it has href.John MacFarlane2016-11-13
| | | | | | Otherwise treat as span. Closes #3226.
* Use correct mime types for woff and woff2.John MacFarlane2016-11-12
| | | | Closes #3228.
* Markdown writer: Fix escaping of spaces in super/subscript.John MacFarlane2016-11-12
| | | | | | | Previously two backslashes were inserted, which gave a literal backslash. Closes #3225.
* Docx reader: add a placeholder value for CHART.Jesse Rosenthal2016-11-10
| | | | | | We wrap `[CHART]` in a `<span class="chart">`. Note that it maps to inlines because, in docx, anything in a drawing tag can be part of a larger paragraph.
* Docx reader: Be more specific in parsing imagesJesse Rosenthal2016-11-10
| | | | | | | We not only want "w:drawing", because that could also include charts. Now we specify "w:drawing"//"pic:pic". This shouldn't change behavior at all, but it's a first step toward allowing other sorts of drawing data as well.