Commit graph

7370 commits

Author SHA1 Message Date
Hubert Plociniczak
edc951ee7d [ODT Parser] Include list's starting value
Previously the starting value of the lists' items has been
hardcoded to 1. In reality ODT's list style definition can
provide a new starting value in one of its attributes.

Writers already handle the modified start value so no need
to change anything in that area.
2016-10-12 18:36:40 +02:00
John MacFarlane
cbeb72d06b MANUAL: Made formatting of arguments with several options consistent. 2016-10-12 11:15:08 +02:00
John MacFarlane
ced4032a35 Note on --reference-links about --reference-location. 2016-10-12 11:13:28 +02:00
John MacFarlane
901045b0bb Merge pull request #3159 from jkr/refs
Specify location for footnotes (and reference links) in MD output
2016-10-12 11:11:06 +02:00
Jesse Rosenthal
afbeba952d MANUAL.txt: document --reference-location. 2016-10-11 22:30:13 -04:00
Jesse Rosenthal
4b0dbdc118 Markdown writer: add test for note placement. 2016-10-11 22:26:03 -04:00
Jesse Rosenthal
14209b2ba0 Add reference-location options to executable. 2016-10-11 15:17:07 -04:00
Jesse Rosenthal
ca50deeeee Markdown writer: Allow footnotes/refs at the end of blocks, sections
This allows footnotes and refs to be placed at the end of blocks and
sections. Note that we only place them at the end of blocks that are at
the top level and before headers that are the top level. We add an
environment variable to keep track of this. Because we clear the
footnotes and refs when we use them, we also add a state variable to
keep track of the starting number.

Finally, note that we still add any remaining footnotes at the end. This
takes care of the final section, if we are placing at the end of a
section, and will always come after a final block as well.
2016-10-11 15:17:01 -04:00
Jesse Rosenthal
6914808139 Add ReaderT monad for environment variables.
This will make it easier to keep track of what level of block we are at.
2016-10-11 13:53:47 -04:00
Jesse Rosenthal
27113bda1f Options: Add references location.
This will be used by the markdown writer for deciding where to put links
and footnotes.
2016-10-11 13:30:01 -04:00
Albert Krewinkel
bb48f2edc4
Org reader: trim verse lines properly
An empty verse line should not result in `Str ""` but in `mempty`.
2016-10-10 21:12:47 +02:00
John MacFarlane
f4b7ab125e More checks for Ext_raw_html when rendering HTML in Markdown.
Previously we'd emit raw HTML tables even if the `raw_html`
extension was disabled.

Now we just emit `[TABLE]` if no table formats are enabled
and raw HTML is not enabled.

We also check for the `raw_html` extension before emiting
a raw HTML block.

Closes #3154.
2016-10-10 11:23:04 +02:00
John MacFarlane
5a0d91f115 Merge pull request #3156 from ickc/removing-googlecode
Delete googlecode-upload.sh
2016-10-10 10:13:01 +02:00
ickc
8b7b42eaf5 Delete googlecode-upload.sh 2016-10-09 18:07:20 -07:00
KolenCheung
be5bd22fc4 remove temporary checklist 2016-10-09 21:30:03 +02:00
KolenCheung
a06586a6fd update manual accordingly 2016-10-09 21:30:03 +02:00
KolenCheung
46be319ca9 removed mmd raw_tex in src/Text/Pandoc/Options.hs 2016-10-09 21:30:03 +02:00
KolenCheung
ea5c6200b3 add a temp file to keep track of all files involving markdown_mmd and multimarkdownExtensions 2016-10-09 21:30:03 +02:00
John MacFarlane
d8600d6627 Added a small clarification on --webtex with Markdown output.
Thanks to @ickc.
2016-10-06 11:08:52 +02:00
KolenCheung
6613359182 fix typo 2016-10-06 11:04:37 +02:00
KolenCheung
4d621f43d9 Replace Google Chart API by CodeCogs 2016-10-06 11:04:37 +02:00
Jesse Rosenthal
6d05c378d0 Docx writer: Move one more env var to Reader monad
PrintWidth is set at the beginning and stays the same throughout the
document writing, so we just set it as an env variable in the Reader
monad.
2016-10-05 08:15:55 -04:00
Jesse Rosenthal
4eba314c24 Docx writer: code legibility fixups.
More meaningful variable name, and explanatory comment.
2016-10-05 08:06:22 -04:00
Jesse Rosenthal
be27c9c646 Docx writer: Clean up and streamline RTL behavior
Now RTL is turned and off by a general function, `withDirection`
wrapping `inlineToOpenXML` and `blockToOpenXML`. This acts according to
the `envRTL` variable. This means we can just set the environment at the
outset, and change the environment with `local` as need be.

Note that this requires making the `inlineToOpenXML` and
`blockToOpenXML` functions into wrappers around
primed-versions (`{inline,block}ToOpenXML`) where the real work takes
place.
2016-10-04 11:18:11 -04:00
Jesse Rosenthal
1893f8fe48 Docx writer: move a couple more vars to ReaderT
In general, we want things that are either:

 1. unchanging environment variables, or
 2. environment variables that will change for a the scope of
    a function and then pop back

