Commit graph

8493 commits

Author SHA1 Message Date
John MacFarlane
fe4311d5a1 LaTeX writer: always add hypertarget when there's a non-empty identifier.
Previously the hypertargets were only added when there was actually
a link to that identifier.  Closes #2719.
2017-03-01 21:38:28 +01:00
John MacFarlane
d21c7fee66 LaTeX reader: don't drop contents of \hypertarget. 2017-03-01 21:05:29 +01:00
Alexander Krotov
39a8359b57 Writers: Use gets to access MonadState where possible (#3480) 2017-03-01 20:36:54 +01:00
John MacFarlane
ea619bfcb4 Markdown writer: Fixed grid tables embedded in grid tables.
Closes #2834.
2017-03-01 17:41:14 +01:00
John MacFarlane
8b641f38ca Markdown writer: Refactored gridTable to use widths in chars. 2017-03-01 17:08:14 +01:00
Wandmalfarbe
8af838f98f Fixed typos in CONTRIBUTING.md (#3479) 2017-03-01 15:00:53 +01:00
Mauro Bieg
d0fc2f1573 ODT writer: calculate aspect ratio for percentage-sized images (#3478)
closes #3239
2017-03-01 12:13:45 +01:00
John MacFarlane
d1b50a6c5d RST reader: implemented implicit internal header links.
Cloess #3475.
2017-02-28 10:32:36 +01:00
John MacFarlane
c7e2c718eb Removed --epub-stylesheet; use --css instead.
* Removed writerEpubStylesheet in WriterOptions.
* Removed `--epub-stylesheet` option.
* Allow `--css` to be used with epub.
* Allow multiple stylesheets to be used.
* Stylesheets will be taken both from `--css` and from
  the `stylesheet` metadata field (which can contain either
  a file path or a list of them).

Closes #3472, #847.
2017-02-27 21:29:16 +01:00
John MacFarlane
1d17dbd3ae LaTeX reader: Handle komascript \dedication.
It now adds a `dedication` field to metadata.
It is up to the user to supply a template that uses this
variable.

Closes #1845.
2017-02-27 14:16:05 +01:00
John MacFarlane
d30883d49e Added issue and PR template for data/templates.
Direct users to open issues in jgm/pandoc, not jgm/pandoc-templates.
2017-02-27 11:01:12 +01:00
John MacFarlane
0b78d9add0 Merge commit 'ce8226f1a7d64da56117d2f7f351e06225a84614' 2017-02-27 10:55:10 +01:00
John MacFarlane
bf074a18b6 Update RELEASE_CHECKLIST. 2017-02-27 10:19:22 +01:00
John MacFarlane
550ed838dc Removed .gitmodules. 2017-02-27 10:16:49 +01:00
John MacFarlane
ab494e727c Updated README for pandco-templates. 2017-02-27 10:12:38 +01:00
John MacFarlane
4fb9976a9a Minor cleanups in LaTeX reader. 2017-02-27 00:40:33 +01:00
John MacFarlane
99b39ffc17 RST reader: support scale and align attributes of images.
Closes #2662.
2017-02-26 23:40:31 +01:00
John MacFarlane
092c8f7732 ImageSize: export lengthToDim, new function scaleDimension. 2017-02-26 23:40:09 +01:00
John MacFarlane
377c27befe --self-contained: don't incorporate elements with data-external="1".
You can leave an external link as it is by adding the attribute
data-external="1" to the element.  Pandoc will then not try to
incorporate its content when `--self-contained` is used.  This is
similar to a feature already supported by the EPUB writer.

Closes #2656.
2017-02-26 22:48:02 +01:00
John MacFarlane
d7e25d203a Fixed typo in CONTRIBUTING.md.
Introduced by 9d91b8825f.
2017-02-26 22:20:15 +01:00
Mauro Bieg
2d6b834cdb MANUAL.txt explain --webtex SVG url (#3471) 2017-02-26 11:37:57 +01:00
Mauro Bieg
9d91b8825f CONTRIBUTING.md add "ask on pandoc-discuss" 2017-02-26 00:12:08 +01:00
John MacFarlane
5a47f3422a Fixed type sig for older GHC versions. 2017-02-25 23:56:32 +01:00
John MacFarlane
65c4efeb59 Added test case for variables/metadata in Markdown writer. 2017-02-25 23:54:30 +01:00
John MacFarlane
737d954a59 App: reverse optInputFiles so they come out in right order in templates. 2017-02-25 23:47:19 +01:00
John MacFarlane
4aed13bf7c Markdown writer: don't include variables in metadata blocks!
Previously variables set on the command line were included in
e.g. YAML metadata, contrary to documentation and intentions.
2017-02-25 23:46:39 +01:00
John MacFarlane
124551461c Fixed addVariablesToJSON.
It was previously not allowing multiple values to become lists.
2017-02-25 23:42:56 +01:00
Roland Hieber
699d289cc5 Add sourcefile and outputfile template variables (#3439)
Closes #3431.
2017-02-25 23:15:56 +01:00
John MacFarlane
9ab30c6495 Writers.Shared: export metaToJSON', addVariablesToJSON.
This allows us to add the variables AFTER using the metadata
to generate a YAML header (in the Markdown writer).

Addresses the problem shown by
https://travis-ci.org/jgm/pandoc/jobs/205154181#L705

See #3439
2017-02-25 23:13:23 +01:00
John MacFarlane
03941ca9b0 Writers.Shared: Changed metaToJSON a bit.
Now we handle metadata first, then variables.
This way, meta-json variable will not contain representations of
variables, only proper metadata.
2017-02-25 22:59:16 +01:00
John MacFarlane
bd5df466d7 AsciiDoc writer: use PandocMonad throughout.
Issues info messages for non-rendered raw content.
2017-02-25 22:29:38 +01:00
John MacFarlane
da792c63ca Expose some unexposed modules.
+ Text.Pandoc.Writers.Shared
+ Text.Pandoc.Parsing
+ Text.Pandoc.Asciify
+ Text.Pandoc.Emoji
+ Text.Pandoc.ImageSize

[API change]

These are often helpful to people writing their own
reader or writer modules.  Closes #3260.
2017-02-25 22:07:01 +01:00
John MacFarlane
e1304aa59c Fetch images when generating PDF via context.
To do this, we create the temp directory as a subdirectory
of the working directory. Since context mk IV by default looks
for images in the parent directory, this works.

Closes #3380.
2017-02-25 21:46:41 +01:00
John MacFarlane
654859af4a Docx writer: use Set for dynamic styles to avoid duplicates. 2017-02-25 20:47:58 +01:00
John MacFarlane
5441e11b06 Docx writer: bookmarks for Span with id.
And cleaned up code.
2017-02-25 20:41:44 +01:00
John MacFarlane
f8f3b69c25 Docx writer bookmark improvements.
- Bookmark start/end now surrounds content rather than preceding it.
- Bookmarks generated for Div with id.  Fixes jgm/pandoc-citeproc#205.
- Cleaner code for handling dir and style attributes for Div.
2017-02-25 15:51:53 +01:00
John MacFarlane
3a1a50a45f Make --ascii work with DocBook output too. 2017-02-25 13:35:34 +01:00
John MacFarlane
7d0082aa0b LaTeX reader: allow hspace and vspace to count as raw block or inline.
Previously we would refuse to parse anything as raw inline if
it was in the blockCommands list.  Now we allow exceptions
if they're listed under ignoreInlines in inlineCommands.

This should make it easier e.g. to include an \hspace
between two side-by-side raw LaTeX tables.
2017-02-25 12:43:00 +01:00
John MacFarlane
f1cf8273d5 Revert "LaTeX reader: don't treat \vspace and \hspace as block commands."
This reverts commit 2873cd8288.
2017-02-25 12:43:00 +01:00
Or Neeman
fa43e36449 Fix stale references to tests directory (#3469)
Some of the benchmarks were failing due to references to files in the
`tests` directory, which is now called `test`.  A search found other
references to it also.  This commit updates all these references.
2017-02-25 10:31:40 +01:00
John MacFarlane
59c673c613 Fixed link to mac uninstaller script. 2017-02-24 16:07:56 +01:00
John MacFarlane
a3741a45ab Removed unnecessary import. 2017-02-24 15:57:10 +01:00
John MacFarlane
d3e5725cbc Use catchError instead of runExceptT. 2017-02-24 15:55:40 +01:00
John MacFarlane
0448b7d1fc Implemented \graphicspath in LaTeX reader.
Closes #736.
2017-02-24 15:34:41 +01:00
John MacFarlane
b8674519d5 Removed useless TEXINPUTS stuff for context2pdf.
mkiv context doesn't use TEXINPUTS.
2017-02-24 14:34:58 +01:00
John MacFarlane
72af7b4ee5 Shared: remove 'warn'.
PDF writer: Use 'report' instead of 'warn', make it sensitive
to verbosity settings.
2017-02-24 14:29:56 +01:00
John MacFarlane
887d0b70fe Logging: Remove UsingResourceFrom, add CouldNotConvertImage 2017-02-24 14:29:54 +01:00
John MacFarlane
1c84855aab Class: Add stResourcePath to CommonState, getResourcePath, setResourcePath.
To be used in implementing `\graphicspath` in LaTeX, and possibly
in things like PDF production via context.

Use resource path in fetchItem.

Issue an info message if we get a resource from somewhere other
than ".".

Added UsingResourceFrom to log message.
2017-02-24 14:15:10 +01:00
John MacFarlane
6936747794 EPUB reader: minor refactoring, avoiding explicit MediaBag handling.
This all works behind the scenes in CommonState plumbing.
2017-02-24 13:39:20 +01:00
John MacFarlane
ce647d1cd8 Some fixes to the preceding revisions in SelfContained.
Make sure we don't duplicate end tags for script or link.
2017-02-24 13:11:29 +01:00