Nikolay Yakimov
6a0d500f99
Latex Reader: Guard against para starting with inline macro
2015-03-30 06:42:15 +03:00
Nikolay Yakimov
f3e8274d04
LaTeX Reader: check for block-level newcommand aliases in blockCommand
2015-03-30 05:37:00 +03:00
John MacFarlane
6a3a04c428
Merge branch 'errortype' of https://github.com/mpickering/pandoc into mpickering-errortype
...
Conflicts:
benchmark/benchmark-pandoc.hs
src/Text/Pandoc/Readers/Markdown.hs
src/Text/Pandoc/Readers/Org.hs
src/Text/Pandoc/Readers/RST.hs
tests/Tests/Readers/LaTeX.hs
2015-03-28 12:12:48 -07:00
John MacFarlane
3b962a5277
Properly gobble spaces after \\.
...
Closes #2007 .
2015-03-14 23:12:04 -07:00
John MacFarlane
348b383731
LaTeX reader: allow block content in \title{}.
...
Closes #2001 .
2015-03-14 23:11:04 -07:00
Mathias Schenner
12bf0ff3e5
LaTeX reader: allow non-empty colsep in tables
...
The `tabular` environment allows non-empty column separators
with the "@{...}" syntax. Previously, pandoc would fail to
parse tables if a non-empty colsep was present. With this
commit, these separators are still ignored, but the table gets
parsed. A test case is included.
2015-03-08 15:47:39 +01:00
Mathias Schenner
1e3ef0e36f
LaTeX reader: allow valign argument in tables
...
The `tabular` environment takes an optional parameter for
vertical alignment. Previously, pandoc would fail to parse
tables if this parameter was present. With this commit,
the parameter is still ignored, but the table gets
parsed. A test case is included.
2015-03-08 15:39:18 +01:00
John MacFarlane
efdc1691fa
LaTeX reader: ignore options in \lstinline
.
...
Rather than raising a parse error. Closes #1997 .
2015-03-07 19:58:49 -08:00
Matthew Pickering
b8acb9f541
Change return type of LaTeX reader
2015-02-18 21:09:06 +00:00
John MacFarlane
d90dc6b8b5
LaTeX reader: don't limit includes to .tex extension.
...
Previously `\input` and `\include` would only work if the
included files had the extension `.tex`. This change relaxes
that restriction, though if the extension is not `.tex`, it
must be given explicitly in the `\input` or `\include`.
Closes #1882 .
2015-01-22 23:17:25 -08:00
Mark Wright
f18ceb1b5e
ghc 7.10.1 RC1 requires specifying the type of String literals https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#GHCsaysNoinstanceforFoldable...arisingfromtheuseof ...
2015-01-05 14:38:06 +11:00
John MacFarlane
e7187fa3bb
LaTeX reader: handle tabular*
environment.
...
This change allows pandoc not to choke on the table-width parameter
of `tabular*`. Note that the table width is not actually parsed
or taken into account, but this should give tolerable results in
many cases.
Closes #1850 .
2015-01-01 08:46:45 -08:00
John MacFarlane
7e41d0b1ee
LaTeX reader: parse math environments as inline when possible.
...
Closes #1821 .
2014-12-16 12:27:04 -08:00
John MacFarlane
58ea1ce5f1
LaTeX reader: parse label after caption into a span...
...
instead of inserting an additional paragraph of bracketed text.
Closes #1747 .
2014-12-15 21:50:10 -08:00
John MacFarlane
8a3363a269
Merge branch 'patch-1' of https://github.com/Wikiwide/pandoc into Wikiwide-patch-1
...
Conflicts:
src/Text/Pandoc/Readers/LaTeX.hs
2014-12-15 20:27:42 -08:00
John MacFarlane
9bf76fa5a2
LaTeX reader: better handling of \noindent
and \greektext
.
...
Closes #1783 .
2014-12-15 10:34:59 -08:00
John MacFarlane
47c360e079
Improved texorpdfstring patch #1148 .
...
* Make LaTeX reader recognize texorpdfstring.
* Don't use texorpdfstring unless it's actually needed.
* Fix tests.
2014-12-15 10:06:03 -08:00
John MacFarlane
6c0943000d
LaTeX reader: support \smartcite
and \Smartcite
from biblatex.
...
See jgm/pandoc-citeproc#26 .
2014-11-25 10:03:43 -08:00
Wikiwide
678aa31561
cref, sep
...
Adding inlineCommands
2014-10-03 11:33:02 +10:00
Matthew Pickering
83028c5982
Exported runParserT and Stream
2014-07-22 16:37:41 +01:00
Matthew Pickering
2fb8063f78
Removed (>>~) function
...
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-07-11 12:51:26 +01:00
John MacFarlane
fc291efad3
LaTeX reader: Correctly handle table rows with too few cells.
...
LaTeX seems to treat them as if they have empty cells at the
end. Closes #241 .
2014-06-17 00:38:55 -07:00
John MacFarlane
87c08be58f
LaTeX reader: handle leading/trailing spaces in emph better.
...
`\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-16 19:18:33 -07:00
John MacFarlane
459805de4c
LaTeX reader: don't assume preamble doesn't contain environments.
...
Closes #1338 .
2014-06-16 17:43:56 -07:00
James Aspnes
abbf33ae7d
allow (and discard) optional argument for \caption
2014-06-12 21:19:00 -04:00
John MacFarlane
9681574661
LaTeX reader: Handle comments at the end of tables.
...
This resolves the issue illustrated in
http://stackoverflow.com/questions/24009489/comments-in-latex-break-pandoc-table .
2014-06-03 23:17:42 -07:00
Albert Krewinkel
3238a2f919
Org reader: support for inline LaTeX
...
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-20 22:29:21 +02:00
John MacFarlane
aa019448d6
LaTeX reader: Support \addbibresource
.
2014-05-12 13:06:06 -07:00
John MacFarlane
a8319d1339
LaTeX reader: set bibliography
in metadata from \bibliography
cmd.
2014-05-11 22:52:29 -07:00
John MacFarlane
0092606476
LaTeX reader: Don't error on "%foo" with no newline.
2014-05-10 23:26:32 -07:00
Albert Krewinkel
8fdbef841d
Update copyright notices for 2014, add missing notices
2014-05-09 00:46:08 +02:00
John MacFarlane
2ba7873086
LaTeX reader: Fixed regression introduced with last commit.
...
Tests now pass again.
2014-05-03 18:34:23 -07:00
John MacFarlane
743dac493f
LaTeX reader: Better error messages with include files.
...
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-05-03 17:37:54 -07:00
John MacFarlane
22e36e1040
LaTeX reader: Made \nocite
work.
...
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-26 12:14:42 -07:00
John MacFarlane
fcddd0e4bd
LaTeX reader: handle @{} and p{length} in tabular.
...
The length is not actually recorded, but at least we get a table.
Closes #1180 .
2014-04-06 15:11:49 -07:00
John MacFarlane
69a7c9f634
LaTeX reader: Better handling of figure and table with caption.
...
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-25 23:10:43 -07:00
John MacFarlane
994597f071
Revert "LaTeX reader: Added LPState."
...
This reverts commit 82ddec698e
.
2014-03-25 22:40:18 -07:00
John MacFarlane
82ddec698e
LaTeX reader: Added LPState.
...
Plan is to use this instead of ParserState in LP.
2014-03-25 15:38:30 -07:00
John MacFarlane
5e69f845d5
LaTeX reader: Better handling of "table" environment.
...
Positioning options no longer rendered verbatim.
Partially addresses #1204 .
2014-03-25 12:04:25 -07:00
Henry de Valence
0c5e7cf8cb
HLint: use elem
and notElem
...
Replaces long conditional chains with calls to `elem` and `notElem`.
2013-12-19 20:19:24 -05:00
John MacFarlane
0132f6fcb7
LaTeX reader: Support babel-style quoting: ` "
..."' ``.
2013-12-17 16:03:43 -08:00
Jeff Arnold
5adbe7b365
LaTeX reader: add support for Verb macro
2013-12-13 19:16:04 -05:00
John MacFarlane
def05d3504
HTML reader: Parse LaTeX math if appropriate options are set.
...
* Moved inlineMath, displayMath from Markdown reader to Parsing.
* Export them from Parsing. (API change.)
* Generalize their types.
2013-12-06 17:15:13 -08:00
John MacFarlane
a3eba6ee84
LaTeX reader: Parse contents of curly quotes or matched "
as quotes.
2013-11-18 20:28:27 -08:00
John MacFarlane
e690c87dc4
LaTeX reader: Support \textnormal
as span with class "nodecor".
...
This is needed for pandoc-citeproc.
2013-11-17 09:07:25 -08:00
John MacFarlane
75ea0c4d0d
LaTeX reader: Improved citation parsing.
...
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-21 09:33:10 -07:00
John MacFarlane
1a55c8f5de
LaTeX reader: Ensure that preamble doesn't contribute to text of doc.
2013-10-11 22:43:47 -07:00
John MacFarlane
25e43d1c89
LaTeX reader: Fixed character escaping in \url{}.
...
Previously `\~` wasn't handled properly, among others.
2013-10-11 10:43:07 -07:00
John MacFarlane
9e7072cf1b
LaTeX reader: Parse {groups} as Span.
...
This is needed for accurate conversion of bibtex titles,
since we need to know what was protected from titlecase conversions.
2013-09-28 11:53:34 -07:00
John MacFarlane
9282f63278
Use registerHeader in RST and LaTeX readers.
...
This will give automatic unique identifiers, unless
`-auto_identifiers` is specified.
2013-09-01 09:13:31 -07:00