aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/LaTeX.hs
AgeCommit message (Collapse)AuthorFilesLines
2013-12-17LaTeX writer: Factored out function for table cell creation.John MacFarlane1-13/+17
2013-12-04Add booktabs package for LaTeX tablesJose Luis Duran1-5/+5
[ci skip]
2013-11-23LaTeX writer: Handle csl flipflopping spans (csl-no-emph, etc.)John MacFarlane1-1/+10
2013-11-16LaTeX writer: Properly escape pdftitle, pdfauthor.John MacFarlane1-2/+4
Closes #1059.
2013-10-21Fix definition lists with internal links in terms (closes #1032).John MacFarlane1-1/+8
This fix puts braces around a term that contains an internal link, to avoid problems with square brackets.
2013-10-17LaTeX writer: Specially escape non-ascii characters in labels.John MacFarlane1-6/+14
Otherwise we can get compile errors and other bugs when compiled with pdflatex. Closes #1007. Thanks to begemotv2718 for the fix.
2013-10-17LaTeX writer: Add link anchors for code blocks with identifiers.John MacFarlane1-5/+11
Closes #1025.
2013-10-16Use isURI instead of isAbsoluteURI.John MacFarlane1-2/+2
It allows fragments identifiers.
2013-10-13Treat div with class "notes" as speaker notes in slide formats.John MacFarlane1-1/+6
Currently beamer goes to `\note{}`, revealjs to `<aside class="notes">`, and the notes are simply suppressed in other formats. Closes #925.
2013-09-19LaTeX writer: Don't print biblio if --natbib or --biblatex option used.John MacFarlane1-10/+17
2013-08-25Merge pull request #961 from nougad/add_latex_listings_labelJohn MacFarlane1-2/+6
Write id for code block to label attr in latex when listing is used
2013-08-24Removed dependency on citeproc-hs.John MacFarlane1-6/+2
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.
2013-08-22Write id for code block to label attr in latex when listing is usedFlorian Eitel1-2/+6
The code: ~~~{#test} asdf ~~~ gets compiled to html: <pre id="test"> asdf </pre> So it is possible to link to the identifier `test` But this doesn't happen on latex When using the listings package (`--listings`) it is possible to set the identifier using the `label=test` property: \begin{lstlisting}[label=id] hi \end{lstlisting} And this is exactly what this patch is doing. Modified LaTeX Reader/Writer and added tests for this.
2013-08-19Scale LaTeX tables so they don't exceed columnwidth.John MacFarlane1-1/+5
2013-08-16LaTeX writer: Avoid problem with footnotes in unnumbered headers.John MacFarlane1-6/+7
Closes #940. Added test case.
2013-08-10Use walk, walkM in place of bottomUp, bottomUpM when possible.John MacFarlane1-2/+1
They are significantly faster.
2013-08-10Use query instead of queryWith.John MacFarlane1-3/+4
2013-08-10Adjustments for new Format newtype.John MacFarlane1-5/+8
2013-08-08Preliminary support for new Div and Span elements in writers.John MacFarlane1-0/+2
Currently these are "transparent" containers, except in HTML, where they produce div and span elements with attributes.
2013-07-26Beamer: add allowframebreaks to slide if set in header classes.John MacFarlane1-8/+11
It's recommended that your bibliography slide have this attribute: # References {.allowframebreaks} This causes multiple slides to be created if necessary, depending on the length of the bibliography.
2013-07-25LaTeX writer: Change `\` to `/` in paths.John MacFarlane1-2/+4
`/` works even on Windows in LaTeX. `\` will cause major problems if unescaped.
2013-07-04LaTeX writer: Don't use ligatures in escaping inline code.John MacFarlane1-9/+15
2013-07-01Created Text.Pandoc.Writers.Shared, improved metaToJSON.John MacFarlane1-2/+2
* Text.Pandoc.Writers.Shared contains shared functions used only in writers. * metaToJSON now takes a WriterOptions parameter, and will return an empty object if standalone is not specified.
2013-06-29Metadata changes: Variables now completely shadow metadata.John MacFarlane1-2/+2
Previously if you set a value both in metadata and with a variable, they'd be combined into a list. Now the variable replaces the value in document metadata. If many variables with the same name are set, a list is created. Shared: metaToJSON now has an argument for a variable list.
2013-06-27Writers: Use defField for defaults.John MacFarlane1-25/+25
This way explicitly specified fields not overridden. Fixes a problem e.g. with specifying a documentclass via the command line using -V.
2013-06-26Stop escaping `|` in LaTeX math.John MacFarlane1-9/+2
This caused problems with array environments. Closes #891.
2013-06-24Use new flexible metadata type.John MacFarlane1-50/+48
* 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-02LaTeX writer: Always create labels for sections.John MacFarlane1-7/+9
Previously the labels were only created when there were links to the section in the document. Closes #871.
2013-04-15Fixed footnote numbers in LaTeX/PDF tables.John MacFarlane1-17/+4
This fixes a bug wherein notes were numbered incorrectly in tables. Closes #827. Now that we are using longtable, we can just use regular `\footnote` commands for notes, which simplifies the code considerably.
2013-03-24Added syntax for "pauses" in beamer or reaveljs slide shows.John MacFarlane1-0/+6
This gives . . . a pause.
2013-03-05Hide Text.Pandoc.Highlighting.John MacFarlane1-57/+4
* Moved code for translating listings language names to highlighting-kate names and back from LaTeX reader to Highlighting. * Text.Pandoc.Highlighting no longer exposed (API change) * Text.Pandoc.Highlighting exports toListingsLang, fromListingsLang
2013-03-04LaTeX writer: Support line numbering with `--listings`.John MacFarlane1-2/+8
If "numberLines" class is present, we add "numbers=left"; if "startFrom" is present, we add "firstnumber=". Partially addresses #763.
2013-02-16LaTeX writer: Omit lists with no items.John MacFarlane1-0/+3
Otherwise we get LaTeX errors.
2013-02-15LaTeX writer: Include unnumbered sections in TOC.John MacFarlane1-12/+18
2013-02-14Implemented "unnumbered" headers in LaTeX writer.John MacFarlane1-8/+11
Starred variants of section commands used when header has "unnumbered" class.
2013-02-12Shared: Changed type of Element.John MacFarlane1-2/+2
Sec now includes a field for Attr rather than just String (the identifier). Note, this is an API change.
2013-01-28LaTeX writer: Avoid extra space at start/end of table cell.John MacFarlane1-1/+3
Thanks to Nick Bart for the suggestion of using @{}.
2013-01-17Convert highlighting-kate language to listings languageJohn MacFarlane1-19/+63
if --listings is used. Closes #704.
2013-01-15LaTeX writer: Prevent paragraphs containing only linebreaks or spaces.John MacFarlane1-4/+9
2013-01-15Use 'fig:' instead of '\SOH' in title to indicate figure.John MacFarlane1-2/+2
Revises 1a4b47e93368bfbd31daccdfedbd9527ee740201
2013-01-14Implemented Ext_implicit_figures.John MacFarlane1-1/+2
* In markdown reader, add a '\1' character to the beginning of the title of an image that is alone in its paragraph, if implicit_figures extension is selected. * In writers, check for Para [Image alt (src,'\1':tit)] and treat it as a figure if possible. * Updated tests. This is a bit of a hack, but it allows us to make implicit_figures an extension of the markdown reader, rather than the writers.
2013-01-12Escape `|` as `\vert` in LaTeX math.John MacFarlane1-2/+11
This avoids a clash with highlighting-kate's macros, which redefine | as a short verbatim delimiter. Thanks to Björn Peemöller for raising this issue.
2013-01-11Changed hspace in last commit to 0.333em.John MacFarlane1-1/+1
This seems to match the spacing of ~ exactly.
2013-01-11LaTeX writer: Use `\hspace*` for nonbreaking space after line break.John MacFarlane1-1/+13
Since `~` spaces after a line break are just ignored. Closes #687.
2013-01-09Fixed regression in example lists.John MacFarlane1-6/+7
This was associated with e1be934dc2ff061e5200017d6503280686983e1f.
2013-01-09Added Attr field to Header.John MacFarlane1-5/+5
Previously header ids were autogenerated by the writers. Now they are generated (unless supplied explicitly) in the markdown parser, if the `header_identifiers` extension is selected. In addition, the textile reader now supports id attributes on headers.
2013-01-07Implemented tight lists in context, latex writers.John MacFarlane1-2/+12
2013-01-06Don't put the text of an autolink in Code font.John MacFarlane1-1/+1
2013-01-05LaTeX tables: Use minipage rather than parbox for block containers.John MacFarlane1-2/+2
This allows verbatim code to be included in grid tables. Closes #663.
2013-01-05Changed --toc-level to --toc-depth.John MacFarlane1-1/+1