Commit graph

701 commits

Author SHA1 Message Date
John MacFarlane
27ba06fe8f data/sample.lua: fixed problem with tables.
Closes #4202.
2017-12-27 09:16:29 -08:00
John MacFarlane
0e3736422e data/sample.lua: Fixed problem with definition lists. 2017-12-27 09:16:01 -08:00
John MacFarlane
596257f350 Updated reference.docx.
Instead of just "Hello, world", the document now contains
exemplars of most of the styles that have an effect on pandoc
documents.

This makes it easier to see the effect of style changes.

Closes #4175.
2017-12-26 22:02:49 -08:00
John MacFarlane
718b2c5837 HTML writer: Use br elements in line blocks...
instead of relying on CSS.  Closes #4162.  HTML-based templates have had
the custom CSS for div.line-block removed.  Those maintaining custom
templates will want to remove this too.

We still enclose line blocks in a div with class line-block.
2017-12-26 08:40:33 -08:00
Albert Krewinkel
ef4351c4d2
data/init.lua: load pandoc.utils by default 2017-12-23 13:42:35 +01:00
Albert Krewinkel
bd3ea72371
Lua modules: added pandoc.utils module
A new module `pandoc.utils` has been created. It holds utility functions
like `sha1`, which was moved from the main `pandoc` module.
2017-12-21 22:42:59 +01:00
John MacFarlane
117a672c4d Removed default.theme data file.
It is no longer needed now that we have `--print-highlight-style`.
See #4096.
2017-12-21 11:28:38 -08:00
Albert Krewinkel
5d3573e780
Lua modules: turn pipe, read into full Haskell functions
The `pipe` and `read` utility functions are converted from hybrid
lua/haskell functions into full Haskell functions. This avoids the need
for intermediate `_pipe`/`_read` helper functions, which have dropped.
2017-12-20 22:24:41 +01:00
Albert Krewinkel
46d3c95ecd
pandoc.lua: re-add missing MetaMap function
This was a bug introduced in version 2.0.4 (commit
3f1f9536d4).
2017-12-19 09:12:16 +01:00
John MacFarlane
17b667ec26 Update latex template to work with recent versions of beamer.
The old template produced numbered sections with some recent
versions of beamer.