to be in the reader monad. This is safer for (1), since we won't
accidentally change it, and easier for (2), since we can use `local`
instad of setting the old value and then resetting.

We keep the StateT monad for values that we will want to accumulate or
change and then use later.
2016-10-04 08:54:35 -04:00
John MacFarlane
3f9a0a8bc4 Merge pull request #3141 from ickc/master
Update KaTeX to v0.6.0
2016-10-04 10:03:45 +02:00
KolenCheung
f7d92b5765 Update KaTeX to v0.6.0 2016-10-03 23:53:16 -07:00
Jesse Rosenthal
41f4c8741f Clean up commented-out code
A few commented out functions were left in the code during the
conversion from StateT to ReaderT. This removes them.
2016-10-03 21:48:59 -04:00
Jesse Rosenthal
ab31d5ea8d Remove bool on setRTL.
We had to use this because we set the env, which means that setRTL
wouldn't do anything at the top level. We now don't set the env (it will
always be false at the outset), which means the toplevel setRTL will
work if necessary.
2016-10-03 21:39:40 -04:00
Jesse Rosenthal
666c042e80 Filter text/para props correctly.
We only filter on the name, not the prefix.
2016-10-03 21:39:40 -04:00
Jesse Rosenthal
acf352331c Add a boolean flag to the setRTL function.
At the toplevel we don't check to see if RTL is already set.
2016-10-03 21:39:40 -04:00
Jesse Rosenthal
e98be61a38 Test for "dir" metadata. 2016-10-03 21:39:40 -04:00
Jesse Rosenthal
8d148c02a8 Add setRTL and setLTR functions. 2016-10-03 21:39:34 -04:00
Jesse Rosenthal
a2d3854f23 Move more enviroment vars to Reader Monad.
Things that get pushed and then reset are better in ReaderT, because
they can be run with `local`.
2016-10-03 12:12:38 -04:00
Jesse Rosenthal
6a3d1cf210 Add ReaderT env to the docx writer:
This will allow us to add text and paragraph properties depending on if
rtl is already set or not.

(It would probably be cleaner and safer to move the paraprops and
textprops to this part of the stack in the future.)
2016-10-03 07:50:40 -04:00
John MacFarlane
1435906f09 MediaWiki writer: transform filename with underscores in images.
`foo bar.jpg` becomes `foo_bar.jpg`. This was already done
for internal links, but it also needs to happen for images.

Closes #3052.
2016-10-02 22:09:20 +02:00
John MacFarlane
d0bfcbb801 EPUB writer: use stringify instead of plain writer for metadata.
This means that underscores won't be used for emphasis,
or CAPS for bold.  The metadata fields will just have unadorned
text.

Closes #3066.
2016-10-02 22:01:22 +02:00
John MacFarlane
46d8b42da5 AsciiDoc writer: avoid unnecessary use of "unconstrained" emphasis.
In AsciiDoc, you must use a special form of emphasis (double `__`)
for intraword emphasis.  Pandoc was previously using this more
than necessary.

Closes #3068.
2016-10-02 21:51:34 +02:00
John MacFarlane
a99d81dce3 Revert overhasty bounds change for pandoc-types. 2016-10-02 20:58:24 +02:00
John MacFarlane
c28c16d463 Use doctemplates 0.1.0.2. 2016-10-02 12:29:37 +02:00
John MacFarlane
7ecafa6ff1 Removed unneeded stack.hsb2hs.yaml. 2016-10-02 11:09:47 +02:00
John MacFarlane
fcb45c3505 Use doctemplates 0.1.0.1. 2016-10-02 11:07:10 +02:00
John MacFarlane
e4b74aa2e5 Added doctemplates to stack.lts6.yaml. 2016-10-02 09:42:16 +02:00
John MacFarlane
5ec9b6352c Moved template compiling/rendering code to a separate library.
jgm/doctemplates.

This allows the pandoc templating system to be used independently.
2016-10-02 09:30:26 +02:00
John MacFarlane
f49ed2e71a Removed cabal 1.16 cruft from .travis.yml. 2016-10-01 21:12:01 +02:00
John MacFarlane
9a2d92a395 Merge pull request #3136 from nichtich/patch-1
Execute .js filters with node
2016-09-30 08:30:04 +02:00
Jakob Voß
06fa6986d1 Execute .js filters with node 2016-09-30 07:20:43 +02:00
John MacFarlane
6b2bb8f1cc Update changelog. 2016-09-28 12:53:36 +02:00
John MacFarlane
e95047ed85 Markdown reader: added bracket syntax for native spans.
See #168.

Text.Pandoc.Options.Extension has a new constructor `Ext_brackted_spans`,
which is enabled by default in pandoc's Markdown.
2016-09-28 12:33:05 +02:00
John MacFarlane
03167bb447 Updated test suite. 2016-09-28 12:01:42 +02:00