aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/LaTeX.hs
AgeCommit message (Collapse)AuthorFilesLines
2016-11-20LaTeX writer: ensure that simple tables have simple cells.John MacFarlane1-1/+8
If cells contain more than a single Plain or Para, then we need to set nonzero widths and put contents into minipages. Closes #2666.
2016-10-19Add option for top-level division typeAlbert Krewinkel1-18/+20
The `--chapters` option is replaced with `--top-level-division` which allows users to specify the type as which top-level headers should be output. Possible values are `section` (the default), `chapter`, or `part`. The formats LaTeX, ConTeXt, and Docbook allow `part` as top-level division, TEI only allows to set the `type` attribute on `div` containers. The writers are altered to respect this option in a sensible way.
2016-09-06Add --parts command line option to LaTeX writer.Oliver Matthews1-10/+17
Add --parts command line argument. This only effects LaTeX writer, and only for non-beamer output formats. It changes the output levels so the top level is 'part', the next 'chapter' and then into sections.
2016-10-13Add support for the LineBlock element to writersAlbert Krewinkel1-0/+2
The following markup features are used to output the lines of the `LineBlock` element: - AsciiDoc: a `[verse]` block, - ConTeXt: text surrounded by `\startlines` and `\endlines`, - HTML: `div` with an per-element style setting to interpret the content as pre-wrapped, - Markdown: line blocks if the `line_blocks` extension is enabled, a simple paragraph with hard linebreaks otherwise, - Org: VERSE block, - RST: a line block, and - all other formats: a paragraph, containing hard linebreaks between lines. Custom lua writers should be updated to use the `LineBlock` element.
2016-09-28Merge pull request #3093 from wilx/master-figure-placementJohn MacFarlane1-1/+1
LaTeX: Do not set [htbp] figure placement options.
2016-09-20LaTeX writer: change braced backtick to \textasciigrave{}Jesse Rosenthal1-1/+1
Backticks in verbatim environments are converted to open-single-quotes. This change makes them appear as backticks. This corresponds to how we treat `'' in verbatim environments (with \textquotesingle{}).
2016-09-19LaTeX writer: enclose backtick in `{}` in verbatimJesse Rosenthal1-0/+1
We don't want ligatures like ` ?` ` (which produces `¿`) inside `\texttt{}` environments, so we enclose the backtick in braces. This fixes #3121
2016-08-29LaTeX: Do not set [htbp] figure placement options.Vaclav Zeman1-1/+1
Do not set `[htbp]` placement options on each figure to allow overriding them by them using `\fps@figure` redefintion either in header or in template.
2016-08-27Translate NARROW NO-BREAK SPACE into LaTeX.Vaclav Zeman1-0/+1
Translate NARROW NO-BREAK SPACE into LaTeX' `\,`.
2016-08-06LaTeX writer: don't use * for unnumbered paragraph, subparagraph.John MacFarlane1-2/+2
The starred variants don't exist. This helps with part of #3058...it gets rid of the spurious *s. But we still have numbers on the 4th and 5th level headers.
2016-07-03Allow 'standout' as a beamer frame option.John MacFarlane1-1/+1
## Slide title {.standout} Closes #3007.
2016-07-01LaTeX writer: don't URI-escape image source.John MacFarlane1-1/+1
Usually this is a local file, and replacing spaces with `%20` ruins things. Closes #2825.
2016-05-31brazilian -> brazil for polyglossia.John MacFarlane1-1/+3
Closes #2953.
2016-05-17LaTeX writer: Don't escape underscore in labels.John MacFarlane1-1/+1
Previously they were escaped as ux5f. Closes #2921.
2016-05-11Retake on strut with \minipage inside tablesJose Luis Duran1-2/+2
Reimplement on 4c684561ee0665b014e887ae559b7020e4e9f2d3 The problem with 4c68456 was a space between the cell contents and the `\strut` that affected the alignment.
2016-05-09Avoid lazy foldl in LaTeX writer.John MacFarlane1-4/+5
2016-05-01LaTeX writer: use {} around options containing special chars.John MacFarlane1-4/+9
Closes #2892.
2016-04-27Revert "LaTeX writer: Add `\strut` to fix multiline tables"John MacFarlane1-2/+1
This reverts commit 4c684561ee0665b014e887ae559b7020e4e9f2d3. See https://groups.google.com/d/msg/pandoc-discuss/u6J-_aCProU/UufN3IYRAgAJ This should fix uneven spacing issues in multiline tables.
2016-04-26Merge pull request #2735 from mb21/patch-1John MacFarlane1-1/+1
LaTeX Writer: fix polyglossia to babel env mapping
2016-04-26Merge pull request #2829 from adunning/patch-1John MacFarlane1-7/+17
LaTeX writer: Add missing languages.
2016-04-26LaTeX writer: ignore --incremental unless -t beamer.John MacFarlane1-1/+2
Closes #2843.
2016-04-01LaTeX writer: Add missing languages.Andrew Dunning1-7/+17
Updates the list from the hyphenation files at <http://mirror.ctan.org/language/hyph-utf8/tex/generic/hyph-utf8/loadhyph/>.
2016-03-30Recognize `la-x-classic` as Classical Latin.Andrew Dunning1-0/+2
This allows one to access the hyphenation patterns at <http://mirrors.ctan.org/language/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-classic.tex>, using its private language tag.
2016-03-25Removed two superfluous lines.John MacFarlane1-2/+0
2016-03-24LaTeX writer: better positioning for hypertarget in figures.John MacFarlane1-16/+23
Closes #2813.
2016-03-24LaTeX writer: Fixed position of label in figures.John MacFarlane1-3/+3
Partially addresses #2813. This isn't perfect, because now the hypertarget is in the wrong place -- when you link to the figure, the screen is positioned with the caption at the top, and most of the figure off screen. So this needs a bit more tweaking.
2016-03-20LaTeX Writer: fix polyglossia to babel env mappingMauro Bieg1-1/+1
allow for optional argument in square brackets, closes #2728
2016-03-19Merge pull request #2637 from mb21/latex-figure-labelJohn MacFarlane1-19/+24
LaTeX writer: figure label
2016-03-18LaTeX writer: Avoid double toprule in headerless table with caption.John MacFarlane1-7/+10
Closes #2742.
2016-02-18LaTeX writer: clean up options parser.Jesse Rosenthal1-3/+4
Make sure that we require the closing bracket.
2016-02-18LaTeX writer: treat memoir template with `article` opt as articleJesse Rosenthal1-6/+21
We currently treat all memoir templates as books. This means that pandoc will infer the `--chapters` argument, even if the `article` iption is set for memoir. This commit makes pandoc treats the document as an article if there is an article option (i.e., `\documentclass[12pt,article]{memoir}`). Note that this refactors out the parsec parsers for document class and options, to make it a little clearer what's going on.
2016-01-20LaTeX writer: Allow more flexible table alignmentHenrik Tramberend1-1/+1
2016-01-10LaTeX writer: figure labelmb211-19/+24
2016-01-09LaTeX writer: restore old treatment of Span.John MacFarlane1-17/+15
A Span is rendered with surrounding {braces}. This was a regression in 1.16. Closes #2624.
2015-12-22LaTeX writer: create defaults for geometry using margin-left etc.John MacFarlane1-1/+10
If `geometry` has no value, but `margin-left`, `margin-right`, `margin-top`, and/or `-margin-bottom` are given, a default value for `geometry` is created from these. Note that these variables already affect PDF production via HTML5 with wkhtmltopdf.
2015-12-19LaTeX/Beamer template changes (Thomas Hodgson):John MacFarlane1-0/+1
* 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-19Added needed import of FromJSON.John MacFarlane1-1/+1
Fixes build failure.
2015-12-19Fix language code for Czech (cs not cz)John MacFarlane1-1/+1
Closes #2597.
2015-12-19Merge branch 'master' of https://github.com/AndreasLoow/pandoc into ↵John MacFarlane1-1/+6
AndreasLoow-master
2015-12-11Implemented SoftBreak and new `--wrap` option.John MacFarlane1-1/+8
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-11-23Beamer writer: mark frame as fragile when it contains verbatim.John MacFarlane1-5/+1
Closes #1613.
2015-11-19Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane1-12/+35
mb21-new-image-attributes * Bumped version to 1.16. * Added Attr field to Link and Image. * Added `common_link_attributes` extension. * Updated readers for link attributes. * Updated writers for link attributes. * Updated tests * Updated stack.yaml to build against unreleased versions of pandoc-types and texmath. * Fixed various compiler warnings. Closes #261. TODO: * Relative (percentage) image widths in docx writer. * ODT/OpenDocument writer (untested, same issue about percentage widths). * Update pandoc-citeproc.
2015-11-12LaTeX writer: set `colorlinks`...John MacFarlane1-1/+4
if `linkcolor`, `urlcolor`, `citecolor`, or `toccolor` is set. Closes #2508.
2015-11-09Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane1-1/+0
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
2015-11-08Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane1-0/+1
This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
2015-11-01LaTeX writer: properly handle footnotes in captions.John MacFarlane1-15/+18
Closes #1506.
2015-11-01LaTeX writer: avoid footnotes in list of figures.John MacFarlane1-1/+14
Footnotes aren't allowed in the list of figures. This patch causes footnotes to be stripped from captions when entered into the list of figures. Footnotes still don't actually WORK in captions in latex/pdf, but at least an error is no longer raised. See #1506.
2015-10-28LaTeX writer: add `\protect` to `\hyperlink`.John MacFarlane1-1/+1
Thanks to Hadrien Mary for the problem and solution. Closes #2490.
2015-10-27LaTeX writer: Use `\hypertarget` and `\hyperlink` for links.John MacFarlane1-17/+9
This works correctly to link to Div or Span elements. We now don't bother defining `\label` for Div or Span elements. Closes jgm/pandoc-citeproc#174.
2015-10-26Added de-CH-1901, fixed el-polytonnickbart19801-2/+3
el-polyton, not el-poly, see http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry