aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/LaTeX.hs
AgeCommit message (Collapse)AuthorFilesLines
2019-05-05LaTeX writer: don't produce columns environment unless beamer.John MacFarlane1-2/+2
The environment is beamer-only and as far as I'm aware there's no latex package that provides it for non-beamer use. Closes #5485.
2019-05-01Fix footnote in image caption.John MacFarlane1-10/+16
Regression! The fix for #4683 broke this case.
2019-04-05More fixes to beamer table footnotes.John MacFarlane1-14/+19
2019-04-05LaTeX writer: rename stInMinipage -> stExternalNotesJohn MacFarlane1-13/+14
2019-04-05Make footnotes work properly in beamer tables.John MacFarlane1-0/+6
This fixes a regression in beamer due to the fix to #5367. We put table footnotes outside the table in beamer, because footnote/footnotehyper don't work with beamer.
2019-03-29LaTeX writer: Avoid inadvertently creating ?` or !` ligatures.John MacFarlane1-0/+8
These are upside down ? and !, resp. Closes #5407.
2019-03-22LaTeX writer: Fix footnotes in table caption and cells.John MacFarlane1-13/+11
This fixes a bug wherein footnotes appeared in the wrong order, and with duplicate numbers, when in table captions and cells. We now use regular `\footnote` commands, even in the table caption and the minipages containing cells. Apparently longtable knows how to handle this. Closes #5367.
2019-03-18Improved fix to #5340 and added test.John MacFarlane1-2/+2
2019-03-18Improve autolink detection in LaTeX reader.John MacFarlane1-2/+2
This determines whether `\url` or `\href` is used. Closes #5340.
2019-03-04LaTeX writer: Add classes for frontmatter support (#5353)Andrew Dunning1-2/+2
Remove frontmatter from scrreprt The KOMA-Script `scrreprt` class follows the pattern of `report`, and does not support `\frontmatter`. Use frontmatter for more classes
2019-03-04LaTeX writer/template: better handling of front/main/backmatter.John MacFarlane1-26/+29
In pandoc 2.7 we assumed that every class with chapters would accept `\frontmatter`, `\mainmatter`, and `\backmatter`. This is not so (e.g. report does not). So pandoc 2.7 breaks on report class by including an unsupported command. So we replace the book-class variable in the template with two variables, has-chapters and has-frontmatter, and set these intelligently in the writer. Closes #5348.
2019-03-01LaTeX(Beamer) writer: include contents under headers < slidelevel.John MacFarlane1-1/+8
Currently we keep the fancy title slide and add a new slide with the same title and whatever content was under the header. This changes behavior of slides, but is consistent with the new behavior of the revealjs and other HTML slide show writers. See #4317.
2019-03-01Remove license boilerplate.John MacFarlane1-18/+0
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel1-2/+2
Quite a few modules were missing copyright notices. This commit adds copyright notices everywhere via haddock module headers. The old license boilerplate comment is redundant with this and has been removed. Update copyright years to 2019. Closes #4592.
2019-02-01LaTeX writer: use right fold for escapeString.John MacFarlane1-15/+13
This is more elegant than the explicit recursive we were using.
2019-02-01LaTeX writer: code simplification in escaping.John MacFarlane1-20/+21
2019-02-01LaTeX writer: avoid `{}` after control sequences when escaping.John MacFarlane1-26/+36
`\ldots{}.` doesn't behave as well as `\ldots.` with the latex ellipsis package. This patch causes pandoc to avoid emitting the `{}` when it is not necessary. Now `\ldots` and other control sequences used in escaping will be followed by either a `{}`, a space, or nothing, depending on context. Thanks to Elliott Slaughter for the suggestion.
2019-01-25LaTeX writer: add `#` special characeters for listings.John MacFarlane1-1/+1
This character needs special handling in lstinline. Closes #4939.
2019-01-10Make raw content marked `beamer` work in `beamer` output.John MacFarlane1-14/+18
See pandoc/lua-filters#40.
2019-01-09Beamer writer: avoid duplicated `fragile` property in some cases.John MacFarlane1-1/+3
Closes #5208.
2019-01-02Implement task lists (#5139)Mauro Bieg1-2/+14
Closes #3051
2018-12-31Replace read with safeRead (#5186)Mauro Bieg1-5/+7
closes #5180
2018-11-19For bibliography match Div with id 'refs', not class 'references'.John MacFarlane1-2/+2
This was a mismatch between pandoc's docx, epub, latex, and markdown writers and the behavior of pandoc-citeproc, which actually looks for a div with id 'refs' rather than one with class 'references'.
2018-11-12LaTeX writer: don't emit `[<+->]` unless beamer output,John MacFarlane1-2/+3
even if `writerIncremental` is True. See #5072.
2018-11-01LaTeX writer: remove unused local bindAlexander Krotov1-1/+1
2018-10-31LaTeX writer: add newline if math ends in a comment.John MacFarlane1-2/+12
This prevents the closing delimiter from being swalled up in the comment. Closes #4880.
2018-10-08LaTeX writer with `--listings`: don't pass through org-babel attributes.John MacFarlane1-1/+4
So far: just, tangle, exports, results which are used by org mode. It might be better to use a whitelist of legal listings attributes, but there are a large number, and these may change. Closes #4889.
2018-10-08LaTeX writer: with `--biblatex`, use `\autocite` when possible.John MacFarlane1-13/+21
`\autocites{a1}{a2}{a3}` will not collapse the entries. So, if we don't have prefixes and suffixes, we use instead `\autocite{a1;a2;a3}`. Closes #4960.
2018-09-30Implement `--ascii` (`writerPreferAscii`) in writers, not App.John MacFarlane1-39/+105
Now the `write*` functions for Docbook, HTML, ICML, JATS, Man, Ms, OPML are sensitive to `writerPreferAscii`. Previously the to-ascii translation was done in Text.Pandoc.App, and thus not available to those using the writer functions directly. In addition, the LaTeX writer is now sensitive to `writerPreferAscii` and to `--ascii`. 100% ASCII output can't be guaranteed, but the writer will use commands like `\"{a}` and `\l` whenever possible, to avoid emiting a non-ASCII character. A new unexported module, Text.Pandoc.Groff, has been added to store functions used in the different groff-based writers.
2018-09-29LaTeX writer: Fix description lists contining highlighted code.John MacFarlane1-2/+4
Closes #4662.
2018-09-22LaTeX writer: fix a use of `last` that might take empty list.John MacFarlane1-3/+3
If you ran with `--biblatex` and have an empty document (metadata but no blocks), pandoc would previously raise an error because of the use of `last` on an empty list.
2018-08-16LaTeX writer/template: be sensitive to `filecolor` variable.John MacFarlane1-1/+2
`linkcolor` only affects internal links, and `urlcolor` only affects linked URLs. For external links, the option to use is `filecolor`. Closes #4822.
2018-06-12Beamer: Allow "noframenumbering" option (#4696)Raymond Ehlers1-1/+2
As noted [here](https://tex.stackexchange.com/a/49805) ([beamer commit here](https://github.com/josephwright/beamer/commit/ff70090f36b631667b472cfe675fc3514fe46f7e)), `noframenumbering` is an undocumented, but long existing option to disable frame numbering for a particular slide. This is useful to avoid numbering backup slides.
2018-06-07LaTeX writer: properly handle footnotes in table captions.John MacFarlane1-17/+22
Refactored code from figure captions to use in both places. Closes #4683.
2018-06-07beamer output: fix single digit column percentage (#4691)Mauro Bieg1-1/+1
fixes #4690
2018-04-26LaTeX writer: Update \lstinline delimiters. (#4369)Tim Parenti1-1/+1
Don't delimit \lstinline with characters that are normally escaped. Follow-up to #4111, #4271.
2018-04-16Beamer writer: don't use format specifier for default ordered lists.John MacFarlane1-0/+1
This gives better results for styles that put ordered list markers in boxes or circles. Closes #4556.
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-03-13Beamer: put hyperlink after `\begin{frame}`.John MacFarlane1-8/+8
and not in the title. If it's in the title, then we get a titlebar on slides with the `plain` attribute, when the id is non-null. This fixes a regression from 1.9.x. Closes #4307.
2018-02-22Presentations: Use divs to set incremental/non-incrementalJesse Rosenthal1-46/+67
Currently, html and beamer presentations use a list-inside-blockquote convention for setting incremental and all-at-once presentation of lists (or reversing the command-line default). This allows the user to set this on a per-case basis with divs, named `incremental` and `nonincremental` respectively, as in: ::: incremental - snap - crackle - pop ::: Note that the former list-inside-blockquote convention still works so as not to break any existing presentations. Closes: #4381
2018-02-21LaTeX writer: Put hypertarget inside figure environment.John MacFarlane1-4/+4
Previously it surrounded the figure. This works around a problem with the endfloat package and makes pandoc's output compatible with it. Closes #4388.
2018-02-21LaTeX writer: Fix image height with percentage.John MacFarlane1-1/+5
This previously caused the image to be resized to a percentage of textwidth, rather than textheight. Closes #4389.
2018-01-19hlint code improvements.John MacFarlane1-4/+4
2018-01-16LaTeX writer: escape & in lstinlineRobert Schütz1-1/+1
2018-01-10LaTeX reader: fix inconsistent column widths.John MacFarlane1-2/+2
This fixes a bug whereby column widths for the body were different from widths for the header in some tables. Closes #4238.
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-2/+2
2017-12-28LaTeX writer: Use \endhead after \toprule in headerless tables.John MacFarlane1-4/+3
Closes #4207.
2017-12-26LaTeX writer: Allow fragile=singleslide attribute in beamer slides.John MacFarlane1-2/+2
Closes #4169.
2017-12-15LaTeX writer: use \renewcommand for \textlatin with babel.John MacFarlane1-4/+7
This avoids a clash with a deprecated \textlatin command defined in Babel. Closes #4161.
2017-12-02LaTeX writer: escape `_` in code with --listings.John MacFarlane1-1/+1