Commit graph

1418 commits

Author SHA1 Message Date
John MacFarlane
699c118885 Update test output for skylighting >= 0.1.1.3. 2017-01-31 14:45:25 +01:00
John MacFarlane
e20e88220e Fixed some compiler warnings in tests. 2017-01-30 10:10:54 +01:00
John MacFarlane
d2e0592e01 LaTeX writer: export writeBeamer.
Removed writerBeamer from WriterOptions.
2017-01-28 09:52:45 +01:00
John MacFarlane
5156a4fe3c Shared: rename compactify', compactify'DL -> compactify, compactifyDL. 2017-01-27 21:36:45 +01:00
John MacFarlane
b6c1d491f5 Split writeDocbook into writeDocbook4, writeDocbook5.
Removed writerDocbookVersion in WriterOptions.
Renamed default.docbook template to default.docbook4.
Allow docbook4 as an output format.
But alias docbook = docbook4.
2017-01-26 22:40:57 +01:00
John MacFarlane
fce0a60f0a Provide explicit separate functions for HTML 4 and 5.
* Text.Pandoc.Writers.HTML: removed writeHtml, writeHtmlString,
  added writeHtml4, writeHtml4String, writeHtml5, writeHtml5String.
* Removed writerHtml5 from WriterOptions.
* Renamed default.html template to default.html4.
* "html" now aliases to "html5"; to get the old HTML4 behavior,
  you must now specify "-t html4".
2017-01-25 21:51:26 +01:00
John MacFarlane
70b86f48e1 Removed readerVerbosity and writerVerbosity.
API change.

Also added a verbosity parameter to makePDF.
2017-01-25 17:07:43 +01:00
John MacFarlane
d1efc839f1 Removed writerHighlight; made writerHighlightStyle a Maybe.
API change.

For no highlighting, set writerHighlightStyle to Nothing.
2017-01-25 17:07:43 +01:00
John MacFarlane
2bc0cbc239 Removed tests for Walk; these now live in pandoc-types. 2017-01-25 17:07:43 +01:00
John MacFarlane
8d179f7508 Removed unneeded imports. 2017-01-25 17:07:42 +01:00
John MacFarlane
4f6e6247f9 Made smart extension default for pandoc markdown.
Updated tests.
2017-01-25 17:07:42 +01:00
John MacFarlane
5bf9125770 Removed readerOldDashes and --old-dashes option, added old_dashes extension.
API change.  CLI option change.
2017-01-25 17:07:42 +01:00
John MacFarlane
6f8b967d98 Removed readerSmart and the --smart option; added Ext_smart extension.
Now you will need to do

    -f markdown+smart

instead of

    -f markdown --smart

This change opens the way for writers, in addition to readers,
to be sensitive to +smart, but this change hasn't yet been made.

API change. Command-line option change.

Updated manual.
2017-01-25 17:07:42 +01:00
John MacFarlane
3876b91448 Make Extensions a custom type instead of a Set Extension.
The type is implemented in terms of an underlying bitset
which should be more efficient.

API change: from Text.Pandoc.Extensions export Extensions,
emptyExtensions, extensionsFromList, enableExtension, disableExtension,
extensionEnabled.
2017-01-25 17:07:42 +01:00
John MacFarlane
8165014df6 Removed --normalize option and normalization functions from Shared.
* Removed normalize, normalizeInlines, normalizeBlocks
  from Text.Pandoc.Shared.  These shouldn't now be necessary,
  since normalization is handled automatically by the Builder
  monoid instance.

* Remove `--normalize` command-line option.

* Don't use normalize in tests.

* A few revisions to readers so they work well without normalize.
2017-01-25 17:07:41 +01:00
John MacFarlane
2e7b0c7eda Added ReaderOptions parameter to readNative.
This makes it similar to the other readers -- even
though ReaderOptions is essentially ignored, the uniformity
is nice.
2017-01-25 17:07:41 +01:00
John MacFarlane
ce1664cf2b Simplified reference-docx/reference-odt to reference-doc.
* Text.Pandoc.Options.WriterOptions: removed writerReferenceDocx
  and writerReferenceODT, replaced them with writerReferenceDoc.
  This can hold either an ODT or a Docx. In this way, writerReferenceDoc
  is like writerTemplate, which can hold templates of different
  formats. [API change]

* Removed `--reference-docx` and `--reference-odt` options.

* Added `--reference-doc` option.
2017-01-25 17:07:41 +01:00
John MacFarlane
54932ade67 Class: no more MonadState CommonState.
- Added getCommonState, putCommonState, getsCommonState, modifyCommonState
  to PandocMonad interface.

