aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX.hs
AgeCommit message (Collapse)AuthorFilesLines
2017-03-24Revert "LaTeX reader: be more picky about beamer angle arguments."John MacFarlane1-1/+1
This reverts commit b98a05d604ab4353c2e684beecf669b182d88906.
2017-03-24LaTeX reader: be more picky about beamer angle arguments.John MacFarlane1-1/+1
We now only allow them if they contain only numbers, spaces, `-`, and `,`.
2017-03-13Better handling of \part in LaTeX.John MacFarlane1-8/+17
Closes #1905. Removed stateChapters from ParserState. Now we parse chapters as level 0 headers, and parts as level -1 headers. After parsing, we check for the lowest header level, and if it's less than 1 we bump everything up so that 1 is the lowest header level. So `\part` will always produce a header; no command-line options are needed.
2017-03-10Expand \newenvironment macros.John MacFarlane1-10/+12
Closes #987. Depends on still unreleased texmath 0.9.3.
2017-03-09LaTeX reader: Treat `{{xxx}}` the same as `{xxx}`.John MacFarlane1-9/+14
Closes #2115.
2017-03-07Markdown reader: Treat certain environments as inlineJohn MacFarlane1-1/+3
when they occur without space surrounding them. E.g. equation, math. This avoids incorrect vertical space around equations. Closes #3309. Closes #2171. See also rstudio/bookdown#358.
2017-03-06LaTeX reader: allow newpage, clearpage, pagebreak in inline contextsJohn MacFarlane1-0/+5
as well as block contexts. Closes #3494.
2017-03-05LaTeX reader: support all \textXX commands.John MacFarlane1-1/+5
where XX = rm, tt, up, md, sf, bf. Spans with a class are used when there is nothing better. Closes #3488.
2017-03-05LaTeX reader: small improvements in parsing arguments.John MacFarlane1-10/+7
2017-03-05LaTeX reader: Handle spaces before \cite arguments.John MacFarlane1-3/+1
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane1-29/+29
2017-03-01LaTeX reader: don't drop contents of \hypertarget.John MacFarlane1-0/+3
2017-02-27LaTeX reader: Handle komascript `\dedication`.John MacFarlane1-0/+2
It now adds a `dedication` field to metadata. It is up to the user to supply a template that uses this variable. Closes #1845.
2017-02-27Minor cleanups in LaTeX reader.John MacFarlane1-5/+4
2017-02-25LaTeX reader: allow hspace and vspace to count as raw block or inline.John MacFarlane1-3/+5
Previously we would refuse to parse anything as raw inline if it was in the blockCommands list. Now we allow exceptions if they're listed under ignoreInlines in inlineCommands. This should make it easier e.g. to include an \hspace between two side-by-side raw LaTeX tables.
2017-02-25Revert "LaTeX reader: don't treat `\vspace` and `\hspace` as block commands."John MacFarlane1-0/+1
This reverts commit 2873cd82886d1fa557bf3abde37b5ceb3cadf40c.
2017-02-24Implemented `\graphicspath` in LaTeX reader.John MacFarlane1-1/+8
Closes #736.
2017-02-22When parsing raw LaTeX commands, include trailing space.John MacFarlane1-2/+2
Otherwise things like `\noindent foo` break and turn into `\noindentfoo`. Affects `-f latex+raw_tex` and `-f markdown` (and other formats that allow `raw_tex`). Closes #1773.
2017-02-14LaTeX reader: include contents of `\parbox`.John MacFarlane1-0/+1
2017-02-14Removed unnecessary import.John MacFarlane1-1/+1
2017-02-13LaTeX reader: properly handle column prefixes/suffixes.John MacFarlane1-12/+33
For example, in \begin{tabular}{>{$}l<{$}>{$}l<{$} >{$}l<{$}} each cell will be interpreted as if it has a `$` before its content and a `$` after (math mode).
2017-02-11Use new warnings throughout the code base.John MacFarlane1-6/+13
2017-02-10LaTeX reader: Improved messages for skipped environments.John MacFarlane1-5/+13
2017-02-10LaTeX reader: Improved warning messages for unknown commands.John MacFarlane1-19/+23
2017-02-09LaTeX reader: Issue warnings when skipping unknown latex commands.John MacFarlane1-4/+10
See #3392.
2017-02-08LaTeX reader: support `\lstinputlisting`.John MacFarlane1-11/+34
Closes #2116.
2017-02-07Refactored some files formerly in LaTeX reader.John MacFarlane1-21/+2
* Export readFileFromDirs from Class. * Export insertIncludedFile from Parsing. Simplified code in LaTeX/RST readers.
2017-02-07Moved readFileFromDirs to Text.Pandoc.Class.John MacFarlane1-29/+9
This can be used in several different modules, not just LaTeX reader.
2017-02-07Refactored include file handling in LaTeX reader.John MacFarlane1-14/+16
2017-02-06Removed --parse-raw and readerParseRaw.John MacFarlane1-7/+12
These were confusing. Now we rely on the +raw_tex or +raw_html extension with latex or html input. Thus, instead of --parse-raw -f latex we use -f latex+raw_tex and instead of --parse-raw -f html we use -f html+raw_html
2017-01-25Removed readerSmart and the --smart option; added Ext_smart extension.John MacFarlane1-2/+2
Now you will need to do -f markdown+smart instead of -f markdown --smart This change opens the way for writers, in addition to readers, to be sensitive to +smart, but this change hasn't yet been made. API change. Command-line option change. Updated manual.
2017-01-25Have warningWithPos take a SourcePos rather than Maybe SourcePos.John MacFarlane1-1/+1
After all, we have warning if you don't want the source pos info.
2017-01-25LaTeX reader: add warning when parsing unescaped charactersJohn MacFarlane1-4/+5
that normally need escaping in LaTeX.
2017-01-25LaTeX reader: Make sure we process includes in preamble.John MacFarlane1-0/+1
2017-01-25LaTeX reader: further fixes to include.John MacFarlane1-7/+11
2017-01-25Give source position for include file loop.John MacFarlane1-1/+1
2017-01-25LaTeX reader: Proper include file processing.John MacFarlane1-111/+33
* Removed handleIncludes from LaTeX reader [API change]. * Now the ordinary LaTeX reader handles includes in a way that is appropriate to the monad it is run in.
2017-01-25Readers: pass errors straight up to PandocMonad.Jesse Rosenthal1-1/+1
Since we've unified error types, we can just throw the same error at the toplevel.
2017-01-25Unify Errors.Jesse Rosenthal1-2/+2
2017-01-25Working on readers.Jesse Rosenthal1-98/+105
2016-11-26LaTeX reader: don't treat `\vspace` and `\hspace` as block commands.John MacFarlane1-1/+0
Fixed an error which came up, for example, with `\vspace` inside a caption. (Captions expect inlines.) Closes #3256.
2016-11-20Allow beamer-style <...> options in raw LaTeX (also in Markdown).John MacFarlane1-1/+13
This allows use of things like `\only<2,3>{my content}` in Markdown that is going to be converted to beamer. Closes #3184.
2016-11-19LaTeX reader: improved table handling.John MacFarlane1-4/+13
We can now parse all of the tables emitted by pandoc in our tests. The only thing we don't get yet are alignments and column widths in more complex tables. See #2669.
2016-11-19LaTeX reader: limited support for minipage.John MacFarlane1-0/+2
2016-11-19LaTeX reader: improved parsing of tables.John MacFarlane1-5/+13
Reader can now parse simple LaTeX tables such as those generated by pandoc itself. We still can't handle pandoc multiline tables which involve minipages and column widths. Partially addresses #2669.
2016-11-02LaTeX reader: Handle BVerbatim from fancyvrb. Fixes #3203.John MacFarlane1-10/+15
2016-11-01Handle hungarumlaut in LaTeX reader. Closes #3201.John MacFarlane1-0/+16
2016-10-31LaTeX reader: allow for []s inside LaTeX optional args.John MacFarlane1-1/+2
Fixes cases like: \begin{center} \begin{tikzpicture}[baseline={([yshift=+-.5ex]current bounding box.center)}, level distance=24pt] \Tree [.{S} [.NP John\index{i} ] [.VP [.V likes ] [.NP himself\index{i,*j} ]]] \end{tikzpicture} \end{center}
2016-07-29LaTeX reader: drop duplicate `*` in bibtexKeyCharsAlbert Krewinkel1-1/+1
2016-07-20LaTeX reader: be more forgiving of non-standard characters.John MacFarlane1-1/+1
E.g. `^` outside of math. Some custom environments give these a meaning, so we should try not to fall over when we encounter them.