Commit graph

5339 commits

Author SHA1 Message Date
John MacFarlane
0f970ed95b EPUB writer: Avoid excess whitespace in nav.xhtml.
This should improve TOC view in iBooks.  Closes #1392.
2014-07-20 23:28:44 -07:00
John MacFarlane
64c7a0ab76 Include lot and lof variables in latex template.
These can be set to get `\listoftables` and `\listoffigures`.
Closes #1407.

At this point we won't add a command line argument, because
this only affects one writer.  But the variables can be set
at the command line with

    -Vlof -Vlot

or in YAML metadata.
2014-07-20 21:58:16 -07:00
John MacFarlane
98c7ada061 HTML reader: parse Div and Span elements even without --parse-raw.
Closes #1434.
2014-07-20 21:43:54 -07:00
John MacFarlane
b6c769084e Fix behavior of markdown_attribute extension.
It now works as in PHP markdown extra.  Setting `markdown="1"` on
an outer tag affects all contained tags until it is reversed with
`markdown="0"`.  Closes #1378.

Added `stateMarkdownAttribute` to `ParserState`.
2014-07-20 17:44:28 -07:00
John MacFarlane
a243afb551 Markdown reader: Fixed small bug in HTML parsing with markdown_attribute.
Test case:

    <aside markdown="1">
    *hi*
    </aside>

Previously gave:

    <article markdown="1">
    <p><em>hi</em> </article></p>