- Removed MonadState CommonState instances.
2017-01-25 17:07:41 +01:00
John MacFarlane
63dc6bd025 Added a --quiet option to suppress warnings.
Use this also in Tests.Old.
2017-01-25 17:07:40 +01:00
Jesse Rosenthal
9d69c51527 ODT test: remove unnecessary imports. 2017-01-25 17:07:40 +01:00
Jesse Rosenthal
06eb9cfb34 Make Txt2Tags test pass.
We don't have a good way to set things that aren't in the common
state. That will be the next order of business.
2017-01-25 17:07:40 +01:00
Jesse Rosenthal
5ede57122c Update all tests to use new readers and error structure. 2017-01-25 17:07:40 +01:00
John MacFarlane
18e85f8dfb Changed readNative to use PandocMonad. 2017-01-25 17:07:40 +01:00
John MacFarlane
23baba2243 Fixed icml tables test (no newline at end). 2017-01-25 17:07:39 +01:00
John MacFarlane
fb2ae14977 Fixed rtf tables test 2017-01-25 17:07:39 +01:00
John MacFarlane
1673bda95e Update tests to work with runPure. 2017-01-25 17:07:39 +01:00
Jesse Rosenthal
211d0f9574 Tests: have docx writer test use runIOorExplode.
Note that part of the reason for making a pure writer is to have better
tests, so this is a temporary fix.
2017-01-25 17:07:39 +01:00
John MacFarlane
77e8682a73 Update latex writer test for template change. 2017-01-24 15:01:11 +01:00
John MacFarlane
41f4476aab OpenDocument writer: don't profilerate text styles unnecessarily.
This change makes the writer create only as many temporary
text styles as are absolutely necessary. It also consolidates
adjacent nodes with the same style.

Closes #3371.
2017-01-23 15:18:34 +01:00
Albert Krewinkel
5729f1f2ea
Org reader: allow short hand for single-line raw blocks
Single-line raw blocks can be given via `#+FORMAT: raw line`, where
`FORMAT` must be one of `latex`, `beamer`, `html`, or `texinfo`.

Closes: #3366
2017-01-19 20:33:05 +01:00
John MacFarlane
072e5a7d20 LaTeX template: Add hyphen option to url package. 2017-01-10 17:05:25 +01:00
Albert Krewinkel
4ca420e937
Org reader: accept org-ref citations followed by commas
Bugfix for an issue which, whenever the citation was immediately followed by a
comma, prevented correct parsing of org-ref citations.
2017-01-06 18:22:19 +01:00
Albert Krewinkel
21e6ca1976 Org reader: ensure emphasis markup can be nested
Nested emphasis markup (e.g. `/*strong and emphasized*/`) was
interpreted incorrectly in that the inner markup was not recognized.
2017-01-05 23:30:46 +01:00
John MacFarlane
2d8d735bb7 LaTeX template: allow passing microtypeoptions to microtype.
Thanks to Vaclav Haisman.
2017-01-03 21:04:50 -08:00
John MacFarlane
dccdd6b7f1 Updated docbook5 writer test for new template. 2016-12-30 23:36:12 -07:00
Mauro Bieg
32cbb8f46d DocBook5 writer: make id attribute xml:id, fixes #3329 (#3330) 2016-12-30 20:03:43 -07:00
Mauro Bieg
0159956f7f markdown reader: disallow space between inline code and attributes (#3326)
closes #3323
2016-12-24 07:34:07 -07:00
John MacFarlane
9d781b1454 Updates to use skylighting rather than highlighting-kate.
So far this just reproduces capacity.

Later we'll be able to add features like warning
messages, dynamic loading of xml syntax definitions,
and dynamic loading of themes.
2016-12-23 18:07:49 -07:00
Albert Krewinkel
d27188ad30
Org writer: prefix footnote numbers with fn:
Unprefixed numbers where used by older org-mode versions, but are no
longer supported.
2016-12-21 23:51:15 +01:00
hubertp-lshift
a840e41fad Test case for issue #3223 (#3308) 2016-12-13 17:20:10 +01:00
hubertp-lshift
46fa347471 Test case for bug 2752 (#3306) 2016-12-13 14:20:21 +01:00
Jesse Rosenthal
60004cd518 Docx reader: Empty header should be list of lists.
In the past, the docx reader wrote an empty header as an empty list. It
should have the same width as a row (and be filled with empty cells).

(Note that I've reordered the code here slightly to get rid of a call to
`head`. It wasn't unsafe because it tested for null, but it was a bit of
a smell.)
2016-12-13 07:04:40 -05:00
Jesse Rosenthal
8ced8cbc6e Docx reader: Ensure one-row tables don't have header.
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.
2016-12-08 07:01:01 -05:00
John MacFarlane
65c0e527f8 Fixed tests with dynamic linking.
Closes #2709.
2016-12-07 15:05:30 +01:00
John MacFarlane
7fbfcb03d8 RST reader: fix hyperlink aliases.
`link <google_>`_

    .. _google: https://google.com

is really a reference link.

Closes #3283.
2016-12-07 12:54:25 +01:00
Albert Krewinkel
bfa734c402
LaTeX writer: Fix unnumbered headers when used with --top-level
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
2016-12-04 21:15:52 +01:00
John MacFarlane
7ace7dd66b Markdown writer: Fixed incorrect word wrapping.
Previously pandoc would sometimes wrap lines too early
due to this bug.

Closes #3277.
2016-12-04 17:13:06 +01:00
John MacFarlane
fb8a2540bd Options: Removed writerStandalone, made writerTemplate a Maybe.
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]
2016-11-30 15:34:58 +01:00
John MacFarlane
ac83d4b806 Use new module from texmath to lookup MS font codepoints.
+ 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.
2016-11-30 00:43:55 +01:00
Albert Krewinkel
1fc07ff4da Refactor top-level division selection (#3261)
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`.
2016-11-27 20:31:04 +01:00