Commit graph

326 commits

Author SHA1 Message Date
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
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
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
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
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
John MacFarlane
7359ce60e5 Add hypersetup options to beamer templates (Jake Zimmerman). 2016-10-25 16:01:48 +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
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
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
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
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
John MacFarlane
a72a026d04 ConTeXt template: activate hanging indent for definition lists.
(mb21)
2015-07-06 16:56:46 -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
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
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
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
e8cd53d1c9 Fixed revealjs template so style css is correctly included.
Closes #1949.
2015-02-16 19:57:37 -08: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
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
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
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
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
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
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
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
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
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
942b7b8f9c Slidy: Use slidy.js rather than slidy.js.gz.
Reason:  some browsers have trouble with the gzipped js file,
at least on the local file system.

Closes #795.
2013-03-25 19:48:42 -07:00
John MacFarlane
f2f3c3301f revealjs template: include pdf stylesheet by default. 2013-03-24 19:57:53 -07:00
John MacFarlane
388acaa5f1 New revealjs template. 2013-03-23 21:46:09 -04:00
John MacFarlane
df78a9935d Updated templates to include reveal.js. 2013-03-22 01:17:28 -04:00
Jamie F. Olson
6b53a905c4 Added basic support for reveal.js.
Support unordered and ordered lists with "fragment" elements.

Modified by JGM to remove the --reveal_js-url command-line option.
Instead use -V reveal_js-url=... as with slidy and the other slide
formats.  Also cleaned up the list code in the HTML writer.
2013-03-21 14:54:17 -07:00
John MacFarlane
5b4d239b85 Added OPML template, tests.
Minor fixes to OPML writer.
Improved OPML reader tests.
2013-03-20 10:17:59 -07:00
John MacFarlane
b2b38a6c0f beamer template: Provide \Oldincludegraphics as in LaTeX template.
The template redefines `\includegraphics` to give special treatment
for too-wide images.  But this causes problems for literal uses
of `\includegraphics`. This change allows authors to use
`\Oldincludegraphics`, as in the latex template.
2013-03-03 17:20:03 -08:00
John MacFarlane
1a09a0b921 LaTeX template: Load microtype after fonts.
Microtype needs to know what fonts are being used.
Thanks to dfc for the patch.
2013-02-27 09:52:26 -08:00
John MacFarlane
5aaead0afa Small spacing change in context template. 2013-02-20 09:59:16 -08:00
John MacFarlane
bd0a188cc8 ConTeXt template: Use \placecontent for toc.
Configure it for toc depth.  Thanks to Aditya Mahajan.
2013-02-20 06:38:37 -08:00
John MacFarlane
25988ea3f0 ConTeXt writer: Removed \placecontent.
This produced a duplicate toc, in conjunction with `\placelist`.
2013-02-19 21:57:08 -08:00
John MacFarlane
f9e6433d24 LaTeX template: set secnumdepth to 5 if --number-sections specified.
This yields behavior equivalent to the other writers, numbering
level 4 and 5 headers too.

Closes #753.
2013-02-18 08:50:25 -08:00
John MacFarlane
111ce7ec87 Beamer template: Lines to fix captions with longtable.
Thanks to Joost Kremers.
2013-02-03 10:42:52 -08:00
John MacFarlane
f468db9277 LaTeX template: Use \urlstyle{same} to avoid monospace URLs. 2013-01-21 11:52:00 -08:00
John MacFarlane
83a4e50f76 Updated templates.
Use upquote package if it exists.
2013-01-19 09:40:46 -08:00
John MacFarlane
8eab759a9c RTF writer: Added writeRTFWithEmbeddedImages.
* RTF writer:  Export writeRTFWithEmbeddedImages instead of
  rtfEmbedImage.
* Text.Pandoc: Use writeRTFWithEmbeddedImages for RTF.
* Moved code for embedding images in RTF out of pandoc.hs.
2013-01-18 10:33:37 -08:00
John MacFarlane
eebed6bc48 Added writerHtmlQTags and --html-q-tags option.
The previous default was to use `<q>` tags in HTML5.
But `<q>` tags are also valid HTML4, and they are not very
robust in HTML5.  Some user agents don't support them,
and some CSS resets prevent pandoc's quotes CSS from working
properly (e.g. bootstrap).  It seems a better default just
to insert quote characters, but the option is provided  for
those who have gotten used to using `<q>` tags.
2013-01-15 18:50:36 -08:00
John MacFarlane
4343f0dbcd Implemented --toc-depth (and --toc!) for RTF writer. 2013-01-05 18:23:51 -08:00
John MacFarlane
65d01857fb Support --toc-depth in context writer. 2013-01-05 18:15:34 -08:00
John MacFarlane
c45ae571cc Changed --toc-level to --toc-depth. 2013-01-05 12:03:05 -08:00
John MacFarlane
2e0894554c Implemented --toc-level for rst. 2013-01-05 11:55:29 -08:00
John MacFarlane
123b94ad81 Implemented --toc-level in LaTeX writer. 2013-01-05 11:49:42 -08:00
John MacFarlane
0f9e2c2320 Added css to preserve spaces in <code> tags.
Thanks to Dirk Laurie.
2013-01-04 23:02:22 -08:00
John MacFarlane
2f984b6074 Moved all data files and templates to data/. 2012-12-29 18:14:29 -08:00
fiddlosopher
07fe1aedd0 Removed old data/templates directory.
Templates are now in templates/.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1758 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 21:18:26 +00:00
fiddlosopher
4b0e39fd02 Add legacy-header to LaTeX template.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1680 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:09:43 +00:00
fiddlosopher
ca97f1482d Renamed headers -> templates.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1677 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:09:20 +00:00