aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX.hs
AgeCommit message (Collapse)AuthorFilesLines
2014-07-22Exported runParserT and StreamMatthew Pickering1-2/+1
2014-07-11Removed (>>~) functionMatthew Pickering1-1/+1
This function is equivalent to the more general (<*) which is defined in Control.Applicative. This change makes pandoc code easier to understand for those not familar with the codebase.
2014-06-17LaTeX reader: Correctly handle table rows with too few cells.John MacFarlane1-3/+7
LaTeX seems to treat them as if they have empty cells at the end. Closes #241.
2014-06-16LaTeX reader: handle leading/trailing spaces in emph better.John MacFarlane1-17/+17
`\emph{ hi }` gets parsed as `[Space, Emph [Str "hi"], Space]` so that we don't get things like `* hi *` in markdown output. Also applies to textbf and some other constructions. Closes #1146. (`--normalize` isn't touched by this, but normalization should not generally be necessary with the changes to the readers.)
2014-06-16LaTeX reader: don't assume preamble doesn't contain environments.John MacFarlane1-1/+1
Closes #1338.
2014-06-12allow (and discard) optional argument for \captionJames Aspnes1-1/+1
2014-06-03LaTeX reader: Handle comments at the end of tables.John MacFarlane1-0/+1
This resolves the issue illustrated in http://stackoverflow.com/questions/24009489/comments-in-latex-break-pandoc-table.
2014-05-20Org reader: support for inline LaTeXAlbert Krewinkel1-0/+1
Inline LaTeX is now accepted and parsed by the org-mode reader. Both, math symbols (like \tau) and LaTeX commands (like \cite{Coffee}), can be used without any further escaping.
2014-05-12LaTeX reader: Support `\addbibresource`.John MacFarlane1-0/+2
2014-05-11LaTeX reader: set `bibliography` in metadata from `\bibliography` cmd.John MacFarlane1-1/+6
2014-05-10LaTeX reader: Don't error on "%foo" with no newline.John MacFarlane1-1/+1
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel1-2/+2
2014-05-03LaTeX reader: Fixed regression introduced with last commit.John MacFarlane1-10/+10
Tests now pass again.
2014-05-03LaTeX reader: Better error messages with include files.John MacFarlane1-55/+117
Closes #1274. Rewrote handleIncludes. We now report the actual source file and position where the error occurs, even if it is included. We do this by inserting special commands, `\PandocStartInclude` and `\PandocEndInclude`, that encode this information in the preprocessing phase. Also generalized the types of a couple functions from `Text.Pandoc.Parsing`.
2014-04-26LaTeX reader: Made `\nocite` work.John MacFarlane1-3/+6
This adds nocite citations to a metadata field, `nocite`. These will appear in the bibliography but not in the text (unless you use a `$nocite$` variable in your template, of course).
2014-04-06LaTeX reader: handle @{} and p{length} in tabular.John MacFarlane1-2/+3
The length is not actually recorded, but at least we get a table. Closes #1180.
2014-03-25LaTeX reader: Better handling of figure and table with caption.John MacFarlane1-11/+34
We now look for a \caption inside the environment; if one is found, it is attached to the graphic or tabular found there. Closes #1204.
2014-03-25Revert "LaTeX reader: Added LPState."John MacFarlane1-18/+0
This reverts commit 82ddec698e782fef83dcd1b1fba79cd3b698c717.
2014-03-25LaTeX reader: Added LPState.John MacFarlane1-0/+18
Plan is to use this instead of ParserState in LP.
2014-03-25LaTeX reader: Better handling of "table" environment.John MacFarlane1-0/+1
Positioning options no longer rendered verbatim. Partially addresses #1204.
2013-12-19HLint: use `elem` and `notElem`Henry de Valence1-3/+2
Replaces long conditional chains with calls to `elem` and `notElem`.
2013-12-17LaTeX reader: Support babel-style quoting: `` "`..."' ``.John MacFarlane1-0/+2
2013-12-13LaTeX reader: add support for Verb macroJeff Arnold1-0/+1
2013-12-06HTML reader: Parse LaTeX math if appropriate options are set.John MacFarlane1-1/+2
* Moved inlineMath, displayMath from Markdown reader to Parsing. * Export them from Parsing. (API change.) * Generalize their types.
2013-11-18LaTeX reader: Parse contents of curly quotes or matched `"` as quotes.John MacFarlane1-7/+17
2013-11-17LaTeX reader: Support `\textnormal` as span with class "nodecor".John MacFarlane1-0/+1
This is needed for pandoc-citeproc.
2013-10-21LaTeX reader: Improved citation parsing.John MacFarlane1-6/+13
This fixes a run-time error that occured with `\citet{}` (empty list of keys). It also ensures that empty keys don't get produced.
2013-10-11LaTeX reader: Ensure that preamble doesn't contribute to text of doc.John MacFarlane1-8/+8
2013-10-11LaTeX reader: Fixed character escaping in \url{}.John MacFarlane1-3/+1
Previously `\~` wasn't handled properly, among others.
2013-09-28LaTeX reader: Parse {groups} as Span.John MacFarlane1-1/+10
This is needed for accurate conversion of bibtex titles, since we need to know what was protected from titlecase conversions.
2013-09-01Use registerHeader in RST and LaTeX readers.John MacFarlane1-3/+3
This will give automatic unique identifiers, unless `-auto_identifiers` is specified.
2013-08-28LaTeX reader: allow spaces in alignment spec in tables.John MacFarlane1-2/+3
E.g. `{ l r c }`.
2013-08-27LaTeX reader: Allow accents with combining characters.John MacFarlane1-185/+185
accent now returns [Char], not Char.
2013-08-27Merge branch 'master' of github.com:jgm/pandocJohn MacFarlane1-5/+3
2013-08-25Merge pull request #961 from nougad/add_latex_listings_labelJohn MacFarlane1-1/+2
Write id for code block to label attr in latex when listing is used
2013-08-24Removed dependency on citeproc-hs.John MacFarlane1-4/+1
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-1/+2
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-21LaTeX reader: Added o-cedilla.John MacFarlane1-0/+2
2013-08-21Merge pull request #960 from semorrison/masterJohn MacFarlane1-0/+6
Processing some additional cedilla accents while reading LaTeX
2013-08-21cedilla-o breaks the compile, removing againScott Morrison1-2/+0
2013-08-21adding some cedilla characters to the LaTeX readerScott Morrison1-0/+8
2013-08-16LaTeX reader: parse label after section command and set id.John MacFarlane1-2/+4
Closes #951.
2013-08-16LaTeX reader missing \oe and \OE charactersScott Morrison1-0/+2
2013-08-16adding support for breve accents via \u{} while reading LaTeXScott Morrison1-0/+16
2013-08-10Use walk, walkM in place of bottomUp, bottomUpM when possible.John MacFarlane1-2/+2
They are significantly faster.
2013-08-10Adjustments for new Format newtype.John MacFarlane1-1/+1
2013-07-25LaTeX reader: Support `\v{}` for hacek.John MacFarlane1-0/+37
Closes #926.
2013-07-21LaTeX reader: Don't add spurious ", " to citation suffixes.John MacFarlane1-7/+3
This is added when needed in Text.Pandoc.Biblio anyway.
2013-06-27LaTeX reader: Support alltt environment.John MacFarlane1-2/+12
Closes #892.
2013-06-24Use new flexible metadata type.John MacFarlane1-27/+22
* 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.