Matthew Pickering
615aa94c3d
Make safeRead safe.
...
Fixes #1801
2015-02-18 21:09:07 +00:00
Matthew Pickering
b02b5b9d5e
Change return type of Txt2Tags reader
2015-02-18 21:09:07 +00:00
Matthew Pickering
6de6eae737
Change return type of Textile reader
2015-02-18 21:09:06 +00:00
Matthew Pickering
f61db38290
Change return type of TWiki reader
2015-02-18 21:09:06 +00:00
Matthew Pickering
2b7073860b
Change return type of RST reader
2015-02-18 21:09:06 +00:00
Matthew Pickering
4c91049345
Change return type of Org reader
2015-02-18 21:09:06 +00:00
Matthew Pickering
db6baab217
Change return type of OPML reader
2015-02-18 21:09:06 +00:00
Matthew Pickering
ef2a8107e2
Change return type of Native reader
2015-02-18 21:09:06 +00:00
Matthew Pickering
41d9527533
Change return type of Mediawiki reader
2015-02-18 21:09:06 +00:00
Matthew Pickering
acefbe99a9
Change return type of Markdown reader
2015-02-18 21:09:06 +00:00
Matthew Pickering
b8acb9f541
Change return type of LaTeX reader
2015-02-18 21:09:06 +00:00
Matthew Pickering
9f6a92d664
Change return type of Haddock reader
2015-02-18 21:09:06 +00:00
Matthew Pickering
b9e04825cf
Change return type of HTML reader
2015-02-18 21:09:06 +00:00
Matthew Pickering
b935ef6de5
Change return type of EPUB reader
2015-02-18 21:09:06 +00:00
Matthew Pickering
1b12340859
Change return type of Docx reader
2015-02-18 21:09:06 +00:00
Matthew Pickering
dcb4951aad
Change return type of DocBook reader
2015-02-18 21:09:05 +00:00
Matthew Pickering
8381ac3b02
Add Text.Pandoc.Error module with PandocError type
2015-02-18 21:09:05 +00:00
Matthew Pickering
ef981492fd
Remove partial function from Pretty
2015-02-18 20:11:08 +00:00
Matthew Pickering
bf8667660d
Remove landmine from ImageSize
2015-02-18 20:11:08 +00:00
Matthias C. M. Troffaes
dccd408a9c
Allow digit as first character of a citation key.
...
* Update parser to recognize citation keys starting with a digit.
* Update documentation accordingly.
* Test case added.
See https://github.com/jgm/pandoc-citeproc/issues/97
2015-02-18 15:30:17 +00:00
Matthew Pickering
9cd0bdb41a
Factor out "returnState" into Parsing module
2015-02-18 12:50:21 +00:00
Matthew Pickering
febe5112af
HLint changes
2015-02-18 12:50:21 +00:00
Matthew Pickering
13fb1d6101
Remove F Monad from Markdown reader
2015-02-18 12:50:21 +00:00
Matthew Pickering
dc450d80a1
Generalise signature of addWarning
2015-02-18 12:50:21 +00:00
Matthew Pickering
d4ab579dc3
Add check to see whether in a footnote to ParserState (to avoid circular footnotes)
2015-02-18 12:50:21 +00:00
Matthew Pickering
2b58060007
Remove F monad from Parsing
2015-02-18 12:50:21 +00:00
Matthew Pickering
9d77206827
Changed parseWithWarnings to the more general returnWarnings parser transformer
2015-02-18 12:50:21 +00:00
Matthew Pickering
e8677bae78
Remove F monad from Org Reader.
2015-02-18 12:50:21 +00:00
Matthew Pickering
7a649170be
Added generalize function which can be used to lift specialised parsers.
...
Monad m => Parsec s st a -> Parsec T s st m a
2015-02-18 12:50:20 +00:00
John MacFarlane
3480189e8e
ICML writer: Better handling of raw blocks and inlines.
...
Previously these were always escaped and printed verbatim.
Now they are ignored unless the format is "icml", in which
case they are passed through unescaped.
Closes #1951 .
2015-02-17 08:50:48 -08:00
John MacFarlane
e32227f744
Allow wildcards in --epub-embed-font
arguments.
...
Closes #1939 .
2015-02-13 23:34:20 -08:00
John MacFarlane
d5469b30fe
Improved building of data URIs in SelfContained.
...
Now base64 is used except for 'text/*' mime types. Closes #1940 .
2015-02-13 21:37:43 -08:00
Jesse Rosenthal
24fd0ad04d
Docx reader: Handle lists correctly inside table cells.
...
Previously we didn't transform lists inside table cells.
2015-02-13 09:02:16 -05:00
Jesse Rosenthal
ba59e5447f
Docx writer: Add footnotes id -1 and 0.
...
Word uses, by default, footnotes with id -1 and 0 for separators. If a
user modifies reference.docx, they will end up with a settings.xml file
that references these footnotes, but no such footnotes in the
document. This will produce a corruption error. Here we add these to the
document and settings.xml file, so future modifications won't break the file.
2015-02-12 09:21:41 -05:00
Jesse Rosenthal
96d5c8a5dc
Docx Writer: Add "BodyText" Style
...
We apply a "BodyText" style to all unstyled paragraphs. This is,
essentially, the same as "Normal" up until now -- except that since not
everything inherits from "BodyText" (the metadata won't, for example, or
the headers or footnote numbers) we can change the text in the body
without having to make exceptions for everything.
This will still inherit from Normal, so if we want to
change *everything*, we can do it through "Normal".
2015-02-11 15:06:36 -05:00
Jesse Rosenthal
25ef68d266
Docx Writer: Use FirstParagraph style at beginning.
...
Before we had used `FirstParagraph` style after Headings, BlockQuotes,
and other blocks a user might not want an indentation after. We hadn't
actually used it for the first paragraph -- i.e. the opening of the
body. This makes sure the first body paragraph gets that style.
2015-02-10 21:05:13 -05:00
Jesse Rosenthal
daab4c3f22
Docx Writer: Implement FirstParagraph Style
...
Following the odt writer, we make the first text paragraph following an
image, blockquote, table, or heading into a "FirstParagraph" style. This
allows it to be styled differently, if the user wishes. The default is
for it to be the same as "Normal"
2015-02-09 23:22:52 -05:00
John MacFarlane
12962e2332
Merge pull request #1927 from freephile/master
...
update syntax for Images/Media files in MediaWiki
2015-02-07 20:33:33 -08:00
John MacFarlane
bd7cf8dbd5
Merge branch 'patch/fixTexinfoWrap' of https://github.com/timtylin/scholdoc into timtylin-patch/fixTexinfoWrap
...
Conflicts:
src/Text/Pandoc/Writers/Texinfo.hs
2015-02-07 20:28:56 -08:00
Tim Lin
858ebf99eb
Texinfo writer: fix wrapping by using breakable spaces
2015-02-06 01:16:40 -08:00
Greg Rundlett
218f28af6d
update syntax for Images/Media files in MediaWiki
...
The preferred syntax for Images and other media is [[File:Foo.jpg]] in MediaWiki since v1.14 (2008). [[Image:Foo.jpg]] is deprecated but still works as an alias to the File namespace. I don't think this would break any existing wikis since talk of switching the syntax/namespace for images started back in 2002 (https://phabricator.wikimedia.org/T2044 ). NS_FILE became the new namespace for Files in v 1.14 in late 2008. (https://www.mediawiki.org/wiki/Release_notes/1.14 ) There is still a namespace alias so '[[Image:]]' still works today. It's just that MediaWiki supports other media as well, and so the name and syntax used in documentation (see https://www.mediawiki.org/wiki/Help:Images ) has long been '[[File:foo.jpg]]'
2015-02-05 17:07:50 -05:00
Tim Lin
0c18f3a854
Append newline to the LineBreak of various writers
...
This change improves output formatting of content with a large amount of force line breaks, such as line-blocks. The following writers are affected:
* Dokuwiki
* HTML
* EPUB (via HTML)
* LaTeX
* MediaWiki
* OpenDocument
* Texinfo
This commit resolves #1924
2015-02-04 22:42:22 -08:00
John MacFarlane
fb7a03dcda
Textile reader: table improvements.
...
* Handle newlines in cells.
* Handle empty cells.
* Closes #1919 .
2015-02-02 10:45:50 -08:00
John MacFarlane
7050c26abc
LaTeX writer: Don't escape $ in URL. Closes #1913 .
2015-02-01 11:19:55 -08:00
John MacFarlane
6a0d4da382
HTML writer: Add "inline" or "display" class to math spans.
...
This allows inline and display math to be styled differently.
Closes #1914 .
2015-02-01 11:08:27 -08:00
Konstantin Zudov
92e762c2d6
Refactored if x then [] else y
to [y | not x]
2015-01-29 22:36:23 +02:00
Konstantin Zudov
b5cc01e976
Do not ommit missing alt
attribute on img
tag
...
Fixes #1131
2015-01-29 22:16:38 +02:00
John MacFarlane
82c04a28ce
Fixed list-style-type for numbered example lists.
...
Should be "decimal," not "example." Closes #1902 .
2015-01-27 16:56:56 -08:00
John MacFarlane
33d1c8cc01
Merge pull request #1885 from mb21/html-reader-tables
...
fixes HTML Reader: tables
2015-01-25 10:46:47 -08:00
mb21
b40d33b174
fixes #1859 HTML Reader table parsing
2015-01-25 09:41:12 +01: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
Jesse Rosenthal
eb11c61182
Docx: Parse images in deprecated vml format.
...
Some older versions of word use vml (vector markup language) and put
their images in a "v:imagedata" tag inside a "w:pict". We read those as
we read the more modern "blip" inside a "w:drawing".
Note that this does not mean the reader knows anything about vml. It
just looks for a `v:imagdata`. It's possible that, with more complicated
uses of images in vml, it won't do the right thing.
2015-01-21 13:41:16 -05:00
John MacFarlane
8a7db5cc9d
Use CPP to avoid unneeded import warning for blaze-markup >= 0.6.3.
...
See https://github.com/jgm/pandoc/pull/1888#issuecomment-70470409
2015-01-19 10:29:57 -08:00
John MacFarlane
030d3b597d
Custom writer: Raise PandocLuaException
instead of using 'error'.
...
Eventually we'll change the return type so that no exception
is involved, but at least this can be trapped.
2015-01-18 22:04:42 -08:00
John MacFarlane
ab8b00ea0c
Custom writer: raise error if loadstring returns an error status.
...
This will make debugging custom scripts much easier.
2015-01-18 21:48:04 -08:00
John MacFarlane
25e12ca7b2
EPUB writer: properly handle internal links to IDs in spans, divs.
...
Closes #1884 .
2015-01-17 11:27:49 -08:00
mb21
6aa41b86d0
don't log Try xelatex if xelatex already in use, closes #1832
2015-01-11 15:24:04 +01:00
Mark Wright
9c68017786
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:48:01 +11:00
Mark Wright
dbe1b38816
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:47:33 +11:00
Mark Wright
5ea3856bb0
ghc 7.10.1 RC1 requires FlexibleContexts https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#Inferredtype-signaturesnowmayrequiretoenableFlexibleContextsGADTsorTypeFamilies
2015-01-05 14:46:57 +11:00
Mark Wright
c80c9ac9da
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:46:40 +11:00
Mark Wright
8b9bded796
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:46:15 +11:00
Mark Wright
e4c7894d01
ghc 7.10.1 RC1 requires FlexibleContexts https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#Inferredtype-signaturesnowmayrequiretoenableFlexibleContextsGADTsorTypeFamilies
2015-01-05 14:42:45 +11:00
Mark Wright
2a6f68f4bf
ghc 7.10.1 RC1 requires FlexibleContexts https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#Inferredtype-signaturesnowmayrequiretoenableFlexibleContextsGADTsorTypeFamilies
2015-01-05 14:42:26 +11:00
Mark Wright
4e3281c550
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:41:54 +11:00
Mark Wright
cd5b1fe5e3
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:41:35 +11:00
Mark Wright
ed7606da9a
ghc 7.10.1 RC1 requires FlexibleContexts https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#Inferredtype-signaturesnowmayrequiretoenableFlexibleContextsGADTsorTypeFamilies
2015-01-05 14:40:59 +11:00
Mark Wright
b748833889
ghc 7.10.1 RC1 requires FlexibleContexts https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#Inferredtype-signaturesnowmayrequiretoenableFlexibleContextsGADTsorTypeFamilies ; 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:40:30 +11:00
Mark Wright
10d53989d8
ghc 7.10.1 RC1 requires FlexibleContexts https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#Inferredtype-signaturesnowmayrequiretoenableFlexibleContextsGADTsorTypeFamilies ; 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:40:06 +11: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
Mark Wright
693f9abb18
Allow haddock-library 1.2, by calling the Documentation.Haddock.Types.MetaDoc record accessor function _doc :: MetaDoc mod id -> DocH mod id
2015-01-05 14:35:31 +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
52310eb470
SelfContained: Add ;charset=utf-8
to script mime type if missing.
...
Closes #1842 .
2014-12-31 14:51:23 -08:00
John MacFarlane
e3422dc438
Added --verbose
flag for debugging output in PDF production.
...
Closes #1840 .
Closes #1653 .
2014-12-26 11:19:55 -07:00
John MacFarlane
2c3310a592
Added Text.Pandoc.Compat.Locale to assist with transition to time 1.5.
2014-12-19 16:13:38 -08:00
John MacFarlane
005eda2f02
MediaWiki writer: Fixed links with URL = text.
...
Previously these were rendered as bare words, even if the URL
was not an absolute URL.
Closes #1825 .
2014-12-19 11:32:37 -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
fcd1599b09
FB2 writer: Add newline to output.
2014-12-15 22:14:29 -08:00
John MacFarlane
4c03231e9b
getDefaultTemplate: don't fail when called with "fb2".
...
Closes #1660 .
2014-12-15 22:10:03 -08:00
John MacFarlane
08abbc4604
LaTeX writer: Handle consecutive linebreaks.
...
Closes #1733 .
2014-12-15 22:04:18 -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
0eb3f8cff2
HTML writer: put newline btw img and caption paragraph.
2014-12-15 21:49:16 -08:00
John MacFarlane
61d2c2e8cb
LaTeX writer: better handling of display math in simple tables.
...
We convert display math to inline math in simple tables,
since LaTeX can't deal with display math in simple tables.
Closes #1754 .
2014-12-15 21:14:07 -08:00
John MacFarlane
cb8bb4705f
EPUB writer: include "landmarks" section in nav document for epub3.
...
Closes #1757 .
2014-12-15 20:56:03 -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
Matthew Pickering
e6bd29e9b8
Text.Pandoc.Writers.RTF: Add blankline at end of output
...
Closes #1732
2014-12-15 21:35:47 +00:00
Matthew Pickering
a17f6f2f39
Text.Pandoc.Readers.HTML: Retain display type of MathML output
...
Closes #1719
2014-12-15 21:35:47 +00:00
Matthew Pickering
58e4e4a608
Text.Pandoc.Parsing: Change parseFromString to fail if not all input is
...
consumed.
2014-12-15 21:35:46 +00:00
John MacFarlane
a5cac0a0c4
Don't treat a citation as a reference link label.
...
Closes #1763 .
2014-12-15 10:54:12 -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
c37db57c9a
EPUB writer: Removed playOrder from navpoint elements in ncx file.
...
These aren't required, and they make manual modification of epubs
difficult. Closes #1760 .
2014-12-15 10:22:19 -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
544f3e5b45
Merge branch 'use-texorpdfstring' of https://github.com/wilx/pandoc into wilx-use-texorpdfstring
...
Conflicts:
src/Text/Pandoc/Writers/LaTeX.hs
tests/Tests/Writers/LaTeX.hs
2014-12-15 10:01:50 -08:00
John MacFarlane
a864e9a348
Merge pull request #1805 from bergey/rst
...
RST Reader - Improved Role Support
2014-12-15 09:06:45 -08:00
John MacFarlane
9e75b9b84b
DocBook readers: Include id on section headers.
...
Closes #1818 .
2014-12-14 23:46:25 -08:00
John MacFarlane
269b33d24b
DocBook reader: Handle menuchoice elements better.
...
They are now rendered with a `>` between them.
Closes #1817 .
2014-12-14 23:37:54 -08:00
John MacFarlane
c350847943
DocBook reader: get string content in inner tags for literal elements.
...
Closes #1816 .
2014-12-14 19:12:48 -08:00
John MacFarlane
9e83cd62a6
DocBook reader: handle keycombo, keycap.
...
Closes #1815 .
2014-12-14 19:03:48 -08:00
John MacFarlane
1d3ca088f2
Merge pull request #1813 from tarleb/file-links
...
Org reader: properly handle links to `file:target`
2014-12-14 13:36:34 -08:00
Albert Krewinkel
4d85b17fc5
Org reader: properly handle links to file:target
...
Org links like `[[file:target][title]]` were not handled correctly,
parsing the link target verbatim. The org reader is changed such that
the leading `file:` is dropped from the link target.
This is related to issues #756 and #1812 .
2014-12-14 21:30:10 +01:00
John MacFarlane
2b08e32a90
Fixe autolinks with following punctuation.
...
Closes #1811 .
The price of this is that autolinked bare URIs can no longer
contain `>` characters, but this is not a big issue.
2014-12-14 12:20:33 -08:00
Daniel Bergey
ea157cf23f
RST: warn about ignored fields in role directives
2014-12-12 14:45:45 +00:00
Daniel Bergey
689fb112bf
RST Reader: compute Attrs when role is defined
...
Move recursive role lookup from renderRole to addNewRole. The Attr value
will be the same for every occurance of this role, so there's no reason
to compute it every time. This allows simplifying the
stateRstCustomRoles map considerably.
We could go even further, and remove the fmt and attr arguments to
renderRole, which are null except for custom roles.
2014-12-12 14:45:45 +00:00
Daniel Bergey
dc3ea9840e
RST reader: improve support for custom roles
...
- Add "sourceCode" to classes for :code: role, and anything inheriting
from it.
- Add the name of the custom role to classes if the Inline constructor
supports Attr.
- If the custom role directive does not specify a parent role, inherit
from the :span: role.
This differs somewhat from the rst2xml.py behavior. If a custom role
inherits from another custom role, Pandoc will attach both roles' names
as classes. rst2xml.py will only use the class of the directly invoked
role (though in the case of inheriting from a :code: role with a
:language: defined, it will also provide the inherited language as a
class).
2014-12-12 14:45:45 +00:00
Daniel Bergey
dba066a33d
RST: literal role should produce Code,
...
code role should have "code" class.
http://docutils.sourceforge.net/docs/ref/rst/roles.html says that
`text`:literal` is the same as ``text``. docutils outputs a <literal>
element in both cases, whereas for the code role, it outputs a <literal>
element with the "code" class.
2014-12-12 14:45:44 +00:00
Daniel Bergey
15816853a3
expose warnings from RST reader; refactor
...
This commit moves some code which was only used for the Markdown Reader
into a generic form which can be used for any Reader. Otherwise, it
takes naming and interface cues from the preexisting Markdown code.
2014-12-12 14:45:44 +00:00
John MacFarlane
4ffa70970d
Merge pull request #1695 from bjornbm/master
...
Escape inline verbatim spaces in LaTeX output
2014-12-10 09:07:46 -08:00
Bryan O'Sullivan
2150903230
DocBook reader: document/test "type" as implemented
2014-12-08 23:17:27 -08:00
Bryan O'Sullivan
fe1d147187
DocBook reader: add support for classname
2014-12-08 23:12:06 -08:00
Bryan O'Sullivan
33fdb6bc15
DocBook reader: add support for calloutlist and callout
...
We treat a calloutlist as a bulleted list. This works well in practice.
2014-12-08 22:26:09 -08:00
Matthew Pickering
48e2586ec8
Merge pull request #1746 from shelf/dw-ext-images
...
DokuWiki writer: fix external images
2014-12-08 23:55:36 +00:00
Nikolay Yakimov
f7b265e2ff
Fix for #1641 (docx table captions above tables)
...
Word doesn't really treat table captions as something special. It's just a paragraph with special style, nothing more, so simple reversal of output order in writer works fine.
2014-12-08 22:50:57 +00:00
Daniel Bergey
87e536b438
RST Reader: Warn about skipped directives
...
move `addWarning` to Parsing.hs, so it can be used by Markdown & RST readers.
2014-12-08 14:43:04 +00:00
Matthew Pickering
068bdbbc91
Merge pull request #1716 from lierdakil/issue1607-pullreq
...
First step to fixing internationalisation problems with docx output
2014-12-07 16:44:24 +00:00
Matthew Pickering
9761283c8f
Text.Pandoc.Pretty: Improve performance of realLength
...
Eliminates memory usage and twofold increase in speed.
2014-12-06 22:58:40 +00:00
Daniel Bergey
74c1b547c2
parse RST class directives
...
The class directive accepts one or more class names, and creates a Div
value with those classes. If the directive has an indented body, the
body is parsed as the children of the Div. If not, the first block
folowing the directive is made a child of the Div.
This differs from the behavior of rst2xml, which does not create a Div
element. Instead, the specified classes are applied to each child of
the directive. However, most Pandoc Block constructors to not take an
Attr argument, so we can't duplicate this behavior.
2014-12-01 18:22:03 +00:00
Daniel Bergey
2cdfa5eb20
parse RST quoted literal blocks
...
closes #65
RST quoted literal blocks are the same as indented literal blocks (which
pandoc already supports) except that the quote character is preserved in
each line.
This includes test cases for the quoted literal block, as well as
additional tests for line blocks and indented literal blocks, to verify
that these are unaffected by the changes.
2014-12-01 18:22:03 +00:00
John MacFarlane
4d296f70df
ICML writer: Don't force all citations into footnotes.
2014-11-30 22:30:04 -08:00
John MacFarlane
d8fde9547e
Reverted "omit blank lines after list items," better fix for #1777 .
...
Now we do as before, including blank lines after list items in
loose lists (even though RST doesn't care -- this is just a matter
of visual appeal). But we chomp any excess whitespace after the
last list item, which solves #1777 .
2014-11-25 12:34:44 -08:00
John MacFarlane
25e2c42347
RST writer: Omit blank lines after list items.
...
They are optional in RST (except after the last list item,
of course).
Fixes #1777 .
2014-11-25 12:24:33 -08:00
John MacFarlane
dc92a62883
RST writer: Ensure blank line after figure.
2014-11-25 12:24:14 -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
John MacFarlane
159c711675
Fixed double-rendering of footnotes in RST tables.
...
Closes #1769 .
2014-11-19 16:20:07 -08:00
John MacFarlane
7a5cb29319
Really fix #1758 . Add id="cover"
to body on cover page.
...
Not title page!
2014-11-17 15:43:40 -08:00
John MacFarlane
91a26fcdc4
Use regular page template for nav.xhtml.
...
This includes the HTML doctype.
Closes #1759 .
2014-11-16 21:43:05 -08:00
John MacFarlane
4aadcd51b5
Make embed
tag either block or inline.
...
Closes #1756 .
2014-11-16 20:51:35 -08:00
John MacFarlane
333fc60684
Changed mime type for otf to application/vnd.ms-opentype.
...
Closes #1761 . This is needed for epub3 validation.
See http://www.idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.3.1
2014-11-16 20:29:38 -08:00
John MacFarlane
46d343f474
Fixed bug in org with bulleted lists:
...
- a
- b
* c
was being parsed as a list, even though an unindented `*`
should make a heading. See
<http://orgmode.org/manual/Plain-lists.html#fn-1 >.
2014-11-13 23:40:18 -08:00
Caleb McDaniel
196c4f2343
Account for external link URLs with anchors
...
Previously, if a URL had an anchor, such as
http://johnmacfarlane.net/pandoc/README.html#synopsis
the reader would incorrectly identify it as an internal link
and return "#synopsis" for the link in output.
2014-11-13 00:42:58 -05:00
John MacFarlane
43c1978fae
Merge pull request #1645 from neongreen/issue1636
...
Fix 'Ext_lists_without_preceding_blankline' bug.
2014-11-12 09:05:29 -08:00
Timothy Humphries
ffae1567fd
DokuWiki writer: fix external images
...
Handles #1739 . Preface relative links with ":", absolute URIs without.
2014-11-09 00:35:29 -05:00
Albert Krewinkel
e6cd8c9077
Org reader: allow empty links for gitit interop
...
While empty links are not allowed in Emacs org-mode, Pandoc org-mode
should support them: gitit relies on empty links as they are used to
create wiki links.
Fixes jgm/gitit#471
2014-11-05 23:15:28 +01:00
Albert Krewinkel
daaf635806
Org reader: absolute, relative paths in links
...
The org reader was to restrictive when parsing links, some relative
links and links to files given as absolute paths were not recognized
correctly. The org reader's link parsing function was amended to handle
such cases properly.
This fixes #1741
2014-11-05 22:27:25 +01:00
John MacFarlane
f3ac41937d
DokuWiki writer: Better handling of block quotes.
...
This change ensures that multiple paragraph blockquotes are
rendered using native `>` rather than as HTML.
Closes #1738 .
2014-11-04 14:52:19 -08:00
John MacFarlane
1d268876f8
Merge pull request #1726 from AlexanderS/twiki-parser
...
TWiki Reader: add new new twiki reader
2014-10-31 12:02:14 -07:00
John MacFarlane
deaefb18ca
ODT writer: Correctly handle images without extensions.
...
Closes #1729 .
2014-10-30 15:54:04 -07:00
Alexander Sulfrian
c3780992ab
TWiki Reader: add new new twiki reader
2014-10-30 19:54:48 +01:00
Todd Sifleet
8ad321d0d4
Strip querystring in ODT write
...
* Resolve #1682
* Strip querystring from filename before rendering ODT files, ODT cannot
handle querystrings in files.
2014-10-28 18:45:36 -07:00
Nikolay Yakimov
96c4b9e2e6
Docx reader: fix for Issue #1692 (i18n styles)
...
This patch builds paragraph styles tree, then checks if paragraph has
style.styleId or style/name.val matching predetermined patterns.
Works with "Heading#" (name.val="heading #") for headings and
"Quote"|"BlockQuote"|"BlockQuotation" (name.val="Quote"|"Block Text")
for block quotes.
2014-10-25 15:54:44 -04:00
Nikolay Yakimov
3c894987b2
Docx Writer: Partial fix for #1607
...
International heading styles are inferred based on `<w:name val="heading #">` fallback, if there are no en-US "Heading#" styles
2014-10-24 23:57:06 +04:00
John MacFarlane
e16683b539
HTML writer: Make header attributes work outside top level.
...
Previously they only appeared on top level header elements.
Now they work e.g. in blockquotes.
Closes #1711 .
2014-10-23 10:27:14 -07:00
John MacFarlane
e4f3475eaa
DOCX writer: Look in user data dir for archive reference.docx.
2014-10-21 14:33:15 -07:00
John MacFarlane
78bdc08de7
Merge pull request #1706 from tarleb/org-symbol-entities
...
Org reader: parse LaTeX-style MathML entities
2014-10-21 10:11:19 -07:00
John MacFarlane
0714a363c6
Merge pull request #1668 from gbataille/widthFromRef2
...
Getting the page width from the reference file
2014-10-21 10:05:51 -07:00
John MacFarlane
7f6bbfadf4
Pretty: Make CR + BLANKLINE = BLANKLINE.
...
This fixes an extra blank line we were getting at the end
of markdown fragments (as well as rst, org, etc.)
Closes #1705 .
2014-10-20 20:26:08 -07:00
Albert Krewinkel
a5eb02f6a7
Org reader: parse LaTeX-style MathML entities
...
Org supports special symbols which can be included using LaTeX syntax,
but are actually MathML entities. Examples for this are
`\nbsp` (non-breaking space), `\Aacute` (the letter A with accent acute)
or `\copy` (the copyright sign ©).
This fixes #1657 .
2014-10-20 22:57:36 +02:00
John MacFarlane
d7169c715d
Parsing: fixed inlineMath
so it handles \text{..}
containing $
.
...
For example: `$x = \text{the $n$th root of $y$}`. Closes #1677 .
2014-10-19 16:42:56 -07:00
John MacFarlane
328ff8e71f
Markdown reader: allow startnum
to work without fancy_lists
.
...
Formerly `pandoc -f markdown-fancy_lists+startnum` did not work
properly.
2014-10-18 13:58:08 -07:00
John MacFarlane
84f6b1e41a
Merge pull request #1680 from shelf/master
...
Respect indent when parsing Org bullet lists
2014-10-18 13:20:27 -07:00
John MacFarlane
31713d572a
Merge pull request #1700 from tarleb/org-emphasis-fix
...
Org reader: fix rules for emphasis recognition
2014-10-18 13:19:42 -07:00