John MacFarlane
10e28ef750
More principled fix for #1820 .
...
If the tag parses as a comment, we check to see if the
input starts with `<!--`. If not, it's bogus comment mode
and we fail htmlTag.
Includes test case. Closes #1820 .
2015-04-17 22:56:33 -07:00
John MacFarlane
764f677530
Merge branch 'latex-tightlist' of https://github.com/jlduran/pandoc into jlduran-latex-tightlist
...
Conflicts:
data/templates
2015-04-17 19:23:13 -07:00
John MacFarlane
28ca8566ab
Merge pull request #1954 from mcmtroffaes/feature/citekey-firstchar-alphanum
...
Allow digit as first character of a citation key.
2015-04-17 19:10:37 -07:00
John MacFarlane
44fcc5f96e
Merge pull request #2079 from lierdakil/rst-normalize-headings
...
RST Writer: Normalize headings to sequential levels
2015-04-17 19:06:25 -07:00
John MacFarlane
fb143be038
Merge pull request #2092 from lierdakil/issue1909
...
MD Reader: Smart apostrophe after inline math
2015-04-17 18:55:35 -07:00
John MacFarlane
13b230a1b5
Fixed htmlTag
in HTML reader.
...
Require that `<!` or `<?` be followed by nonspace.
This prevents `</ div>` from being parsed as a comment.
Closes #1820 .
2015-04-17 18:35:49 -07:00
Nikolay Yakimov
4229cf2d92
MD Reader: Smart '
after inline math
...
Closes #1909 .
Adds new parser combinator to Parsing.hs
`a <+?> b`
: if a succeeds, applies b and mappends
output (if any) to result of a. If b fails,
it's just a, if a fails, whole expression fails.
2015-04-18 01:23:41 +03:00
Nikolay Yakimov
3f5d5a0a76
RST Writer: treat headings in block quotes, etc as rubrics
2015-04-16 12:12:00 +03:00
Nikolay Yakimov
2337ef68fc
Docx Writer: Take TOC title from toc-title metadata field
2015-04-14 13:16:19 +03:00
Nikolay Yakimov
deb95d380e
RST Writer: Normalize headings to sequential levels
...
This is pretty much required by docutils.
2015-04-13 20:45:40 +03:00
John MacFarlane
5ae48b7eaf
Fixed warning.
2015-04-12 22:06:44 -07:00
John MacFarlane
0439f6f964
Fixed toc depth in RST writer.
...
Previously the depth was being rendered as a floating point
number with a decimal point. Thanks to Nick Yakimov for
noticing this.
2015-04-12 22:06:44 -07:00
John MacFarlane
fee04fbee0
Merge pull request #2072 from lierdakil/latex-reader-cleanup
...
LaTeX Reader: Code cleanup
2015-04-12 21:39:08 -07:00
John MacFarlane
a9628d0745
Text.Pandoc.PDF: more comprehensible errors on image conversion.
...
Closes #2067 .
EPS can't be supported without shelling out to something like
ImageMagick, but at least we can avoid mysterious error messages.
We now get:
pandoc: Unable to convert `circle.eps' for use with pdflatex.
! Package pdftex.def Error: File `circle-eps-converted-to.pdf' not found.
which seems more straightforward.
2015-04-12 21:18:21 -07:00
Nikolay Yakimov
b92d49092f
LaTeX Reader: Code cleanup
2015-04-12 14:50:38 +03:00
Nikolay Yakimov
b2ba922638
ODT Writer: Figure captions
...
Works pretty much the same as Word writer.
Following styles are used for figures:
Figure -- for figure with empty caption
FigureWithCaption (based on Figure) -- for figure with caption
FigureCaption (based on Caption) -- for figure captions
Also, TableCaption (based on Caption) is used for table captions.
We need FigureWithCaption to set keepWithNext, in order to keep caption
with figure.
2015-04-12 00:34:03 +03:00
John MacFarlane
5a33032560
Removed redundat import.
2015-04-07 23:26:20 -07:00
John MacFarlane
250fbef94d
DocBook reader: look inside "info" elements for section titles.
...
Closes #1931 .
2015-04-07 22:15:20 -07:00
John MacFarlane
28497d484e
RST writer: better handling of raw latex inline.
...
We use `` :raw-latex:`...` `` and add a definition for this
role to the template.
Closes #1961 .
2015-04-07 22:07:38 -07:00
Julien Cretel
b28c846018
Markdown Reader: eliminate common subexpressions
2015-04-07 13:46:32 +01:00
John MacFarlane
b29a8a5516
EPUB writer: Take TOC title from toc-title metadata field.
2015-04-02 21:28:55 -07:00
John MacFarlane
8d39d03d05
Added "noProof" to docx syntax highlighting SourceCode style.
2015-04-01 15:21:55 -07:00
John MacFarlane
9a79538ac9
Merge pull request #2042 from lierdakil/issue1866
...
LaTeX Reader: check for block-level newcommand aliases in blockCommand
2015-03-31 09:44:15 -07:00
Nikolay Yakimov
f1eb1ab9cf
Latex Reader: Block commands code cleanup
2015-03-31 14:32:42 +03:00
John MacFarlane
2b2f7fe15e
Merge pull request #2035 from lierdakil/issue2031
...
Docx Writer/Reference: Add keepNext to objects w/ captions
2015-03-30 20:30:15 -07:00
John MacFarlane
ccb828894b
Added CommonMark writer.
...
Added `Text.Pandoc.Writers.CommonMark`, exporting
`writeCommonMark`.
2015-03-29 23:42:42 -07:00
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
34c6ff1f60
Merge pull request #2038 from lierdakil/docx-hyphen-settings
...
Docx Writer: Copy hyphenation settings from reference.docx
2015-03-29 09:58:45 -07:00
John MacFarlane
91128aac99
Merge pull request #2037 from lierdakil/issue458
...
Docx Writer: support for --toc option
2015-03-29 09:47:49 -07:00
Matthew Pickering
f3aa03ee86
Docx Writer: Filter out illegal XML characters
...
Fixes #1992
2015-03-29 13:38:52 +01:00
Nikolay Yakimov
4d1e85a09e
Docx Writer: Place toc after abstract, rather than before
2015-03-29 13:46:34 +03:00
Nikolay Yakimov
6ba37909fe
Docx Writer: Copy hyphenation settings from reference.docx
2015-03-29 12:24:17 +03:00
Nikolay Yakimov
5ab839a187
Docx Writer: Initial support for --toc option (issue #458 )
...
Creates a "dirty" TOC at the beginning of document, before abstract
2015-03-29 09:03:33 +03:00
Nikolay Yakimov
69d5085c11
Docx Writer: Add a style to figure images
...
Figures with empty captions use style "Figure"
Figures with nonempty captions use style "Figure with Caption", which is
based on "Figure", and additionally has keepNext set.
2015-03-29 08:02:18 +03:00
John MacFarlane
2d2e4c9ab2
Merge branch 'master' of https://github.com/rootzlevel/pandoc into rootzlevel-master
...
Conflicts:
src/Text/Pandoc/Readers/Org.hs
2015-03-28 21:09:38 -07:00
John MacFarlane
8c6ad05ad3
Updated code example in Text.Pandoc.
2015-03-28 13:37:18 -07: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
Nikolay Yakimov
5f7639a0d6
Markdown Reader: Require nonempty value in mmd title block
...
`many1Till` will gobble up newline, and then whole following line will
match, so I had to use guard here.
2015-03-28 07:07:03 +03:00
Nikolay Yakimov
7091002966
Markdown Reader: Req. " " after key in mmd title block
...
Require space after key-value delimiter colon in mmd title block.
Issue #2026
Amend: parsec's `spaces` include newlines, but we don't want that. Had
to make custom `spaceNoNewline` parser here
2015-03-28 07:05:02 +03:00
Nikolay Yakimov
6960b2a4cc
Markdown Reader: Disable meta exts for meta values
...
Disable all metadata block extensions when parsing metadata field
values. Issue #2026
2015-03-28 02:53:33 +03:00
Nikolay Yakimov
d09b7593f6
Docx Writer: Fix StyleMap
...
I've messed up badly with it, so it didn't work properly most of the
time. At the plus side, fallback mechanic is working wonderfully.
2015-03-24 19:24:29 +03:00
John MacFarlane
75a2a7ba69
Allow pipe tables with header but no body.
...
Closes #2017 .
2015-03-23 20:26:56 -07:00
Matthew Pickering
65d67dcb51
Fix accidently usage of list monad instance
2015-03-23 00:14:02 +00:00
Matthew Pickering
84d6703ea7
Add missing import
2015-03-22 23:31:08 +00:00
Matthew Pickering
4ce6471c12
Factor out "returnState" into Parsing module
2015-03-22 21:47:28 +00:00
Matthew Pickering
9e150dd7cf
HLint changes
2015-03-22 21:47:28 +00:00
Matthew Pickering
17b317268b
Remove F Monad from Markdown reader
2015-03-22 21:47:28 +00:00
Matthew Pickering
7690e1d17f
Generalise signature of addWarning
2015-03-22 20:11:30 +00:00
Matthew Pickering
9ca34cc9a9
Add check to see whether in a footnote to ParserState (to avoid circular footnotes)
2015-03-22 20:11:30 +00:00