Commit Graph
13829 Commits
Author SHA1 Message Date
John MacFarlane db2db54f80 Added some explicit imports. 2020-11-26 12:44:01 -08:00
John MacFarlane b0e2d7ded6 Add hie.yaml generated by implicit-cradle. 2020-11-26 12:32:26 -08:00
cholonam 5f4deb5455 Docx writer: Fix bullets/lists indentation
Fix appearance of bullets/numbered lists (the first level is slightly
indented to the right instead of right on the margin).

New golden files have been tested using Word 2010 on Windows 10.
2020-11-26 12:11:26 -08:00
Igor Pashev 630b1bff2b LaTeX reader: preserve center environment (#6852)
The contents of the `center` environment are put in a `Div`
with class `center`.
2020-11-26 12:04:31 -08:00
Albert Krewinkel 07919e1b22 HTML reader: improve support for table headers, footer, attributes
- `<tfoot>` elements are no longer added to the table body but used as
  table footer.
- Separate `<tbody>` elements are no longer combined into one.
- Attributes on `<thead>`, `<tbody>`, `<th>`/`<td>`, and `<tfoot>`
  elements are preserved.
2020-11-26 07:22:01 +01:00
Albert Krewinkel 3e01ae405f HTML reader: allow finer grained options for tag omission 2020-11-26 07:22:01 +01:00
John MacFarlane ce606cb688 Fix pre-commit hook so it doesn't catch .latex+lhs extensions. 2020-11-25 16:09:50 -08:00
John MacFarlane ea8097e412 latex template: put back amssymb
We need it for checkboxes in todo lists, and maybe for
other things.  In this location it seems compatible
with the cases that propmted #6469 and PR #6762.
2020-11-25 16:08:10 -08:00
John MacFarlane 70a7c2446e Update tests for LaTeX table changes. 2020-11-25 15:49:17 -08:00
John MacFarlane 7c4d7db9c7 LaTeX writer: improve longtable output.
- Don't create minipages for regular paragraphs.
- Put width and alignment information in the longtable column
  descriptors.
- Closes #6883.
2020-11-25 15:42:44 -08:00
John MacFarlane b50ac3a95b LaTeX tables: Fix calculation of column spacing.
See #6883.
2020-11-25 14:41:28 -08:00
John MacFarlane 815976d537 Fix truncation of [Citation] list in Cite inside footnotes...
This affected author-in-text citations in footnotes.
It didn't cause problems for the printed output, but for
filters that expected the citation id and other information.

Closes #6890.
2020-11-25 09:10:10 -08:00
Albert Krewinkel c6f2663a23 HTML reader: simplify list attribute handling
This removes the `foldOrElse` function from the internal Text.Pandoc.CSS
module.
2020-11-25 17:55:42 +01:00
John MacFarlane e26d31d56b latex template: disable language-specific shorthands in babel.
Babel defines "shorthands" for some languages, and these can
produce unexpected results. For example, in Spanish, `1.22`
gets rendered as `122`, and `et~al.` as `etal`.

One would think that babel's `shorthands=off` option (which
we were using) would disable these, but it doesn't.  So we
remove `shorthands=off` and add some code that redefines
the shorthands macro.  Eventually this will be fixed in babel,
I hope, and we can revert to something simpler.

