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.
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.
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.
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.
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)
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
* 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.)
- 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)
* 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.
Valid values are `empty` (the default), `horizontal`, `vertical`,
and `frame`. Note that this changes the default behavior from
`horizontal` to `empty`. Closes#2543.
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.
- 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.
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.
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.
- 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.
Mainly this adds a template variable that can be filled
by commands that make babel understand the polyglossia-style
language directives.
Thanks to mb21.
- 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).
- Added comment stating that the page is autogenerated by
pandoc, giving version.
- Added `adjusting` and `hyphenate` variables.
- Documented new 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).
+ 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`.
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.
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.
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.
* Use polyglossia with xelatex in beamer (#85).
* Provide `\tightlist` in beamer template (Anders Persson).
* Add toccolor variable to control link color in toc (Kaixhin).
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.
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.
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.
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
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.
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.
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.
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
...
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.
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.
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.
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.
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.
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.