summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/LaTeX.hs
Commit message (Collapse)AuthorAge
* Handle language in inline code with --listings.John MacFarlane2017-02-05
| | | | Closes #3422.
* LaTeX writer: export writeBeamer.John MacFarlane2017-01-28
| | | | Removed writerBeamer from WriterOptions.
* Removed writerHighlight; made writerHighlightStyle a Maybe.John MacFarlane2017-01-25
| | | | | | API change. For no highlighting, set writerHighlightStyle to Nothing.
* Revert "Added page breaks into Pandoc."John MacFarlane2017-01-25
| | | | This reverts commit f02a12aff638fa2339192231b8f601bffdfe3e14.
* Removed writerIgnoreNotes.John MacFarlane2017-01-25
| | | | | | | | | Instead, just temporarily remove notes when generating TOC lists in HTML and Markdown (as we already did in LaTeX). Also export deNote from Text.Pandoc.Shared. API change in Shared and Options.WriterOptions.
* Removed writerTeXLigatures.John MacFarlane2017-01-25
| | | | | | Make `smart` extension work in LaTeX/ConTeXt writers instead. Instead of `-t latex --no-tex-ligatures`, do `-t latex-smart`.
* Convert all writers to use PandocMonad.Jesse Rosenthal2017-01-25
| | | | | | | | | | | | | | | Since PandocMonad is an instance of MonadError, this will allow us, in a future commit, to change all invocations of `error` to `throwError`, which will be preferable for the pure versions. At the moment, we're disabling the lua custom writers (this is temporary). This requires changing the type of the Writer in Text.Pandoc. Right now, we run `runIOorExplode` in pandoc.hs, to make the conversion easier. We can switch it to the safer `runIO` in the future. Note that this required a change to Text.Pandoc.PDF as well. Since running an external program is necessarily IO, we can be clearer about using PandocIO.
* Adds support for pagebreaks (when it makes sense)Hubert Plociniczak2017-01-25
| | | | | | | Update all writers to take into account page breaks. A straightforwad, far from complete, implementation of page breaks in selected writers. Readers will have to follow in the future as well.
* Updates to use skylighting rather than highlighting-kate.John MacFarlane2016-12-23
| | | | | | | | So far this just reproduces capacity. Later we'll be able to add features like warning messages, dynamic loading of xml syntax definitions, and dynamic loading of themes.
* LaTeX writer: allow tables with empty cells to count as "plain."John MacFarlane2016-12-16
| | | | | | | This addresses a problem of too-wide tables when empty cells are used. Thanks to Joost Kremers for reporting the issue.
* LaTeX writer: Fix unnumbered headers when used with `--top-level`Albert Krewinkel2016-12-04
| | | | | | | | Fix interaction of top-level divisions `part` or `chapter` with unnumbered headers when emitting LaTeX. Headers are ensured to be written using stared commands (like `\subsection*{}`). Fixes: #3272
* Options: Removed writerStandalone, made writerTemplate a Maybe.John MacFarlane2016-11-30
| | | | | | | | Previously setting writerStandalone = True did nothing unless a template was provided in writerTemplate. Now a fragment will be generated if writerTemplate is Nothing; otherwise, the specified template will be used and standalone output generated. [API change]
* Refactor top-level division selection (#3261)Albert Krewinkel2016-11-27
| | | | | | | | | | | | | | The "default" option is no longer represented as `Nothing` but via a new type constructor, making the `Maybe` wrapper superfluous. The default behavior of using heuristics can now be enabled explicitly by setting `--top-level-division=default`. API change (`Text.Pandoc.Options`): The `Division` type was renamed to `TopLevelDivision`. The `Section`, `Chapter`, and `Part` constructors were renamed to `TopLevelSection`, `TopLevelChapter`, and `TopLevelPart`, respectively. An additional `TopLevelDefault` constructor was added, which is now also the new default value of the `writerTopLevelDivision` field in `WriterOptions`.
* [Tex] Remove invalid inlines in sections (#3218)hubertp-lshift2016-11-26
| | | | | | | | | | | Latex doesn't like when hypertargets or images are put in the options list of the section. They are not lost since they were actually duplicated and present also in the second argument list. Note on the implementation: I had to inline the definiton of 'foldMap' since it is not implemented in every version of Haskell that Pandoc supports.
* Allow to overwrite top-level division type heuristics (#3258)Albert Krewinkel2016-11-26
| | | | | | | | | | | | | Pandoc uses heuristics to determine the most resonable top-level division type when emitting LaTeX or Docbook markup. It is now possible to overwrite this implicitly set top-level division via the `top-level-division` command line parameter. API change (`Text.Pandoc.Options`): the type of the `writerTopLevelDivision` field in of the `WriterOptions` data type is altered from `Division` to `Maybe Division`. The field's default value is changed from `Section` to `Nothing`. Closes: #3197
* LaTeX writer: use `\autocites*` when "suppress-author" citation used.John MacFarlane2016-11-24
|
* LaTeX writer: ensure that simple tables have simple cells.John MacFarlane2016-11-20
| | | | | | | If cells contain more than a single Plain or Para, then we need to set nonzero widths and put contents into minipages. Closes #2666.
* Add option for top-level division typeAlbert Krewinkel2016-10-19
| | | | | | | | | | 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.
* Add --parts command line option to LaTeX writer.Oliver Matthews2016-09-06
| | | | | | | 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.
* Add support for the LineBlock element to writersAlbert Krewinkel2016-10-13
| | | | | | | | | | | | | | | | | 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.
* Merge pull request #3093 from wilx/master-figure-placementJohn MacFarlane2016-09-28
|\ | | | | LaTeX: Do not set [htbp] figure placement options.
| * LaTeX: Do not set [htbp] figure placement options.Vaclav Zeman2016-08-29
| | | | | | | | | | | | 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.
* | LaTeX writer: change braced backtick to \textasciigrave{}Jesse Rosenthal2016-09-20
| | | | | | | | | | | | | | 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{}).
* | LaTeX writer: enclose backtick in `{}` in verbatimJesse Rosenthal2016-09-19
| | | | | | | | | | | | | | We don't want ligatures like ` ?` ` (which produces `¿`) inside `\texttt{}` environments, so we enclose the backtick in braces. This fixes #3121
* | Translate NARROW NO-BREAK SPACE into LaTeX.Vaclav Zeman2016-08-27
|/ | | | Translate NARROW NO-BREAK SPACE into LaTeX' `\,`.
* LaTeX writer: don't use * for unnumbered paragraph, subparagraph.John MacFarlane2016-08-06
| | | | | | | 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.
* Allow 'standout' as a beamer frame option.John MacFarlane2016-07-03
| | | | | | ## Slide title {.standout} Closes #3007.
* LaTeX writer: don't URI-escape image source.John MacFarlane2016-07-01
| | | | | Usually this is a local file, and replacing spaces with `%20` ruins things. Closes #2825.
* brazilian -> brazil for polyglossia.John MacFarlane2016-05-31
| | | | Closes #2953.
* LaTeX writer: Don't escape underscore in labels.John MacFarlane2016-05-17
| | | | | | Previously they were escaped as ux5f. Closes #2921.
* Retake on strut with \minipage inside tablesJose Luis Duran2016-05-11
| | | | | | | Reimplement on 4c684561ee0665b014e887ae559b7020e4e9f2d3 The problem with 4c68456 was a space between the cell contents and the `\strut` that affected the alignment.
* Avoid lazy foldl in LaTeX writer.John MacFarlane2016-05-09
|
* LaTeX writer: use {} around options containing special chars.John MacFarlane2016-05-01
| | | | Closes #2892.
* Revert "LaTeX writer: Add `\strut` to fix multiline tables"John MacFarlane2016-04-27
| | | | | | | | | 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.
* Merge pull request #2735 from mb21/patch-1John MacFarlane2016-04-26
|\ | | | | LaTeX Writer: fix polyglossia to babel env mapping
| * LaTeX Writer: fix polyglossia to babel env mappingMauro Bieg2016-03-20
| | | | | | | | allow for optional argument in square brackets, closes #2728
* | Merge pull request #2829 from adunning/patch-1John MacFarlane2016-04-26
|\ \ | | | | | | LaTeX writer: Add missing languages.
| * | LaTeX writer: Add missing languages.Andrew Dunning2016-04-01
| | | | | | | | | | | | Updates the list from the hyphenation files at <http://mirror.ctan.org/language/hyph-utf8/tex/generic/hyph-utf8/loadhyph/>.
* | | LaTeX writer: ignore --incremental unless -t beamer.John MacFarlane2016-04-26
|/ / | | | | | | Closes #2843.
* | Recognize `la-x-classic` as Classical Latin.Andrew Dunning2016-03-30
| | | | | | 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.
* | Removed two superfluous lines.John MacFarlane2016-03-25
| |
* | LaTeX writer: better positioning for hypertarget in figures.John MacFarlane2016-03-24
| | | | | | | | Closes #2813.
* | LaTeX writer: Fixed position of label in figures.John MacFarlane2016-03-24
|/ | | | | | | | | | | 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.
* Merge pull request #2637 from mb21/latex-figure-labelJohn MacFarlane2016-03-19
|\ | | | | LaTeX writer: figure label
| * LaTeX writer: figure labelmb212016-01-10
| |
* | LaTeX writer: Avoid double toprule in headerless table with caption.John MacFarlane2016-03-18
| | | | | | | | Closes #2742.
* | LaTeX writer: clean up options parser.Jesse Rosenthal2016-02-18
| | | | | | | | Make sure that we require the closing bracket.
* | LaTeX writer: treat memoir template with `article` opt as articleJesse Rosenthal2016-02-18
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | LaTeX writer: Allow more flexible table alignmentHenrik Tramberend2016-01-20
|/
* LaTeX writer: restore old treatment of Span.John MacFarlane2016-01-09
| | | | | | A Span is rendered with surrounding {braces}. This was a regression in 1.16. Closes #2624.