Thanks to Thomas Hodgson.
2017-12-13 21:17:13 -08:00
Thomas Hodgson
166561cc8d Added support for LaTeX pagestyle variable (#4135)
* Add pagestyle support

* Add pagestyle option to MANUAL.txt

* Moved mention of pagestyle to the section on variables
2017-12-11 22:26:16 -07:00
Jesse Rosenthal
9734a598ea Add default pptx data for Powerpoint writer. 2017-12-11 07:00:17 -05:00
Albert Krewinkel
4066a385ac
Lua filters: use script to initialize the interpreter
The file `init.lua` is used to initialize the Lua interpreter which is
used in Lua filters. This gives users the option to require libraries
which they want to use in all of their filters, and to extend default
modules.
2017-12-06 22:50:56 +01:00
Albert Krewinkel
d5b1c7b767
Lua filters: refactor lua module handling
The integration with Lua's package/module system is improved: A
pandoc-specific package searcher is prepended to the searchers in
`package.searchers`. The modules `pandoc` and `pandoc.mediabag` can now
be loaded via `require`.
2017-12-02 23:07:29 +01:00
John MacFarlane
00f634ba80 reveal.js template: add title-slide identifier to title slide.
This allows it to be styled more easily.

Closes #4120.
2017-12-04 16:26:04 -08:00
John MacFarlane
c94b970ced Include default CSS for 'underline' class in HTML-based templates. 2017-12-03 20:36:08 -08:00
John MacFarlane
ecfb5a0838 revealjs template: added a necessary escape. 2017-12-01 22:02:07 -08:00
John MacFarlane
d9f0b816e2 reveal.js template: include tex2jax configuration.
This ensures that we don't use $..$ delimiters, which
gives bad results when $ is used as a currency sign.
This depends on the current dev version of reveal.js.
2017-12-01 21:41:48 -08:00
Albert Krewinkel
3f1f9536d4
pandoc.lua: set metatable on List MetaValues
The `List` metatable is assigned to the tables which get passed to the
constructors `MetaBlocks`, `MetaInline`, and `MetaList`. This enables
the use of the resulting objects as lists.  This is part of the changes
discussed in #4081.
2017-12-01 18:47:33 +01:00
Albert Krewinkel
6640506ddc
Lua/StackInstances: push Pandoc and Meta via constructor
Pandoc and Meta elements are now pushed by calling the respective
constructor functions of the pandoc Lua module. This makes serialization
consistent with the way blocks and inlines are pushed to lua and allows
to use List methods with the `blocks` value.
2017-12-01 17:58:12 +01:00
Albert Krewinkel
8473a151c5
List.lua: add missing fixes as discussed in #4099
The changes were missing due to an error while using git.
2017-12-01 17:12:56 +01:00
Albert Krewinkel
c65b514ed1
List.lua: add _VERSION to module, drop unused var 2017-11-29 21:13:10 +01:00
Albert Krewinkel
0105a3c293 Add basic lua List module (#4099)
The List module is automatically loaded, but not assigned to a global
variable. It can be included in filters by calling `List = require
'List'`.

Lists of blocks, lists of inlines, and lists of classes are now given
`List` as a metatable, making working with them more convenient. E.g.,
it is now possible to concatenate lists of inlines using Lua's
concatenation operator `..` (requires at least one of the operants to
have `List` as a metatable):

    function Emph (emph)
      local s = {pandoc.Space(), pandoc.Str 'emphasized'}
      return pandoc.Span(emph.content .. s)
    end

Closes: #4081
2017-11-28 17:20:01 -07:00
Albert Krewinkel
849900c516 data/pandoc.lua: enable table-like behavior of attributes (#4080)
Attribute lists are represented as associative lists in Lua. Pure
associative lists are awkward to work with. A metatable is attached to
attribute lists, allowing to access and use the associative list as if
the attributes were stored in as normal key-value pair in table.

Note that this changes the way `pairs` works on attribute lists. Instead
of producing integer keys and two-element tables, the resulting iterator
function now returns the key and value of those pairs.  Use `ipairs` to
get the old behavior.

Warning: the new iteration mechanism only works if pandoc has been
compiled with Lua 5.2 or later (current default: 5.3).

The `pandoc.Attr` function is altered to allow passing attributes as
key-values in a normal table. This is more convenient than having to
construct the associative list which is used internally.

Closes #4071
2017-11-20 09:37:40 -08:00
John MacFarlane
c9407f85a0 LaTeX template: include natbib/biblatex after polyglossia.
Otherwise we seem to get an error; biblatex wants polyglossia
language to be defined.

Closes #4073.
2017-11-14 20:50:13 -08:00
John MacFarlane
cf7d66c097 Fixed URIs in jats.csl.
They were being rendered twice, leading to invalid XML.
2017-11-11 16:23:41 -08:00
John MacFarlane
8d31e00010 Removed etc. from abbreviations file.
Reason:  often etc. ends a sentence, and we want the . to
be treated as a sentence-ending period.
2017-11-09 23:23:51 -05:00
Wandmalfarbe
62244713f5 Added a few abbreviations and sorted the list. (#3984) 2017-11-03 12:48:58 -04:00
John MacFarlane
642d603666 Improved support for columns in HTML.
* Move as much as possible to the CSS in the template.
* Ensure that all the HTML-based templates (including epub)
  contain the CSS for columns.
* Columns default to 50% width unless they are given a width
  attribute.

Closes #4028.
2017-11-02 20:57:05 -07:00
mb21
8d7ce0fdf0 HTML Writer: consistently use dashed class-names
see #3556
2017-10-31 10:40:16 +01:00
Albert Krewinkel
db715dc9d7
pandoc.lua: define default list attributes
The second argument of the OrderedList constructor, which should define
the list's attributes, is made optional. Default attributes are used if
the parameter is omitted.
2017-10-25 16:41:03 +02:00
Albert Krewinkel
cab4f982f3
pandoc.lua: destructure attr for Link and Image
Make Attr values accessible through through the keys `identifier`,
`classes` and `attributes`.  This is already used in other elements with
attributes and is now fixed for Link and Image.
2017-10-17 21:45:27 +02:00
Albert Krewinkel
12f8efe012
pandoc.lua: throw better error when pipe command fails
A table containing the error code, command, and command output is thrown
instead of just a string error message.
2017-10-05 11:41:59 +02:00
John MacFarlane
6dbf8bab07 Merge pull request #3951 from greut/patch-1
Load Google Font using HTTPS by default
2017-10-03 16:43:55 -04:00
Albert Krewinkel
371f9b7084
pandoc.lua: use wrapper funciton for pipe command
The pipe command is wrapped in a lua function, throwing a lua error if
the command returns with an error. A wrapper is needed as Haskell
functions exposed to lua may not throw lua errors due to limitations of
hslua.

The error handling is written such that a table can be returned as an
error object in the future. This is potentially useful when finer
control is required while catching the error in lua code. Current
limitations of hslua require error objects to be strings.
2017-10-03 20:45:11 +02:00
Yoan Blanc
66135ab970 Load Google Font using HTTPS by default
Otherwise they won't show up in current version of firefox/chromium.
2017-10-03 10:55:52 -05:00
Albert Krewinkel
9b750f7d87
Lua.PandocModule: promote addFunction to top level
This reduces some boilerplate.
2017-10-03 13:13:45 +02:00
John MacFarlane
2e2795412d Move 'tables in footnotes' fix out of beamer part of default.latex.
This caused an error in beamer.

Footnotes already work in tables in beamer, without this code.
2017-09-12 08:31:59 -07:00
Mauro Bieg
c7e3c1ec17 Support for PDF generation via weasyprint and prince (#3909)
* Rename --latex-engine to --pdf-engine
* In `Text.Pandoc.Options.WriterOptions`, rename `writerLaTeXEngine` to `writerPdfEngine` and `writerLaTeXArgs` to `writerPdfArgs`.
 * Add support for `weasyprint` and `prince`, in addition to `wkhtmltopdf`, for PDF generation via HTML (closes #3906).
* `Text.Pandoc.PDF.html2pdf`: use stdin instead of intermediate HTML file
2017-09-11 20:18:42 -07:00
Andrew Dunning
621e43e0ec Write euro symbol directly in LaTeX
The textcomp package allows pdfLaTeX to parse `€` directly, making the \euro command unneeded. Closes #3801.
2017-09-08 22:26:32 +01:00
John MacFarlane
3421f3eac7 Removed old beamer template.
We now use the default.latex template for both latex and beamer.
It contains conditionals for the beamer-specific things.

`pandoc -D beamer` will return this template.
2017-09-08 10:48:02 -07:00
Andrew Dunning
331a0a0c25 Use starred versions of xcolor names
Prevents changes to documents defined using the dvipsnames list (e.g. `Blue` gives a different result with svgnames enabled).
2017-09-08 10:32:36 +01:00
Andrew Dunning
51bb7453e4 Merge branch 'master' into patch-1 2017-09-08 07:06:50 +01:00
John MacFarlane
732005456e LaTeX template: load polyglossia after header-includes.
It needs to be loaded as late as possible.

Closes #3898.
2017-09-07 22:16:23 -07:00
John MacFarlane
f802990d45 Merge pull request #3885 from tarleb/lua-module-docs
Lua module documentation
2017-09-07 21:40:02 -07:00
Andrew Dunning
3654c4373a Use xcolor for colorlinks option
Beamer loads `xcolor` rather than `color`, and thus the `dvipsnames` option doesn't take effect. This also provides a wider range of colour selections with the `svgnames` option. Closes #3877.
2017-09-07 22:06:51 +01:00
Albert Krewinkel
1a4658c573
data/pandoc.lua: fix typos in documentation 2017-08-31 16:57:14 +02:00
Andrew Dunning
a89aa1a681 Combine LaTeX/Beamer templates
All conditionals use the `beamer` variable set by the writer.

Closes #3878.
2017-08-26 09:37:22 +01:00
Václav Haisman
c9be2de5c1 Allow setting Japanese fonts when using LuaLaTeX (#3873)
...by using the `luatexja-fontspec` and `luatexja-preset` packages. Use
existing `CJKmainfont` and `CJKoptions` template variables. Add
`luatexjafontspecoptions` for `luatexja-fontspec` and `luatexjapresetoptions`
for `luatexja-preset`.
2017-08-25 11:20:56 -07:00
Albert Krewinkel
41baaff327
Text.Pandoc.Lua: support Inline and Block catch-alls
Try function `Inline`/`Block` if no other filter function of the
respective type matches an element.

Closes: #3859
2017-08-22 23:30:48 +02:00
John MacFarlane
6cba21b4d3 Small improvement to #3855 - move lang attribute up.
So we don't have a dangling line with the closing `>` when
`lang` is not set.
2017-08-21 21:16:55 -07:00
Jens Getreu
9375e50b96 docbook5 template: use lang and subtitle variables (#3855) 2017-08-21 21:10:41 -07:00
Albert Krewinkel
8ef200b80f
data/pandoc.lua: fix documentation
Multiple documentation mistakes were fixed.
2017-08-21 17:47:54 +02:00
Albert Krewinkel
b81cff4357
data/pandoc.lua: Include Pandoc, Meta in implicit filters
Functions with a name that corresponds to an AST element are included in
implicit pandoc filter, but both `Meta` and `Pandoc` were wrongly
ignored till now.
2017-08-21 16:47:05 +02:00
John MacFarlane
892a4edeb1 Implement multicolumn support for slide formats.
The structure expected is:

    <div class="columns">
      <div class="column" width="40%">
        contents...
      </div>
      <div class="column" width="60%">
        contents...
      </div>
    </div>

Support has been added for beamer and all HTML slide formats.

Closes #1710.

Note:  later we could add a more elegant way to create
this structure in Markdown than to use raw HTML div elements.
This would come for free with a "native div syntax" (#168).
Or we could devise something specific to slides
2017-08-14 23:17:44 -07:00
Andrew Dunning
ceda566a5e Fix hyperref options clash (#3847)
Avoids an options clash when loading a package (e.g. `tufte-latex`) that uses `hyperref` settings different from those in the template (introduced in <feffd7c64a>).
2017-08-14 12:33:46 -07:00
John MacFarlane
f7346bbfc1 Added Listing to Term.
So far only added to English.
2017-08-12 13:19:50 -07:00
John MacFarlane
cc6db2aa8f Added new translations. 2017-08-12 13:18:09 -07:00
John MacFarlane
622c3f2fa6 Change to yaml for translation files. 2017-08-12 12:17:38 -07:00
John MacFarlane
c9c642c8b4 Added de.trans. 2017-08-11 23:52:03 -07:00
John MacFarlane
74212eb1b0 Added support for translations (localization) (see #3559).
* readDataFile, readDefaultDataFile, getReferenceDocx,
  getReferenceODT have been removed from Shared and
  moved into Class.  They are now defined in terms of
  PandocMonad primitives, rather than being primitve
  methods of the class.

* toLang has been moved from BCP47 to Class.

* NoTranslation and CouldNotLoudTranslations have
  been added to LogMessage.

* New module, Text.Pandoc.Translations, exporting
  Term, Translations, readTranslations.

* New functions in Class: translateTerm, setTranslations.
  Note that nothing is loaded from data files until
  translateTerm is used; setTranslation just sets the
  language to be used.

* Added two translation data files in data/translations.

* LaTeX reader: Support `\setmainlanguage` or `\setdefaultlanguage`
  (polyglossia) and `\figurename`.
2017-08-11 22:22:31 -07:00
John MacFarlane
0f658eb46c data/pandoc.lua: regularize constructors.
We now use Pandoc instead of Doc (though Doc remains a deprecated
Synonym), and we deprecate DoubleQuoted, SingleQuoted,
InlineMath, and DisplayMath.
2017-06-29 17:08:59 +02:00
John MacFarlane
7ea49da002 LaTeX template: added natbiboptions variable.
Closes #3768.
2017-06-28 14:34:12 +02:00
Albert Krewinkel
4fab0d2c30
data/pandoc.lua: add accessors to Table elements 2017-06-27 17:11:42 +02:00
John MacFarlane
cf3b9a4058 Removed redundant element from data/docx/word/numbering.xml.
The elements we need are generated when the document is
compiled; this didn't do anything.
2017-06-27 12:39:13 +02:00
John MacFarlane
6773447c8c Support --toc in opendocument/odt. 2017-06-26 16:31:28 +02:00
John MacFarlane
75f4e41d7d Use table-of-contents for contents of toc, make toc a boolean.
Changed markdown, rtf, and HTML-based templates accordingly.

This allows you to set `toc: true` in the metadata; this
previously produced strange results in some output formats.

Closes #2872.

For backwards compatibility, `toc` is still set to the
toc contents.  But it is recommended that you update templates
to use `table-of-contents` for the toc contents and `toc`
for a boolean flag.
2017-06-26 16:20:09 +02:00
John MacFarlane
8af1c065d2 latex template: fix typo in fix for notes in tables.
See 1475299c9a (diff-c7c27b8e99f898fde7715afd9ae8cd02R126)

However, this is not a complete fix:
https://github.com/jgm/pandoc-templates/pull/208#issuecomment-309631622

Thanks to zeeMonkeez.  See #2378.
2017-06-20 10:24:35 +02:00
Yuchen Pei
564c77964d Added Vimwiki reader (#3705).
* New module Text.Pandoc.Readers.Vimwiki, exporting readVimwiki [API change].
* New input format `vimwiki`.
* New data file, `data/vimwiki.css`, for displaying the HTML produced by this reader and pandoc's HTML writer in the style of vimwiki's own HTML export.
2017-06-19 22:15:12 +02:00
John MacFarlane
ec3992b2f0 Use revealjs's math plugin for mathjax.
This is a thin wrapper around mathjax that makes math look better
on revealjs.

See https://github.com/hakimel/reveal.js/#mathjax

We do this by setting the 'mathjax' boolean variable and
using it in the revealjs template. Also, for revealjs
and mathjax, we don't assign the usual thing to the 'math'
variable, since it's handled by mathjax config.

Closes #3743.
2017-06-18 11:44:21 +02:00
Václav Haisman
4bae307616 Added aspectratio variable to beamer template (#3723).
* Transplant jgm/pandoc-templates#236 to Pandoc repository.
* Document `aspectratio` in user manual.
* Enumerate possible values for `aspectratio`.
2017-06-05 15:52:36 +02:00
John MacFarlane
650e1ac1fd Docx writer: Use Table rather than "Table Normal" for table style.
"Table Normal" is the default table style and can't be modified.

Closes #3275, further testing welcome.
2017-05-25 12:11:46 +02:00
lwolfsonkin
b45e47735c modified template.latex to fix XeLaTex being used with tables (#3661)
- reordered `lang` variable handling to immediately before `bidi`
2017-05-18 22:42:18 +02:00
Ian
b9185b0216 Docx writer: Change FigureWithCaption to CaptionedFigure (#3658)
Edit styles.xml as part of the fix for #3656
2017-05-18 22:34:13 +02:00
Albert Krewinkel
399a36280d
Lua module: allow omitting Attr in element constructors
The Attr argument is made optional for all pandoc element constructors
which take such a parameter. The attr param is always the last argument
of the constructor functions, so the option to omit them makes it easier
to construct new pandoc elements by hand.
2017-05-18 00:04:48 +02:00
Václav Haisman
7bdf38ef2e LaTeX: Load parskip before hyperref. (#3654)
* LaTeX: Load `parskip` before `hyperref`.

According to `hyperref` package's `README.pdf`, page 22, `hyperref` package
should be loaded after `parskip` package.

* Adjust tests for previous change.
2017-05-09 22:09:10 +02:00
Václav Haisman
5048be5112 Fix links inside captions in LaTeX output with links-as-notes.
Declare our redefined `\href` robust.

Fixes #3651. (#3652)
2017-05-08 12:07:01 +02:00
John MacFarlane
2f3d62cb86 ConTeXt template: improved font handling.
simplefonts is now obsolete in ConTeXt.

This patch comes from Pablo Rodríguez via jgm/pandoc-templates#247.
2017-05-06 14:58:32 +02:00
Albert Krewinkel
ae21a8bb2a
Lua filter: fall-back to global filters when none is returned
The implicitly defined global filter (i.e. all element filtering
functions defined in the global lua environment) is used if no filter is
returned from a lua script. This allows to just write top-level
functions in order to define a lua filter. E.g

    function Emph(elem) return pandoc.Strong(elem.content) end
2017-04-30 17:06:54 +02:00
Albert Krewinkel
2e916b3abf
Lua module: simplify Attributes, rename to Attr
Attributes was written to behave much like a normal table, in order to
simplify working with it. However, all Attr containing elements were
changed to provide panflute-like accessors to Attr components, rendering
the previous approach unnecessary.
2017-04-30 11:50:09 +02:00
Albert Krewinkel
3362cb89d9
Lua module: make Header argument order consistent
Attributes are always passed as the last element, making it possible to
omit this argument.  Argument order for `Header` was wrong and is fixed.
2017-04-30 11:28:03 +02:00
Albert Krewinkel
01e8df2e53
Lua module: add example for usage of read 2017-04-30 11:24:48 +02:00
John MacFarlane
730796ee31 LaTeX writer: Fix problem with escaping in lstinline.
Previously the LaTeX writer created invalid LaTeX
when `--listings` was specified and a code span occured
inside emphasis or another construction.

This is because the characters `%{}\` must be escaped
in lstinline when the listinline occurs in another
command, otherwise they must not be escaped.

To deal with this, adoping Michael Kofler's suggestion,
we always wrap lstinline in a dummy command `\passthrough`,
now defined in the default template if `--listings` is
specified.  This way we can consistently escape the
special characters.

Closes #1629.
2017-04-29 11:05:44 +02:00
Albert Krewinkel
24ef672132 Lua module: provide simple read format parser
A single `read` function parsing pandoc-supported formats is added to
the module. This is simpler and more convenient than the previous method
of exposing all reader functions individually.
2017-04-26 23:28:40 +02:00
Albert Krewinkel
5416fb14ab Lua filter: allow natural access to meta elements
Meta elements that are treated as lua tables (i.e. MetaList,
MetaInlines, MetaBlocks, and MetaMap), are no longer wrapped in an
additional table but simply marked via a metatable.  This allows
treating those meta values just like normal tables, while still making
empty elements of those values distinguishable.
2017-04-26 23:28:40 +02:00
John MacFarlane
66b08391b3 HTML line block: Use class instead of style attribute.
We now issue `<div class="line-block">` and include a
default definition for `line-block` in the default
templates, instead of hard-coding a `style` on the
div.

Closes #1623.
2017-04-25 23:07:30 +02:00
Albert Krewinkel
291e4f39e8
Lua module: provide accessors to element properties 2017-04-15 21:36:39 +02:00
Albert Krewinkel
3d6edbd9e3
Lua filter: use Attributes constructor for Attrs
Element attributes are pushed to the stack via the `Attributes`
function. `Attributes` creates an Attr like triple, but the triple also
allows table-like access to key-value pairs.
2017-04-15 09:31:09 +02:00
Albert Krewinkel
ac275528c2
Lua module: fix doc generation, reorder code
Ensure that documentation generated with `ldoc` is readable and correct.
2017-04-15 00:12:51 +02:00
Albert Krewinkel
8c2e6a66b9
Lua module: provide builder functions for math and quoted
Provide functions `pandoc.SingleQuoted`, `pandoc.DoubleQuoted`,
`pandoc.DisplayMath`, and `pandoc.InlineMath` to allow simple building
of Math and Quoted elements.
2017-04-15 00:10:33 +02:00
Albert Krewinkel
d671b69b87
Lua filter: use lua strings for nullary constructors
Lua string are used to represent nullary data constructors. The previous
table-based representation was based on the JSON serialization, but can
be simplified. This also matches the way those arguments are passed to
custom writers.
2017-04-14 22:32:08 +02:00
Albert Krewinkel
540a3e80ad
Push blocks via lua constructors and constants
All element creation tasks are handled by lua functions defined in the
pandoc module.
2017-04-14 10:33:38 +02:00
Albert Krewinkel
425df8fff4
Use lua constructors to push meta values 2017-04-13 22:57:50 +02:00
Albert Krewinkel
00746c3c76
Improve lua module documentation 2017-04-13 19:10:51 +02:00
Albert Krewinkel
97dfe782cf
Lua module: provide multi-param Inline constructors
Instead of taking only a single argument containing the pre-packed
element contents, `Inline` constructors now take the same arguments as
the respective filter and `Custom` writer function
2017-04-12 21:21:25 +02:00
Albert Krewinkel
7e3705c1c4
Lua filter: use custom StackValue Inline instance
Inline elements are no longer pushed and pulled via aeson's Value.
2017-04-11 23:31:55 +02:00
John MacFarlane
48729f9715 Ms writer improvements:
- added some variables to the default template.
- cleaner output for images (stringify alt text).
2017-04-04 17:21:02 +02:00
John MacFarlane
65b692b413 Small fixes to ms template. 2017-04-04 16:19:53 +02:00
John MacFarlane
9e78a9d26b Added data/default.theme to repository. 2017-04-01 22:59:10 +02:00
John MacFarlane
1c84a03509 Ms writer: added syntax highlighting.
Closes #3547.

Macro definitions are inserted in the template when there is highlighted
code.

Limitations: background colors and underline currently not
supported.
2017-04-01 22:05:38 +02:00
John MacFarlane
8a3ef99882 JATS template: always include <back> element even if empty. 2017-03-31 15:15:34 +02:00
John MacFarlane
3217bc192e JATS writer: put references in <back>.
Modified template to include a `<back>` and `<body>` section.
This should give authors more flexibility, e.g. to put
acknowledgements metadata in `<back>`.  References are
automatically extracted and put into `<back>`.
2017-03-31 11:07:09 +02:00
John MacFarlane
560cfadb92 jats template: added xml-stylesheet variable. 2017-03-30 22:49:22 +02:00
John MacFarlane
6ad486c3c3 Automatically include URI-encoded jats.csl for jats output.
This way people can do

    pandoc -s -t jats --filter pandoc-citeproc

and it will just work.  If they want to specify a stylesheet,
they still can.
2017-03-30 16:43:17 +02:00
John MacFarlane
64fe39c255 Added default.jats template.
This is copied from Martin Fenner's pandoc-jats project:
https://github.com/mfenner/pandoc-jats
2017-03-28 09:38:00 +02:00
John MacFarlane
306dadc901 default.ms template: move header-includes and .1C up. 2017-03-26 23:47:38 +02:00
John MacFarlane
0eb62f03fe Ms writer: Hyperlink table of contents and other improvements. 2017-03-26 20:03:37 +02:00
John MacFarlane
e30d2c700a Ms writer: Use @ instead of | for inline math delimiter.
The `|` delimiter had a bad interaction with tbl.
See discussion in #1839.
2017-03-26 16:59:38 +02:00
John MacFarlane
267e1a13ea Ms writer: Support external links.
Also add config options for link color.
2017-03-26 11:05:23 +02:00
John MacFarlane
1d659bec01 Ms writer: Implement header identifiers and internal links. 2017-03-25 22:16:44 +01:00
John MacFarlane
ed6249bd0b Ms writer: use light gray for strikeout.
Pending groff definitions for striking out an arbitrary
section of text (not just a few words).
2017-03-25 20:53:32 +01:00
John MacFarlane
c941a00cac Ms writer: improved pdf metadata. 2017-03-25 19:30:24 +01:00
John MacFarlane
7c8eb2ba6e ms template: beginnings of support for PDF metadata.
This will have to be refined along the lines of what is
now done in the latex writer/template.

For help, see
http://pipeline.lbl.gov/code/3rd_party/licenses.win/groff/1.19.2/pdf/pdfmark.pdf
2017-03-25 11:43:44 +01:00
John MacFarlane
a932c71a28 Ms template: don't include www macros. 2017-03-25 09:26:51 +01:00
John MacFarlane
c13cfe8f5d Ms writer: Use indented paragraphs after first in section.
Note that the current indentation setting is 0; see the
settings in the template.
2017-03-24 23:32:28 +01:00
John MacFarlane
af57de0b27 default.ms: Add settings for document variables like width. 2017-03-24 22:15:46 +01:00
John MacFarlane
14e7d3dbff Use www.tmac in default.ms.
This will allow us to use link macros, etc.
2017-03-24 17:35:38 +01:00
John MacFarlane
a7ae4b1ee2 Ms writer: support --toc, date, abstract. 2017-03-24 17:25:09 +01:00
John MacFarlane
2251d9cb73 Ms writer: Use custom .HRULE macro for horizontal rule. 2017-03-24 09:23:19 +01:00
John MacFarlane
d20d3a5dbb Ms writer: Super/subscript support.
Also added some macro definitions to default template
to support subscripts + better superscripts.
2017-03-23 12:59:19 +01:00
John MacFarlane
6c204ea2bd Initial addition of groff ms writer.
* New module: Text.Pandoc.Writers.Ms.
* New template: default.ms.
* The writer uses texmath's new eqn writer to convert math
  to eqn format, so a ms file produced with this writer
  should be processed with `groff -ms -e` if it contains
  math.
2017-03-23 10:14:16 +01:00
Albert Krewinkel
f2f6851713 Lua filters (#3514)
* Add `--lua-filter` option.  This works like `--filter` but takes pathnames of special lua filters and uses the lua interpreter baked into pandoc, so that no external interpreter is needed.  Note that lua filters are all applied after regular filters, regardless of their position on the command line.
* Add Text.Pandoc.Lua, exporting `runLuaFilter`.  Add `pandoc.lua` to data files.
* Add private module Text.Pandoc.Lua.PandocModule to supply the default lua module.
* Add Tests.Lua to tests.
* Add data/pandoc.lua, the lua module pandoc imports when processing its lua filters.
* Document in MANUAL.txt.
2017-03-20 15:17:03 +01:00
John MacFarlane
c93d069d49 Add default abbreviations file (data/abbreviations).
This contains a list of strings that will be recognized by pandoc's
Markdown parser as abbreviations.  (A nonbreaking space will
be inserted after the period, preventing a sentence space in
formats like LaTeX.)

Users can override the default by putting a file abbreviations
in their user data directory (`~/.pandoc` on *nix).
2017-03-16 22:16:41 +01:00
John MacFarlane
d5086e7bd7 Docx writer: Support 9 levels of headers.
Closes #1642.
2017-03-13 21:48:00 +01:00
Alexander Krotov
d037c5019d Add Muse writer (#3489)
* Add Muse writer

* Advertise new Muse writer

* Muse writer: add regressions tests
2017-03-10 10:16:27 +01:00
John MacFarlane
14b8aa8c93 Regularized CSS in html/epub/html slide templates.
All templates now include `code{white-space: pre-wrap}`
and CSS for `q` if `--html-q-tags` is used.

Previously some templates had `pre` and others `pre-wrap`;
the `q` styles were only sometimes included.

See #3485.
2017-03-04 23:16:42 +01:00
Mauro Bieg
40d1dc417a templates: CSS for .smallcaps, closes #1592 (#3485) 2017-03-04 22:52:11 +01:00
John Luke Bentley
07d51d9e30 Make default.html5 polyglot markup conformant. (#3473)
Polyglot markup is HTML5 that is also valid XHTML. See
<https://www.w3.org/TR/html-polyglot>.  With this change, pandoc's
html5 writer creates HTML that is both valid HTML5 and valid XHTML.
See jgm/pandoc-templates#237 for prior discussion.

* Add xml namespace to `<html>` element.
* Make all `<meta>` elements self closing.
  See <https://www.w3.org/TR/html-polyglot/#empty-elements>.
* Add `xml:lang` attribute on `<html>` element, defaulting to blank, and
  always include `lang` attribute, even when blank.  See
  <https://www.w3.org/TR/html-polyglot/#language-attributes>.
* Update test files for template changes.

The key justification for having language values default to blank: it
turns out the HTML5 spec requires it (as I read it).  Under
[the HTML5 spec, section "3.2.5.3. The lang and xml:lang
attributes"](https://www.w3.org/TR/html/dom.html#the-lang-and-xmllang-attributes),
providing attributes with blank contents both:

    * Has meaning, "unknown", and
    * Is a MUST (written as "must") if a language value is not provided ...

> The lang attribute (in no namespace) specifies the primary language
> for the element's contents and for any of the element's attributes that
> contain text. Its value must be a valid BCP 47 language tag, or the
> empty string. Setting the attribute to the empty string indicates that
> the primary language is unknown.

In short, it seems that where a language value is not provided then a
blank value MUST be provided for Polyglot Markup conformance, because
the HTML5 spec stipulates a "must". So although the Polyglot Markup spec
is unclear on this issue it would seem that if it was correctly written,
it would therefore require blank attributes.

Further justifications are found at
https://github.com/jgm/pandoc-templates/issues/237#issuecomment-275584181
(but the HTML5 spec justification given above would seem to be the
clincher).

In addition to having lang-values-default-to-blank I recommend that, when an
author does not provide a lang value, then upon on pandoc command execution
a warning message like the following be provided:

> Polyglot markup stipulates that 'The root element SHOULD always specify
> the language'. It is therefore recommended you specify a language value in
> your source document. See
> <https://www.w3.org/International/articles/language-tags/> for valid
> language values.
2017-03-04 10:08:38 +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
ab494e727c Updated README for pandco-templates. 2017-02-27 10:12:38 +01:00
John MacFarlane
8b9448aa17 default.revealjs template: make 'history' default to true. 2017-02-20 22:06:37 +01:00
John MacFarlane
e390d754ef Merge commit '9e52ac6bb02afd7b4ed5dad61021a1fa33051203' as 'data/templates' 2017-02-20 20:52:00 +01:00
John MacFarlane
e86e44b98e Removed data/templates submodule. 2017-02-20 20:51:43 +01:00
John MacFarlane
d1c16c4785 default.beamer changes (Thomas Hodgson):
- Use dvipsnames options when colorlinks specified (otherwise
  we get an error for 'maroon')
- Added titegraphic and logo variables.
2017-02-06 17:04:55 +01:00
John MacFarlane
fc8208e8bc Use unicode-math by default in default.latex template.
mathspec will be used in xelatex if the `mathspec` variable is
set; otherwise unicode-math will be used.

Thanks to Václav Haisman.
2017-02-06 10:50:36 +01:00
John MacFarlane
a62550f46e Use latest master HEAD for templates. 2017-01-29 22:07:10 +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
190943e1fd EPUB writer: split writeEPUB into writeEPUB2, writeEPUB3.
Also include explicit epub2 output format in CLI tool.
2017-01-26 22:09:21 +01:00
John MacFarlane
1105dd866c Rename default.html template to default.html4. 2017-01-25 21:47:07 +01:00
John MacFarlane
5a03ebf05b Copied a few changes from default.latex to default.beamer.
(Wandmalfarbe)
2017-01-25 17:05:55 +01:00
John MacFarlane
207b3f7e40 Changed position of \VerbatimNotes and fancyvrb in latex, beamer templates.
This fixes hyperlinks on footnotes in documents that contain
verbatim in notes.

(Note: the beamer template was updated to match the LaTeX template, but
at this point verbatim in notes seems not to work in beamer.)

Closes #3361.
2017-01-24 14:48:38 +01:00
bumper314
5bd571f499 Fix sample.lua barfing on Raw data (#3358)
* Fix for "pandoc: user error (Incorrect result type (string expected, got nil))." when the source format contains Raw data.

* Update sample.lua
2017-01-18 12:47:15 +01:00
John MacFarlane
072e5a7d20 LaTeX template: Add hyphen option to url package. 2017-01-10 17:05:25 +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
0c201c407c docbook5template: fix namespace declarations (Mauro Bieg). 2016-12-30 20:06:59 -07:00
John MacFarlane
9b9ec99ee8 We no longer need the MathMLInHTML.js shim from 2004! 2016-12-09 21:18:02 +01:00
John MacFarlane
afa675b71e Really fixed bash completion this time!
Closes #2749.
2016-12-07 21:18:44 +01:00
John MacFarlane
d5bfa27035 Improved bash-completion for filenames with spaces. 2016-12-07 19:28:24 +01:00
John MacFarlane
b0733190b0 Fixed bash completion for filenames with spaces.
Closes #2749.
2016-12-07 17:37:27 +01:00
John MacFarlane
85e8afe942 LaTeX template: use correct separator for pdfkeywords.
Needs a comma not a semicolon.

Thanks to Wandmalfarbe.
2016-12-04 21:09:58 +01:00
hubertp-lshift
015dead0bb [odt] Infer table's caption from the paragraph (#3224)
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.
2016-11-26 21:45:56 +01:00
John MacFarlane
78f2c994e1 Use pre-wrap for code in dzslides template (Nicolas Porcel).
Otherwise overly long code will appear on every slide.
2016-11-25 11:19:40 +01:00
Hubert Plociniczak
13bc573e7f Inline code when text has a special style
When a piece of text has a text 'Source_Text' then
we assume that this is a piece of the document
that represents a code that needs to be inlined.
Addapted an odt writer to also reflect that change;
previously it was just writing a 'preformatted' text using
a non-distinguishable font style.

Code blocks are still not recognized by the ODT reader.
That's a separate issue.
2016-11-08 09:29:46 -05:00
John MacFarlane
7359ce60e5 Add hypersetup options to beamer templates (Jake Zimmerman). 2016-10-25 16:01:48 +02:00
John MacFarlane
422b861edc Handle line blocks in sample.lua custom lua writer. 2016-10-23 20:00:07 +02:00
John MacFarlane
ae32d71da4 LaTeX template: use footnote package to fix notes in tables.
Thanks to Václav Haisman.
2016-09-28 11:35:13 +02:00
John MacFarlane
0ab833ecd7 revealjs template: Added notes-server option (Yoan Blanc).
jgm/pandoc-templates#212
2016-09-28 11:31:23 +02:00
John MacFarlane
a244aff244 LaTeX template: set default figure placement.
Thanks to Václav Haisman.  This accompanies #3093.

This change allows users to set the default figure placement
for figures, instead of enforcing one choice.

Users with custom templates will need to add this.
2016-09-28 11:19:12 +02:00
John MacFarlane
820ab51401 Use p tags for subtitle, author, date in epub, revealjs, slidy templates.
See #3119.
2016-09-25 21:44:16 +02:00
John MacFarlane
b43ebd2af2 HTML template: use p instead of h1 for subtitle, author, date.
Closes #3119.
2016-09-25 21:36:54 +02:00
John MacFarlane
e70d8488eb Beamer template: added support for fontfamilies.
As already in LaTeX.
Closes #216.
2016-09-23 18:11:54 +02:00
John MacFarlane
81311a7deb Added themeoptions variable to beamer template (Carsten Gips). 2016-08-11 21:14:26 +02:00
John MacFarlane
cde1f00813 Added beamerarticle variable.
This causes the `beamerarticle` package to be loaded
in beamer, to produce an article from beamer slides.
(Carsten Gips)
2016-08-06 22:43:51 +02:00
John MacFarlane
5f758970a5 Textile reader: support bc.. extended code blocks.
Also, remove trailing newline in code blocks (consistently
with Markdown reader).
2016-07-22 15:32:50 -07:00
John MacFarlane
5611de1473 Restored whitespace between paragraphs in beamer template.
See jgm/pandoc-templates#207.
2016-07-20 10:45:51 -07:00
John MacFarlane
d9880fe340 LaTeX template: Added dummy definition for \institute.
This isn't a standard command, and we want to avoid
a crash when `institute` is used with the default
template.
2016-07-18 22:32:47 -07:00
John MacFarlane
da38bebbdc beamer, latex templates: pass biblatexoptions directly in package load.
This allows runtime optinos to be used.  Fixes jgm/pandoc-citeproc#201
2016-07-01 15:13:46 -07:00
Alex Ivkin
a73c95f61d Added Zim Wiki writer, template and tests. 2016-06-30 23:59:43 -07:00
John MacFarlane
0f9c6c4db0 Added secnumdepth variable to LaTeX template.
Closes #2920.
2016-06-25 13:13:09 -07:00
John MacFarlane
175cc2d44d Implement RawInline and RawBlock in sample lua custom writer.
Closes #2985.
2016-06-20 11:55:43 -07:00
John MacFarlane
4136ec0f4a latex template: fix for obscure hyperref/xelatex issue.
Here's a minimal case:

    \documentclass[]{article}
    \usepackage{hyperref}
    \begin{document}
    \section{\%á}
    \end{document}

Without this change, this fails on the second invocation of xelatex.
See https://tex.stackexchange.com/questions/313266/and-non-ascii-characters-in-headings

This affects inputs this like

    # %á

with pdf output via xelatex.
2016-06-07 10:11:48 -07:00
John MacFarlane
8cce668713 LaTeX template: support for custom font families.
Needed for correct polyglossia operation with Cyrillic fonts and perhaps
can find some other usages.  Example usage in YAML metadata:

```
fontfamilies:
- name: \cyrillicfont
  font: Liberation Serif
- name: \cyrillicfonttt
  options: Scale=MatchLowercase
  font: Liberation
```

(vladipus)
2016-05-19 11:11:00 -07:00
John MacFarlane
bc56988ead Added docbook5 template. 2016-05-01 22:45:27 -07:00
John MacFarlane
3aa7bd1b7c Added institute variable in LaTeX and Beamer templates. 2016-03-19 13:48:06 -07:00
John MacFarlane
a692bd2872 Custom writer: Pass attributes parameter to CaptionedImage.
Closes #2697.
2016-02-05 16:49:27 -08:00
John MacFarlane
cbc2434ca3 Added default.tei TEI template 2016-01-21 15:29:05 -08:00
John MacFarlane
54f4faa76c HTML slide templates: add toc. (Andrew Dunning) 2016-01-01 20:33:43 -08:00
John MacFarlane
59d6f02a9a Added 'paper' after $papersize$ variable in latex template.
Thus you can say `papersize: a4` and the latex will contain
`a4paper`.

This change may break some existing workflows; if you currently
specify `a4paper`, you'll get `a4paperpaper` which is meaningless.

However, the change seems worth it, as it will make the
`papersize` variable work uniformly across ConTeXt, LaTeX,
and html->pdf via wkhtmltopdf.

See
https://github.com/jgm/pandoc/commit/3861df510c45ecfc0ac9581dc6f16b07eac4a
62d#commitcomment-15135193
2015-12-23 13:33:30 -08:00
John MacFarlane
6924937fbd Beamer: Moved header-includes before setting of title etc.
This matches a change already made in the LaTeX template
(Thomas Hodgson). Closes jgm/pandoc-templates#168
2015-12-19 19:01:05 -08:00
John MacFarlane
28b2d86b21 LaTeX/Beamer template changes (Thomas Hodgson):
* Added `thanks` variable
* Use `parskip.sty` when `indent` isn't set (fall
  back to using `setlength` as before if `parskip.sty`
  isn't available).
* Use `biblio-style` with biblatex.
* Added `biblatexoptions` variable.
* Added `section-titles` variable (defaults to true)
  to enable/suppress section title pages in beamer
  slide shows.
* Moved beamer themes after fonts, so that themes can
  change fonts.  (Previously the fonts set were being
  clobbered by lmodern.sty.)
2015-12-19 18:50:45 -08:00
John MacFarlane
536b6bf538 Implemented SoftBreak and new --wrap option.
Added threefold wrapping option.

* Command line option: deprecated `--no-wrap`, added
  `--wrap=[auto|none|preserve]`
* Added WrapOption, exported from Text.Pandoc.Options
* Changed type of writerWrapText in WriterOptions from
  Bool to WrapOption.
* Modified Text.Pandoc.Shared functions for SoftBreak.
* Supported SoftBreak in writers.
* Updated tests.
* Updated README.

Closes #1701.
2015-12-11 23:55:08 -08:00
John MacFarlane
fde548f751 Beamer template: make \euro conditional on presence of character.
for xelatex and lualatex, as it is for pdflatex.

Andrew Dunning.
2015-12-04 08:02:27 -08:00
John MacFarlane
e5c72caf29 LaTeX template changes:
- only pass options to color package if colorlinks is set
- make definition of `\euro` conditional in xelatex/lualatex,
  as it is already for pdflatex

(Andrew Dunning)
2015-12-03 10:45:11 -08:00
John MacFarlane
7b66f84b80 Fixed man template so disabling hyphenation actually works.
The command needs to come after .TH.
2015-12-03 10:38:48 -08:00
John MacFarlane
16be932ddb context template: use simplefonts for font loading.
This is needed for things to work on ConTeXt stable from
TeXLive 2015.

Thanks to Pablo Rodríguez.
2015-11-20 14:46:21 -08:00
John MacFarlane
fbb81c4cb0 context template: Revert use of \setuphead in title block.
Thanks to Andrew Dunning and Rik Kabel.
2015-11-20 14:44:24 -08:00
John MacFarlane
e5573bca8f latex template changes.
* Removed setting of `subject` in PDF metadata.
  This used to be set to the subtitle, but really the subtitle
  need not give the subject.  Also, `subtitle` can contain formatting,
  so we'd need, at least, a plain text version for this.

* Moved `header-includes` before setting of `\title`, `\author`,
  etc.  This allows these macros to be redefined.

* Use `\subtitle` command for `subtitle`, instead of tacking it
  on to the title as before.  We give a no-op fallback definition if it is
  not defined.  This change should produce much better results
  in classes that support `\subtitle`.  With the default article
  class, which does not define `\subtitle`, subtitles will no
  longer be printed unless the user defines `\subtitle` and
  redefines `\maketitle`.

* Moved redefinitions of `\paragraph` and `\subparagraph` to
  before header-includes.
2015-11-20 14:40:27 -08:00
John MacFarlane
1f2c37392c Added 'navigation' variable to beamer template.
Valid values are `empty` (the default), `horizontal`, `vertical`,
and `frame`.  Note that this changes the default behavior from
`horizontal` to `empty`.  Closes #2543.
2015-11-17 10:55:55 -08:00
John MacFarlane
a081df1c41 reveal.js template: Fixed parallaxBackground options.
`parallaxBackgroundHorizontal` and `parallaxBackgroundVertical` need
integer values, not strings.  (Vaughn Iverson)
2015-11-16 07:48:09 -08:00
John MacFarlane
420c86b69a Allow more customization of opendocument styles.
Automatic styles can now be inserted in the template,
since the template, not the writer, now provides the
enclosing `<office:automatic-styles>` tags.

Closes #2520.
2015-11-14 17:19:25 -08:00
John MacFarlane
fe56af9cd3 ConTeXt and LaTeX templates: more cleanup (Andrew Dunning).
- Formatting of some conditionals is adjusted to provide cleaner spacing and
  punctuation in generated preamble.

- `$for$` is always provided where the user might want to use multiple options
  (does not change existing functionality).

- `hyperref` link rendering revised per discussion in
  a84f822c30:

    - the `hidelinks` option is now effectively the default (and has
      been removed as a separate option), rather than setting all links to
      black;
    - link colours can be enabled more easily (using a slightly darker version
      of the old Pandoc defaults) using a new `colorlinks` variable;
    - `pdfborder={0 0 0}` is automatically enabled in `hyperref` when
      `colorlinks` is enabled, and is now only applied.

- ConTeXt only:
    - microtype applied to both regular text and small caps;
    - `indenting` variable added;
    - renamed `style` to `linkstyle` for consistency (had not yet made it
      into the README through my oversight, which I will correct);
    - separated `linkcontrastcolor` from `linkcolor`;
    - matching LaTeX `hyperref` usage, only disable link styling rather
      than providing a specific setting.
2015-11-12 16:01:19 -08:00
John MacFarlane
893ba9863c Beamer template: added code to prevent slide breaks inside paragraphs.
This will matter, in practice, only when `allowframebreaks` is used.

It is especially helpful for bibliography slides.

Closes #2442. Thanks to Nick Bart for the solution.
2015-10-30 11:07:44 -07:00
John MacFarlane
d1ba023d9e Beamer template: fix incompatibility of section slides with natbib.
Natbib (and presumably biblatex) bibliography commands create
their own section.  Since these are in frame environments,
we have an incompatibility with the `\AtBeginSection` macro
which creates a special frame when a new section occurs.
(We can't have a frame inside another frame.)

This change disables `\AtBeginSection` inside bibliography
slides.

Thinks to Yihui Xie for bringing the problem to my attention.
This supersedes #145.  See discussion there.
2015-10-29 10:21:56 -07:00
John MacFarlane
7d4f174047 Template improvements (Andrew Dunning).
- Added `keywords` to HTML templates and fixed alignment.
- Updated dzslides template from source.
- Added `lang`, `dir`, `quotes` to HTML templates;
  always make author and date display conditional.
- Fixed `author` and `date` in asciidoc; added `keywords`, `abstract`.
- Updated tests.
2015-10-25 12:28:28 -07:00
John MacFarlane
273853d5b8 LaTeX template: simplify hyperref usage.
Andrew Dunning.  #139.
2015-10-20 14:59:54 -07:00
John MacFarlane
eae24903ba ConTeXt template: link color to black, define all sections.
Andrew Dunning.
2015-10-20 13:39:01 -07:00
John MacFarlane
48aaf1bced Updated latex, beamer templates to support language divs/spans.
Mainly this adds a template variable that can be filled
by commands that make babel understand the polyglossia-style
language directives.

Thanks to mb21.
2015-10-19 23:03:26 -07:00
John MacFarlane
b2bf8608db HTML-based templates: Use en dash between title prefix & title.
Instead of a hyphen.
(Andrew Dunning.)
2015-10-18 21:51:49 -07:00
John MacFarlane
3b8793304e Man template: make "generated by" comment conditional.
This allows it to be disabled for automated tests, so
they needn't be updated every version bump.
2015-10-18 11:51:30 -07:00
John MacFarlane
3f9dd65572 reveal.js template changes (Andrew Dunning).
- Add width, height variables to reveal.js.

- Update reveal.js template from 3.1 source.
  All configuration options are now available as variables,
  but are only be included if set (reveal.js uses defaults
  otherwise).
2015-10-14 20:47:18 -07:00
John MacFarlane
de77bc730a LaTeX template: Add fontenc, indent, subparagraph variables.
Thanks to Andrew Dunning.
2015-10-14 10:06:41 -07:00
John MacFarlane
309ff7a6da Template changes:
- Move HTML5 shiv after CSS (Andrew Dunning).
- Fix HTML5 shiv URL (Andrew Dunning).
- Add dir attribute in html5 (Andrew Dunning).
- Realign beamer and LaTeX templates (Andrew Dunning).
2015-10-13 20:35:18 -07:00
John MacFarlane
e3a5abc64f Removed xltxtra, xunicode from LaTeX template.
Thanks Andrew Dunning.

Updated tests and changelog.
2015-10-10 16:12:50 -07:00
John MacFarlane
3cce552ff3 reveal.js template: add controls, progress variables.
Thanks to Grégoire Pineau.
2015-10-10 14:06:30 -07:00
John MacFarlane
e92fc4455b Adjusted latex template for changes to polyglossia-lang variable. 2015-10-10 13:53:42 -07:00
John MacFarlane
ce07f1bd68 Man template improvements:
- Added comment stating that the page is autogenerated by
  pandoc, giving version.
- Added `adjusting` and `hyphenate` variables.
- Documented new variables.
2015-10-10 13:15:58 -07:00
John MacFarlane
1eda820c04 Beamer template: Added space after colon in figure caption. 2015-10-07 09:48:39 -07:00
John MacFarlane
15a5993f2e Updated latex template to work better with tufte...
and other packages that include hyperref or color.

Thanks to Xavier Olive.
2015-10-04 21:44:07 -07:00
John MacFarlane
6d0e586b2d Template updates.
Beamer:  added `innertheme`, `outertheme` variables.

LaTeX:  added `mainfontoptions`, `sansfontoptions`,
`monofontoptions`, `mathfontoptions`, `fontfamilyoptions`.
2015-10-03 17:01:01 -07:00
John MacFarlane
4443af4d8d Beamer template: allow setting outer/inner theme. 2015-09-29 10:00:57 -07:00
John MacFarlane
0a2773bd1b Changes to templates to support handling of bidirectional text.
(LaTeX, ConTeXt, HTML)
2015-09-26 17:07:48 -07:00
John MacFarlane
8a43530380 LaTeX, ConTeXt templates: more specific language variables.
Instead of directly using `lang`, we now use `babel-lang` and
`polyglossia-lang` and `context-lang`.  These variables are set by
the writers to the necessary values, based on the `lang` variable
(which now always takes a value in BCP47 format).
2015-09-25 10:37:12 -07:00
John MacFarlane
f2f35224f6 sample.lua - define CaptionedImage, add newline at end.
Cloess #2393.
2015-09-15 09:28:18 -07:00
John MacFarlane
8883261b6e Merge pull request #2352 from ousia/master
added selectors for nested emphasis (epub.css)
2015-08-16 10:16:03 -07:00
John MacFarlane
73824908aa Added --bash-completion option.
This generates a bash completion script.

To use:

     eval "$(pandoc --bash-completion)"
2015-08-13 15:27:47 -07:00
John MacFarlane
ef18b83c58 LaTeX template: reverted change in abstract position. 2015-08-11 11:47:11 -07:00
John MacFarlane
788cea9133 Revert "LaTeX template: move abstract to before \maketitle."
This reverts commit aa08b4cd67.
2015-08-11 11:44:21 -07:00
John MacFarlane
aa08b4cd67 LaTeX template: move abstract to before \maketitle.
See
http://tex.stackexchange.com/questions/139469/to-have-abstract-in-the-docu
ment-class-revtex
2015-08-09 09:45:32 -07:00
Pablo Rodríguez
74d37517eb added selectors for nested emphasis (epub.css) 2015-08-07 22:32:36 +02:00
John MacFarlane
47a2dab137 Merge pull request #2303 from hftf/h6
Add missing Heading 6 style in reference Docx
2015-07-15 18:15:12 -07:00
Ophir Lifshitz
cfa68c689f Reference Docx: Add missing Header 6 style (steel blue)
Based on Header 4 (bold, steel blue) and Header 5 (italic, steel blue)
2015-07-15 19:12:56 -04:00
Ophir Lifshitz
c0c7f8377d Reference Docx: Correct outlineLvl for Header styles
Not sure if this actually affects anything
2015-07-15 19:11:01 -04:00
John MacFarlane
1668e8ef03 Updated dzslides template. 2015-07-13 22:46:49 -07:00
John MacFarlane
a72a026d04 ConTeXt template: activate hanging indent for definition lists.
(mb21)
2015-07-06 16:56:46 -07:00
John MacFarlane
a04c15a422 New method for building man pages.
+ Removed `--man1`, `--man5` options (breaking change).
+ Removed `Text.Pandoc.ManPages` module (breaking API change).
+ Version bump to 1.15 because of the breaking changes, even
  though they involve features that have only been in pandoc
  for a day.
+ Makefile target for `man/man1/pandoc.1`.  This uses pandoc to
  create the man page from README using a custom template and filters.
+ Added `man/` directory with template and filters needed to build
  man page.
+ We no longer have two man pages: pandoc.1 and pandoc_markdown.5.
  Now there is just pandoc.1, which has all the content from README.
  This change was needed because of the extensive cross-references
  between parts of the README.
+ Removed old `data/pandoc.1.template` and
  `data/pandoc_markdown.5.template`.
2015-07-01 11:27:15 -07:00
John MacFarlane
fe625e053d New method for producing man pages.
This change adds `--man1` and `--man5` options to pandoc, so
pandoc can generate its own man pages.

It removes the old overly complex method of building a separate
executable (but not installing it) just to create the man pages.

The man pages are no longer automatically created in the build
process.

The man/ directory has been removed.  The man page templates
have been moved to data/.

New unexported module:  Text.Pandoc.ManPages.

Text.Pandoc.Data now exports readmeFile, and `readDataFile`
knows how to find README.

Closes #2190.
2015-06-28 14:39:17 -07:00
John MacFarlane
6f527e1f1a Updated LaTeX template: CJKoptions variable, allow dvipsnames for colors.
Thanks to Xavier Olive.

The addition of the `CJKoptions` variable allows one to set (e.g.)
a bigger font size for Asian fonts than latin ones.

Including dvipsnames allows specifying colors like MidnightBlue
for link colors.  This brings in a dependency on the color package,
but it is a standard package and required anyway by graphics.
2015-06-27 18:07:49 -07:00
John MacFarlane
602130259d Added CJKmainfont to latex template (Xavier Olive). 2015-06-13 09:35:33 -07:00
John MacFarlane
e69bf25ede epub templates: use 'author.role', not 'author.type'. 2015-06-13 09:33:32 -07:00
John MacFarlane
6f79cf1983 Added default commonmark template. 2015-06-02 13:22:27 +02:00
John MacFarlane
3a9d5d878c make-reference-files: use proper path separators for Windows.
Fixes a bug with reference.docx and reference.odt in Windows
builds.
2015-05-28 09:59:08 -07:00
John MacFarlane
68b460db92 LaTeX template: Move hyperref before polyglossia.
This avoids an error "Please load package hyperref before bidi package,
and then try to run xelatex on your document again".  See
jgm/pandoc-templates #96.
2015-05-27 12:30:10 -07:00
John MacFarlane
4a9aaf6fd6 LaTeX/beamer: added setotherlanguages in polyglossia.
This uses an `otherlang` variable that takes a list of languages.

As requseted in #2174.
2015-05-27 12:15:50 -07:00
John MacFarlane
734b0bc2fb Revealjs: allow 'center' to be set to false. 2015-05-27 11:04:38 -07:00
John MacFarlane
a3d1f365bc Template changes.
* Use polyglossia with xelatex in beamer (#85).
* Provide `\tightlist` in beamer template (Anders Persson).
* Add toccolor variable to control link color in toc (Kaixhin).
2015-05-27 10:39:55 -07:00
John MacFarlane
4560447041 Don't use sup element for epub footnotes.
Instead, just use an a element with class `footnoteRef`.
This allows more styling options, and provides better results
in some readers (e.g. iBooks, where anything inside the a
tag breaks popup footnotes).

Closes #1995.
2015-05-11 21:58:01 -07:00
John MacFarlane
f0817e1952 LaTeX, Beamer templates: use bibliography instead of biblio-files.
Also use `\addbibresource` instead of `\bibliography` for biblatex.

See #1661.
2015-05-11 21:15:22 -07:00
John MacFarlane
c59e3e53e5 Fixed accidental reversion to earlier templates version.
From last commit.
2015-05-10 08:36:12 -07:00
John MacFarlane
60bf4a8bfb Improved warnings when image size can't be determined.
Closes #1834.
2015-05-09 23:56:53 -07:00
John MacFarlane
15d16e8456 LaTeX template: degrade gracefully if \paragraph not defined. 2015-05-03 22:04:24 -07:00
John MacFarlane
f420325273 latex template: use providecommand for tightlist.
This avoids a conflict when memoir class is used.
Thanks to Joseph Harriott.
2015-05-02 09:09:11 -07:00
John MacFarlane
764f677530 Merge branch 'latex-tightlist' of https://github.com/jlduran/pandoc into jlduran-latex-tightlist
Conflicts:
	data/templates
2015-04-17 19:23:13 -07:00
John MacFarlane
9ad336f586 LaTeX template: redefine \paragraph, \subparagraph...
to behave more like section headers.  Closes #1658.
2015-04-17 18:51:36 -07:00
John MacFarlane
c5acaec3b5 LaTeX template: include grffile together with graphicx.
This properly handles filenames containing spaces and dots.
Closes #2074.
2015-04-13 09:00:55 -07:00
John MacFarlane
6a83773f03 OpenDocument template: use text:p instead of text:h for title.
Using `text:h` causes problems with numbering.  Closes #2059.
Thansk to @nkalvi for diagnosing this.
2015-04-12 21:29:53 -07:00
Nikolay Yakimov
b2ba922638 ODT Writer: Figure captions
Works pretty much the same as Word writer.

Following styles are used for figures:

Figure -- for figure with empty caption
FigureWithCaption (based on Figure) -- for figure with caption
FigureCaption (based on Caption) -- for figure captions

Also, TableCaption (based on Caption) is used for table captions.

We need FigureWithCaption to set keepWithNext, in order to keep caption
with figure.
2015-04-12 00:34:03 +03:00
John MacFarlane
28497d484e RST writer: better handling of raw latex inline.
We use `` :raw-latex:`...` `` and add a definition for this
role to the template.

Closes #1961.
2015-04-07 22:07:38 -07:00
John MacFarlane
ca6a8d62f2 epub, epub3: added header-includes, include-before, include-after.
Closes #1987.
2015-04-07 21:11:43 -07:00
John MacFarlane
394cf3365f reveal.js template: move custom css after theme.
This allows custom css to modify themes, instead of being replaced
by themes.
2015-04-07 20:31:43 -07:00
John MacFarlane
cde1f3b6b4 reveal.js template: add new configurable options.
(Dmitry Smirnov, jgm/pandoc-templates#89)

  * Made option "center" configurable.
  * Added new options "maxScale" and "slideNumber".
  * Added comments to existing options.
2015-03-31 15:49:10 -07:00
John MacFarlane
2b2f7fe15e Merge pull request #2035 from lierdakil/issue2031
Docx Writer/Reference: Add keepNext to objects w/ captions
2015-03-30 20:30:15 -07:00
Nikolay Yakimov
79be04df69 Add toc heading style to reference.docx 2015-03-29 09:03:33 +03:00
Nikolay Yakimov
78cf36a392 Reference Docx: Add keepNext to table captions 2015-03-29 08:02:23 +03:00
Nikolay Yakimov
69d5085c11 Docx Writer: Add a style to figure images
Figures with empty captions use style "Figure"

Figures with nonempty captions use style "Figure with Caption", which is
based on "Figure", and additionally has keepNext set.
2015-03-29 08:02:18 +03:00
Nikolay Yakimov
d20add5b01 Reference Docx: update word/footnotes.xml 2015-03-29 05:59:09 +03:00
Nikolay Yakimov
d744b83b61 Create reference files from unpacked archives with helper program 2015-03-28 10:36:53 -07:00
Nikolay Yakimov
1710c4bd8b Add unpacked reference data 2015-03-28 10:26:08 -07:00
Nikolay Yakimov
f10a8a3239 Remove pre-built reference files 2015-03-28 10:26:08 -07:00
Nikolay Yakimov
1cb601d288 Update reference.docx
Following styles are set as custom:
* Author
* Abstract
* Compact
* Image Caption
* Table Caption
* Definition Term
* Definition
* First Paragraph

Following styles are renamed to correspond with Word Normal.dotm
* Block Quote -> Block Text
* Link -> Hyperlink
* Footnote Ref -> Footnote Reference

Following styles added:
* Caption

Following styles' inheritance changed:
* Image Caption <- Caption
* Table Caption <- Caption
2015-03-01 18:45:19 +03:00
John MacFarlane
e8cd53d1c9 Fixed revealjs template so style css is correctly included.
Closes #1949.
2015-02-16 19:57:37 -08:00
Jesse Rosenthal
ba59e5447f Docx writer: Add footnotes id -1 and 0.
Word uses, by default, footnotes with id -1 and 0 for separators. If a
user modifies reference.docx, they will end up with a settings.xml file
that references these footnotes, but no such footnotes in the
document. This will produce a corruption error. Here we add these to the
document and settings.xml file, so future modifications won't break the file.
2015-02-12 09:21:41 -05:00
Jesse Rosenthal
c2f32f4e8f Docx Writer: Alter Blockquote style slightly.
Since blockquote derives from BodyText, we just want to specify by
default that it won't indent, regardless of what BodyText does. Note
that this will not produce any visible difference in the default
configuration.
2015-02-11 15:06:48 -05:00
Jesse Rosenthal
f703198bc9 Docx Writer: Update reference.docx
This updates reference.docx to make BodyText a quick style, and inherit
from it appropriately.
2015-02-11 15:06:48 -05:00
Jesse Rosenthal
d623a5c7e9 Added FirstParagraph to docx templates. 2015-02-09 23:22:59 -05:00
John MacFarlane
24573b6a5a revealjs template - link to non-minified css, js.
The minified versions no longer ship with the library.
2015-01-20 17:20:01 -08:00
John MacFarlane
c63020d5f2 Remove SourceCode style from reference.docx.
This is added automatically by the docx writer.

If it's in the template, we'll get two copies.

See #1872.
2015-01-12 08:32:37 -08:00
John MacFarlane
3de830e4e2 EPUB templates: use div, not p, for "rights" on title page. 2014-12-28 11:26:14 -08:00
John MacFarlane
7a5cb29319 Really fix #1758. Add id="cover" to body on cover page.
Not title page!
2014-11-17 15:43:40 -08:00
John MacFarlane
65db0ede88 Removed extra body tag from epub3 template.
This fixes a bug introduced by the previous fix.
2014-11-16 21:12:25 -08:00
John MacFarlane
e1d6c73327 epub, epub3 templates: Added id="cover" to body of titlepage.
This aids styling, making it possible for example to set 0 margins
on the title page.  Closes jgm/pandoc#1758.
2014-11-16 20:58:59 -08:00
John MacFarlane
47898c54af LaTeX template: Add shorthands=off to babel options.
Closes #1648.
2014-09-27 17:05:58 -07:00
John MacFarlane
89ab95b5fc LaTeX template: load polyglossia before bibtex.
Fixes jgm/pandoc-templates#70.
Thanks to bluebirch.
2014-09-26 15:32:13 -07:00
John MacFarlane
cfda93a283 LaTeX template: Added \VerbatimFootnotes if there is verbatim in notes.
Fixes a bug when there is verbatim inside notes.
Closes #1616.
2014-09-09 09:36:32 -07:00
Jose Luis Duran
9557eb6f8e LaTeX writer: Use a declaration for tight lists
Currently, pandoc has hard-coded the following in order to make tight lists in
LaTeX:

```hs
text "\\itemsep1pt\\parskip0pt\\parsep0pt"
```

Which is fine, but does not allow customizations.  For example, the `memoir`
class already has a `\tightlist` declaration for this purpose:

```tex
\newcommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
```

I'm proposing to use a similar solution:

```diff
@@ In Writers/LaTeX.hs:
-then text "\\itemsep1pt\\parskip0pt\\parsep0pt"
+then text "\\tightlist"

@@ In templates/default.latex:
+\newcommand{\tightlist}{%
+  \setlength{\itemsep}{1pt}\setlength{\parskip}{0pt}\setlength{\parsep}{0pt}}
```

This allows us to customize the tightness to our needs.

Backward Compatibility

If a person is using a custom LaTeX template (not based upon the `memoir`
class), the `\tightlist` declaration must be added.
2014-09-01 05:08:24 +00:00
John MacFarlane
d1948ce012 EPUB, EPUB3 templates: Handle structured metadata on titlepage.
Previously we just expected 'title', 'subtitle', 'author', 'date'.
Now we still support those, but also support the format recommended
for epub metadata in the pandoc README:

    ---
    title:
    - type: main
      text: My Book
    - type: subtitle
      text: An investigation of metadata
    creator:
    - role: author
      text: John Smith
    - role: editor
      text: Sarah Jones
    identifier:
    - scheme: DOI
      text: doi:10.234234.234/33
    publisher:  My Press
    rights:  (c) 2007 John Smith, CC BY-NC
    ...
2014-08-31 12:01:55 -07:00
John MacFarlane
0ef1f787c7 Docx writer: Bibliography entries get Bibliography style.
Closes #1559.
2014-08-23 20:52:09 -07:00
John MacFarlane
27ea34489a LaTeX template: disable microtype protrusion for typewriter font.
Closes #1549. Thanks to lemzwerg.
2014-08-20 08:17:10 -07:00
John MacFarlane
eab5fbb4fd Fixed typo in templates README. 2014-08-17 09:57:41 -07:00
John MacFarlane
118cdad8e8 Updated README in templates to indicate templates license.
The templates are duel licensed, BSD3 and GPL2+.
2014-08-16 16:48:46 -07:00
John MacFarlane
6e4c60ea28 EPUB3 template: add epub:type annotation in titlepage. 2014-08-13 16:57:28 -07:00
Jesse Rosenthal
dca55630e6 Docx Reader: Trim line breaks from the beginning and end of Section
Headers.

We might also want to do this elsewhere (for pars, for example).
2014-08-12 23:42:01 -04:00
John MacFarlane
5b1d841a6f epub3 template: Put title page in section with epub:type titlepage. 2014-08-12 17:07:12 -07:00
John MacFarlane
33a051d00d Docx writer: Print subtitle from metadata if present.
Use Subtitle style.

See #1451.
2014-07-29 20:46:55 -07:00
John MacFarlane
2610de0159 Docx writer: include abstract with Abstract style.
Addresses docx part of #1451.
2014-07-26 22:55:45 -07:00
John MacFarlane
64c7a0ab76 Include lot and lof variables in latex template.
These can be set to get `\listoftables` and `\listoffigures`.
Closes #1407.

At this point we won't add a command line argument, because
this only affects one writer.  But the variables can be set
at the command line with

    -Vlof -Vlot

or in YAML metadata.
2014-07-20 21:58:16 -07:00
John MacFarlane
0e9d3db244 Custom writers now work with --template.
Removed HTML header scaffolding from data/sample.lua.
2014-07-16 15:17:08 -07:00
John MacFarlane
2a881541a0 Made Citation information available in lua custom writer. 2014-07-16 09:32:41 -07:00
John MacFarlane
7d6da118d3 Added type attribute to link tags in epub3 template.
They are supposed to be only "advisory" in HTML5, but apparently
kindlegen needs them.
2014-07-08 00:24:17 -06:00
Clare Macrae
717e16660d Merge remote-tracking branch 'jgm/master' into dokuwiki 2014-06-29 19:22:31 +01:00
Clare Macrae
fccfc8429c Updated to latest version of jgm/pandoc-templates - including default.dokuwiki 2014-06-28 21:57:21 +01:00
Clare Macrae
0f41c6de08 Updated to latest version of jgm/pandoc-templates 2014-06-28 21:02:53 +01:00
John MacFarlane
0d364a284d Added haddock template. 2014-06-18 17:49:32 -07:00
John MacFarlane
e78db3caf6 Updated default latex template so \subtitle works properly.
Closes #1327.
2014-06-09 22:33:56 -07:00
John MacFarlane
438ccbe2e6 Removed header1.xml, footer1.xml from reference.docx. 2014-06-01 21:32:15 -07:00
John MacFarlane
6848f642e8 Docx writer: Header and footer are now carried over from reference.docx. 2014-06-01 21:17:00 -07:00
John MacFarlane
c8bc70a6bb LaTeX/Beamer templates: remove conditional around date.
Closes #1321.
2014-06-01 15:28:10 -07:00
John MacFarlane
d508c554f7 LaTeX template: Added linestretch variable.
Documented this and fontfamily.
2014-05-06 10:48:31 -07:00
John MacFarlane
ddb47ef6e8 Added fontfamily variable to latex template. (tlvince) 2014-05-06 09:55:43 -07:00
John MacFarlane
250537532a Updated templates: conditionalize author/date in latex template. 2014-05-06 09:49:13 -07:00
John MacFarlane
1134950858 Update latex/beamer templates: load upquote after fontenc. 2014-05-06 09:06:25 -07:00
John MacFarlane
9ea9b916af Use \setkeys{Gin}{} to set appropriate defaults for \includegraphics.
In pandoc and beamer templates. Thanks to Yihui Xie.
2014-04-30 23:25:07 -07:00
gwern
17d105a8a4 MathMLinHTML: Fix deprecation warning
The use of `nodeValue` on `Attr` objects causes a deprecation warning in
Firefox since version 7.  This patch causes calls to `value` instead of
`nodeValue` for all `Attr` objects.

This closes #362.
2014-04-20 08:53:59 +02:00
John MacFarlane
8bc09ce6c7 Beamer template: Consistent styles for figure and table captions
Thanks to aaronwolen.
2014-04-11 11:12:13 -07:00
John MacFarlane
a6b6ec7be3 Beamer template: Adjust widths correctly for oversized images.
Thanks to Garrick Aden-Buie for the patch.
2014-04-11 10:52:26 -07:00
John MacFarlane
e35ebd3239 Fixed PDF print function in reveal.js template.
Closes #1220.  Thanks to kevinkenan.
2014-04-05 15:24:05 -07:00
John MacFarlane
8c014967c6 DocBook template: use authorgroup if there are authors. 2014-04-04 21:43:17 -07:00
John MacFarlane
e97217f234 Added caption package to default beamer template. Closes #1200. 2014-04-04 13:13:28 -07:00
John MacFarlane
818894b7b5 beamer template: changes for better unicode handling.
Ported from LaTeX template.  Thanks to KarolS for the patch.
2014-03-19 11:11:41 -07:00
John MacFarlane
49a80e1652 Added default.icml to templates. 2014-03-04 10:29:19 -08:00
John MacFarlane
dc390258cb default.latex template: use fontenc package only for pdflatex.
See #1164.
2014-02-20 09:37:02 -08:00
John MacFarlane
5a8a247c3a Move include-after to end in revealjs template. (certainlyakey) 2014-02-18 15:36:56 -08:00
John MacFarlane
bb0f942463 reference.odt: Tidied styles.xml. 2014-01-02 12:54:33 -08:00
John MacFarlane
073b3576d0 reference.docx: Include 'FootnoteText' style.
Otherwise Word ignores the style, even when specified in the pPr element.

I believe this should help with issue #901.  You should now get
'FootnoteText' as the style of the footnote.  You'll have to adjust
the style yourself; it's currently just the same as Normal.
2013-12-27 13:54:27 -08:00
John MacFarlane
3b79246c85 Allow use of \includegraphics[size] in beamer.
This just required porting a macro definition from the default
latex template to the default beamer template.
2013-12-13 21:42:53 -08:00
John MacFarlane
b2aae73f14 Added Cite function to sample.lua. 2013-12-13 11:19:49 -08:00
John MacFarlane
46b37b4ddc latex template: Put header-includes after title.
Closes #908.
2013-12-11 22:35:33 -08:00
John MacFarlane
225bd8d599 default latex template: added abstract variable. 2013-12-11 22:05:59 -08:00
John MacFarlane
571480eb4a Updated beamer template for booktabs. 2013-12-09 19:45:51 -08:00
John MacFarlane
eebb15ba1d Use latest pandoc-templates. 2013-12-03 20:56:11 -08:00
Jose Luis Duran
fdaeec0c48 Add booktabs package for LaTeX tables
[ci skip]
2013-12-04 04:26:22 +00:00
John MacFarlane
bb0f299165 ConTeXt writer: Don't hardcode figure/table placement.
Instead, let this be set in the template, using `\setupfloat`.
Thanks to Aditya Mahajan for the suggestion.
2013-11-30 16:16:35 -08:00
John MacFarlane
526762bf22 ConTeXt writer: Use setupcaption to separate style from content.
Instead of adding 'nunumber' every time we place a figure...

Closes #1067.
2013-11-22 19:51:07 -08:00
John MacFarlane
d84624f775 Updated beamer template.
Now references should work properly (in a slide) when
`--biblatex` or `--natbib` is used.
2013-10-21 14:31:19 -07:00
John MacFarlane
e2acc46f50 Removed data files for s5, slideous, slidy.
Users of s5 and slideous will have to download the needed
files, as has been documented for some time in the README.

slidy files will be sought on the web, as before.
2013-10-20 13:35:04 -07:00
John MacFarlane
d76a6e2372 OpenDocument writer: don't use font-face-decls variable. 2013-09-24 18:41:43 -07:00
John MacFarlane
f5726924c5 HTML5 template: Add meta tag to allow user scaling.
(Erik Evenson)
2013-09-07 22:58:04 -07:00
John MacFarlane
deb59b6235 Removed dependency on citeproc-hs.
Going forward we'll use pandoc-citeproc, as an external filter.

The `--bibliography`, `--csl`, and `--citation-abbreviation` fields
have been removed.  Instead one must include `bibliography`, `csl`,
or `csl-abbrevs` fields in the document's YAML metadata.  The filter
can then be used as follows:

    pandoc --filter pandoc-citeproc

The `Text.Pandoc.Biblio` module has been removed.  Henceforth,
`Text.CSL.Pandoc` from pandoc-citations can be used by library users.

The Markdown and LaTeX readers now longer format bibliographies and
citations.  That must be done using `processCites` or `processCites'`
from Text.CSL.Pandoc.

All bibliography-related fields have been removed from `ReaderOptions`
and `WriterOptions`: `writerBiblioFiles`, `readerReferences`,
`readerCitationStyle`.

API change.
2013-08-24 22:33:01 -07:00
John MacFarlane
544d0bbf31 reference.odt: Change generator in meta.xml to Pandoc. 2013-08-11 17:19:22 -07:00
John MacFarlane
eb0c0b86ed ODT/OpenDocument writer: Minor changes for ODF 1.2 conformance.
See #939.  We leave the nonconforming contextual-spacing attribute,
which is provided by LibreOffice itself and seems to be supported.
2013-08-11 17:13:46 -07:00
John MacFarlane
e9de0f0e22 Preliminary support for new Div and Span elements in writers.
Currently these are "transparent" containers, except in HTML,
where they produce div and span elements with attributes.
2013-08-08 23:14:12 -07:00
John MacFarlane
208a9e076d Beamer template: Added fonttheme variable. 2013-08-06 18:08:38 -07:00
John MacFarlane
a5df042e28 LaTeX template: Added biblio-style variable.
Closes #920.
2013-07-20 10:53:11 -07:00
John MacFarlane
7d75b913bd LaTeX/Beamer template: Added classoption variable.
This is intended for class options like `oneside`; it may
be repeated with different options.  Thanks to Oliver Matthews.
2013-07-17 15:06:43 -07:00
John MacFarlane
cd399d1b9d Updated sample.lua for new metadata. 2013-07-14 20:43:21 -07:00
Clare Macrae
7eded47bcd Initial work to create dokuwiki writer (#386)
In this first version, all dokuwiki files are straight copies of the
media wiki counterparts.
2013-07-14 13:40:27 +01:00
John MacFarlane
851703044e Simplified margin fields in default epub CSS file. 2013-07-13 14:48:14 -07:00
John MacFarlane
7445fc5382 Default epub CSS: Removed highlighting styles.
These are added automatically to individual chapter files,
depending on the highlighting style selected on the command line.
2013-07-13 14:45:12 -07:00
John MacFarlane
9d9390a75a default.latex: Use tex-ansi mapping for monofont.
This ensures that straight quotes appear as straight, rather than
being treated as curly.  See #889.
2013-07-04 14:50:14 -07:00
John MacFarlane
644e3239a9 Custom writer: Pass full metadata, not just tit/auth/date. 2013-06-27 22:55:10 -07:00
John MacFarlane
dd96213c05 Man writer: give more fine-grained control in template.
Now the `title`, `section`, `header`, and `footer` can all be set
individually in metadata.  The `description` variable has been
removed.

Quotes have been added so that spaces are allowed in the title.

If you have a title that begins

    COMMAND(1) footer here | header here

pandoc will parse it as before into a title, section, header, and
footer.  But you can also specify these elements explicitly.

Closes #885.
2013-06-27 19:32:28 -07:00
John MacFarlane
f7f32af293 Use latest chicago-author-date.csl. 2013-06-25 22:37:03 -07:00
John MacFarlane
f869f7e08d Use new flexible metadata type.
* Depend on pandoc 1.12.
* Added yaml dependency.
* `Text.Pandoc.XML`: Removed `stripTags`.  (API change.)
* `Text.Pandoc.Shared`:  Added `metaToJSON`.
  This will be used in writers to create a JSON object for use
  in the templates from the pandoc metadata.
* Revised readers and writers to use the new Meta type.
* `Text.Pandoc.Options`: Added `Ext_yaml_title_block`.
* Markdown reader:  Added support for YAML metadata block.
  Note that it must come at the beginning of the document.
* `Text.Pandoc.Parsing.ParserState`:  Replace `stateTitle`,
  `stateAuthors`, `stateDate` with `stateMeta`.
* RST reader:  Improved metadata.
  Treat initial field list as metadata when standalone specified.
  Previously ALL fields "title", "author", "date" in field lists
  were treated as metadata, even if not at the beginning.
  Use `subtitle` metadata field for subtitle.
* `Text.Pandoc.Templates`:  Export `renderTemplate'` that takes a string
  instead of a compiled template..
* OPML template:  Use 'for' loop for authors.
* Org template: '#+TITLE:' is inserted before the title.
  Previously the writer did this.
2013-06-24 20:29:41 -07:00
John MacFarlane
96f25f924a Latest template changes: title attribute on title section in dzslides. 2013-06-02 14:39:26 -07:00
John MacFarlane
2e3eb9ef6a Made \includegraphics more flexible in LaTeX template.
Now it can be used with options, if needed.

Thanks to Bernhard Weichel.
2013-05-07 17:42:35 -07:00
John MacFarlane
9b0bd19632 Fixed errors in revealjs template. 2013-05-01 12:45:49 -07:00
John MacFarlane
c36f3b46e1 revealjs templates: use query hashes for defaults, include remotes. 2013-04-30 17:34:36 -07:00
John MacFarlane
466cc17664 LaTeX template: Changes to make mathfont work with xelatex.
We need the mathspec library, not just fontspec, for this.
We also need to set options for setmathfont.  Closes #734.
2013-04-25 21:07:26 -07:00
John MacFarlane
f34ccf900f DocBook template: Use DocBook 4.5 doctype. 2013-04-15 19:41:45 -07:00
John MacFarlane
4fa2a94759 Added Text.Pandoc.Writers.Custom, --print-custom-lua-writer.
pandoc -t data/sample.lua

will load the script sample.lua and use it as a custom writer.
data/sample.lua is provided as an example.

Added `--print-custom-lua-writer` option to print the sample
script.
2013-04-14 00:31:39 -05:00
John MacFarlane
72020f1773 Docx writer: Use Compact style for Plain block elements.
This differentiates between tight and loose lists.
Closes #775.
2013-03-30 22:11:00 -07:00