2014-07-20 17:22:29 -07:00
John MacFarlane
4d2e6e826d Updated changelog. 2014-07-20 17:04:28 -07:00
John MacFarlane
4af8eed764 Markdown reader: revised definition list syntax (closes #1429).
* This change brings pandoc's definition list syntax into alignment
  with that used in PHP markdown extra and multimarkdown (with the
  exception that pandoc is more flexible about the definition markers,
  allowing tildes as well as colons).

* Lazily wrapped definitions are now allowed; blank space is required
  between list items; and the space before definition is used to
  determine whether it is a paragraph or a "plain" element.

* For backwards compatibility, a new extension,
  `compact_definition_lists`, has been added that restores the behavior
  of pandoc 1.12.x, allowing tight definition lists with no blank space
  between items, and disallowing lazy wrapping.
2014-07-20 16:33:59 -07:00
John MacFarlane
cdc4ecbe98 readWith: reverted generalization from f201bdcb.
We need input to be a string so we can print the offending line
on an error.
2014-07-20 13:51:03 -07:00
John MacFarlane
87096c64f8 Org reader: text adjacent to a list yields a Plain, not Para.
This gives better results for tight lists.  Closes #1437.

An alternative solution would be to use Para everywhere, and
never Plain.  I am not sufficiently familiar with org to know
which is best.  Thoughts, @tarleb?
2014-07-20 12:56:01 -07:00
John MacFarlane
0f01421f81 AsciiDoc writer: Double markers in intraword emphasis.
Closes #1441.
2014-07-20 12:24:53 -07:00
John MacFarlane
a7b64532f5 Merge pull request #1438 from mpickering/master
Renamed readTeXMath' to avoid name conflict with texmath 0.6.7
2014-07-19 17:18:35 -07:00
John MacFarlane
999b952a21 Require highlighting-kate >= 0.5.8.5. 2014-07-19 17:16:41 -07:00
Matthew Pickering
e7d8039969 Renamed readTeXMath' to avoid name conflict with texmath 0.6.7
Also removed deprecated readTeXMath.
2014-07-19 18:10:59 +01:00
John MacFarlane
fe6b4e532d Fixed typo in link 2014-07-17 19:40:01 -07:00
John MacFarlane
c3db0bb6a9 Merge pull request #1435 from bosmacs/org-babel-exports
Org reader: Respect :exports header arguments on code blocks
2014-07-17 10:37:28 -07:00
Craig S. Bosma
1bb4f0c497 Org reader: Respect :exports header arguments on code blocks
Adds support to the org reader for conditionally exporting either the code block,
results block immediately following, both, or neither, depending on the value
of the `:exports` header argument. If no such argument is supplied, the default
org behavior (for most languages) of exporting code is used.
2014-07-17 10:23:22 -05:00
John MacFarlane
e053562280 Remove unused import. 2014-07-16 23:56:24 -07:00
John MacFarlane
0e9d3db244 Custom writers now work with --template.
Removed HTML header scaffolding from data/sample.lua.
2014-07-16 15:17:08 -07:00
John MacFarlane
aa1ac5a0af Updated changelog. 2014-07-16 10:56:11 -07:00
John MacFarlane
2a881541a0 Made Citation information available in lua custom writer. 2014-07-16 09:32:41 -07:00
John MacFarlane
1bff443ac9 Removed redundant clause in markdown parser.
Thanks @dubiousjim.  Close #1431.
2014-07-16 07:55:39 -07:00
John MacFarlane
047f9b3714 Merge pull request #1430 from jkr/anchor-fix-2
Fix auto identified headers when already auto-id'ed
2014-07-15 20:27:28 -07:00
Jesse Rosenthal
4b2d07a642 Docx Reader: Fix hdr auto-id when already auto-id.
If header anchors (bookmarks in a header paragraph) already have an
auto-id, which will happen if they're generated by pandoc, we don't want
to rename it twice, and thus end up with an unnecessary number at the
end. So we add a state value to check if we're in a header. If we are,
we don't rename the bookmark -- wait until we rename it in our header
handling.
2014-07-16 03:50:38 +01:00
Jesse Rosenthal
a4671afd64 Docx Reader: Change state handling.
We don't need `updateDState` -- the built-in `modify` works just
fine. And we redefine `withDState` to use modify.
2014-07-16 03:43:14 +01:00
John MacFarlane
897c52880f HTML writer: Removed useless clause. 2014-07-15 16:49:48 -07:00
John MacFarlane
c24ab14918 LaTeX writer: Use \nolinkurl in email autolinks.
This allows them to be styled using `\urlstyle{tt}`.

Thanks to Ulrike Fischer for the solution.
2014-07-15 16:42:39 -07:00
John MacFarlane
73b0630217 EPUB writer: Keep newlines between block elements.
This allows easier diff-ability.  Closes #1424.
2014-07-15 15:41:42 -07:00
John MacFarlane
454d0e4d85 Require highlighting-kate 0.5.8.4.
For correct highlighting of identifiers in prolog and other languages.
2014-07-15 13:31:31 -07:00
John MacFarlane
b80577b395 Shared.fetchItem: unescape URI encoding before reading local file.
Close #1427.
2014-07-15 12:17:45 -07:00
Jesse Rosenthal
643435f1de Docx reader: Add test
Test auto ident header anchors with pandoc-generated pandoc.
2014-07-15 18:32:19 +01:00
John MacFarlane
5883899625 RTF writer: Avoid extra paragraph tags in metadata.
Closes #1421.
2014-07-13 16:40:07 -07:00
John MacFarlane
3e95fd586d Use raw HTML for complex block quotes.
As far as I can see, dokuwiki markup is pretty limited in what
can go in a `>` block quote:  just a single line of paragraph
text.  (#1398)
2014-07-13 16:15:45 -07:00
John MacFarlane
81088281de DokuWiki writer: Use raw HTML for complex lists...
as in the mediawiki writer.  The dokuwiki markup isn't able
to handle multiple block-level items within a list item, except
in a few special cases (e.g. code blocks, and these must be started
on the same line as the preceding paragraph).  So we fall back to
raw HTML for these.

Perhaps there is a better solution.  We can "fake" multiple
paragraphs within list items using hard line breaks (`\\`), but
we must keep everything on one line.

(#1398)
2014-07-13 16:04:29 -07:00
John MacFarlane
0ba2f0b8f9 DokuWiki writer: Normalize to collapse adjacent raw HTML blocks. 2014-07-13 15:48:01 -07:00
John MacFarlane
15956fcac7 DokuWiki writer: Updated tests. 2014-07-13 15:45:59 -07:00
John MacFarlane
71da4f8c55 DokuWiki writer: More tweaks to email links. (#1398) 2014-07-13 15:45:45 -07:00
John MacFarlane
80467d1b18 DokuWiki writer: Use pointy brackets for email links.
(#1398)
2014-07-13 15:36:14 -07:00
John MacFarlane
fbf7cbfdc8 Dokuwiki writer: More idiomatic code for escaping. 2014-07-13 15:32:16 -07:00
John MacFarlane
798c57d9b2 DokuWiki writer: More raw HTML fixes. (#1398)
* Use uppercase HTML tags for block-level content, lowercase for
  inline.
* Newline before closing HTML tag.
2014-07-13 15:28:47 -07:00
John MacFarlane
ce0960ba5a DokuWiki writer: Fix raw inlines and blocks.
* mediawiki > dokuwiki
* ignore raw content other than html or dokuwiki.

(#1398)
2014-07-13 15:25:25 -07:00
John MacFarlane
92bcd8d298 Markdown writer: Use span with style for SmallCaps. (#1360) 2014-07-13 15:21:50 -07:00
John MacFarlane
9d10df7ff4 Clarified documentation on small caps. (#1360) 2014-07-13 15:21:32 -07:00
John MacFarlane
f6b81b2905 Markdown writer: use Span instead of (hackish) SmallCaps in plainify. 2014-07-13 15:14:35 -07:00
John MacFarlane
a7daf29eaf EPUB writer: Use stringify instead of custom plainify.
As far as I can tell, it does about the same thing.
2014-07-13 15:10:44 -07:00
John MacFarlane
ea1bb4ed27 Better comment on removeFormatting. 2014-07-13 15:10:27 -07:00
John MacFarlane
5dba2e2192 Shared: Generalized type of removeFormatting. 2014-07-13 14:56:20 -07:00
John MacFarlane
5df812f7eb Merge branch 'claremacrae-dokuwiki'.
Use removeFormatting from Shared instead of the custom unfancy
function.
2014-07-13 14:44:53 -07:00
John MacFarlane
172a184274 Shared: Added removeFormatting.
API change (addition of exported function).
2014-07-13 10:13:22 -07:00
John MacFarlane
cb62cd08e0 Use renderTags' for all tag rendering.
This properly handles tags that should be self-closing.
Previously `<hr/>` would appear in EPUB output as `<hr></hr>`.
Closes #1420.
2014-07-13 08:28:28 -07:00
John MacFarlane
3516d9d09b Fixed typo in module header for Asciify.
Thanks to @dubiousjim. Closes #1419.
2014-07-12 23:47:38 -07:00