Closes #6817, closes #6887.
2020-11-25 08:25:30 -08:00
Kolen Cheung bfb2a492c8 test/tables/*.native: normalized (#6888)
The 3 native table test cases are normalized so that it will looks exactly like it is written by some pandoc writers.

Note that apart from white space normalization, it includes other normalization such as `[Str "Nordic countries"] to [Str "Nordic",Space,Str "countries"]`.
2020-11-24 22:33:36 -08:00
John MacFarlane 1489bb8414 Use skylighting 0.10.1. 2020-11-24 21:26:25 -08:00
Albert Krewinkel 0eedbd0a3d HTML reader tests: disable round-trip testing for tables
Information for cell alignment in a column is not preserved during
round-trips.
2020-11-24 15:46:11 +01:00
Albert Krewinkel c9f98e2bf5 HTML reader: support row or column-spanning table cells 2020-11-24 14:17:35 +01:00
Albert Krewinkel 446ef27a3f HTML reader: support blocks in caption 2020-11-24 14:17:35 +01:00
Albert Krewinkel 41237fcc0e HTML reader: extract table parsing into separate module 2020-11-24 14:17:35 +01:00
John MacFarlane 2f110265ff ImageSize: default to DPI 72 if the format specifies DPI of 0.
This shouldn't happen, in general, but it can happen with
JPEGs that don't conform to the spec.  Having a DPI of 0
will blow up size calculations (division by 0).

Closes #6880.
2020-11-23 09:39:48 -08:00
Albert Krewinkel f7d80b4170 JATS template: allow array of persistent institute ids in pid 2020-11-23 10:27:57 +01:00
Albert Krewinkel f9258371dd HTML reader: extract submodules
Reducing module size should reduce memory use during compilation.

This is preparatory work to tackle support for more table features.
2020-11-23 10:12:20 +01:00
Nils Carlson 75c881e2d9 OpenDocument Writer: Implement Div and Span ident support (#6755)
Spans and Divs containing an ident in the Attr will become bookmarks
or sections with idents in OpenDocument format.
2020-11-22 22:23:30 -08:00
John MacFarlane 2e372ab921 Use dev version of citeproc. 2020-11-22 16:10:30 -08:00
John MacFarlane b5b5ef92cb LaTeX writer: Improve table spacing.
+ Remove the `\strut` that was added at the end of minipage
  environments in cells.

+ Replace `\tabularnewline` with `\\ \addlinespace`.

Closes #6842, closes #6860.
2020-11-22 10:54:42 -08:00
Albert Krewinkel 5344dab8eb Org reader: parse #+LANGUAGE into lang metadata field
Fixes: #6845
2020-11-22 12:53:05 +01:00
Nils Carlson ae52918faa OpenDocument writer: Table text width support (#6792)
Support for table width as a percentage of text width by summing
width of columns and verifying that the sum is > 0 and <= 1.
2020-11-21 12:42:43 -08:00
John MacFarlane 7db2cf5d2f LaTeX reader: more robust parsing of bracketed options.
Improves on 9a40976.  Closes #6873.
2020-11-21 12:24:37 -08:00
John MacFarlane fec8223d3a Citeproc BibTeX parser: revert change in getRawField...
which was made (for reasons forgotten) when transferring
this code from pandoc-citeproc.  The change led to `--` in
URLs being interpreted as en-dashes, which is unwanted.

Closes #6874.
2020-11-21 12:07:28 -08:00
Nils Carlson 56ceaf49dc DocBook reader: Table text width support (#6791)
Table width in relation to text width is not natively supported
by docbook but is by the docbook fo stylesheets through an XML
processing instruction, <?dbfo table-width="50%"?> .
Implement support for this instruction in the DocBook reader.
2020-11-20 16:05:56 -08:00
John MacFarlane 9a4097640f Improve LaTeX option parsing...
in cases where we run into trouble parsing inlines til the
closing `]`, e.g. quotes, we return a plain string with the
option contents. Previously we mistakenly included the brackets
in this string.

Closes #6869.
2020-11-20 13:40:26 -08:00
Albert Krewinkel 797db8d306 JATS writer: support author affiliations (#6867)
Closes: #6687
2020-11-20 09:57:06 -08:00
John MacFarlane c647948ff1 commonmark_x: replace auto_identifiers with gfm_auto_identifiers.
`commonmark_x` never actually supported `auto_identifiers` (it
didn't do anything), because the underlying library implements
gfm-style identifiers only.

Attempts to add the `autolink_identifiers` extension to
`commonmark` will now fail with an error.

Closes #6863.
2020-11-20 09:17:14 -08:00
Albert Krewinkel d286242131 JATS writer: support advanced table features 2020-11-19 22:09:52 +01:00
John MacFarlane 0c8ab8a12f Update README.md, man page. 2.11.2 2020-11-19 13:05:02 -08:00
John MacFarlane b36ffef38e Update changelog. 2020-11-19 13:04:10 -08:00
John MacFarlane a7b2bfb42d reveal.js template fixes.
Put quotes around `controlsLayout`, `controlsBackArrows`,
and `display`, since these require strings.

Add `showSlideNumber`, `hashOneBasedIndex`, `pause`.
2020-11-19 11:56:05 -08:00
John MacFarlane c1fbe7b91a --self-contained: increase coverage.
Previously we only self-contained attributes for
certain tag names (`img`, `embed`, `video`, `input`, `audio`,
`source`, `track`, `section`).  Now we self-contain any
occurrence of `src`, `data-src`, `poster`, or `data-background-image`,
on any tag; and also `href` on `link` tags.

Closes #6854 (which specifically asked about
`asciinema-player` tags).
2020-11-19 10:08:43 -08:00
John MacFarlane 433605f9b9 INSTALL.md: Remove references to pandoc-citeproc.
Closes #6857.
2020-11-19 09:40:46 -08:00
John MacFarlane e16df8d271 DocBook reader: drop period in formalpara title...
...and put it in a div with class `formalpara-title`, so that
people can reformat with filters.

Closes #6562.

Thanks to rdmuller.
2020-11-19 09:33:29 -08:00
John MacFarlane 6b057d6d18 latex template: add a \break after parbox in CSLRightInline.
This should fix spacing problems between entries
with numeric styles.
2020-11-18 23:22:34 -08:00
John MacFarlane 356795dba0 latex template: fix number of params on CSLReferences. 2020-11-18 22:49:35 -08:00
John MacFarlane 0962b30d84 Man reader: improve handling of .IP.
We now better handle `.IP` when it is used with non-bullet,
non-numbered lists, creating a definition list.

We also skip blank lines like groff itself.

Closes #6858.
2020-11-18 22:44:32 -08:00
John MacFarlane 3f278f580e Remove 'static' flag.
This isn't really necessary and can be misleading
(e.g. on macOS, where a fully static build isn't
possible). cabal's new option
`--enable-executable-static` does the same. On stack
you can add something like this to the options for your
executable in package.yaml:

    ld-options: -static -pthread
2020-11-18 21:08:24 -08:00
John MacFarlane 7fa4d367bb Re-add -optc-Os to static linux build, because it makes binary smaller. 2020-11-18 19:02:04 -08:00
John MacFarlane 2002481aee Simplify options for building static linux binary. 2020-11-18 17:49:41 -08:00
John MacFarlane e17f970ed0 Use citeproc 0.2 2020-11-18 17:49:30 -08:00
John MacFarlane 46bbdad838 Don't allow macos builds with 'static' flag.
Closes #6771.
2020-11-18 15:41:48 -08:00
Albert Krewinkel 023468ea2d JATS writer: wrap all tables
All `<table>` elements are put inside `<table-wrap>` elements, as the
former are not valid as immediate child elements of `<body>`.
2020-11-18 18:10:17 +01:00