Commit graph

5405 commits

Author SHA1 Message Date
John MacFarlane
7e69f4a4fa Updated tests. 2014-08-20 09:23:19 -07:00
John MacFarlane
27ea34489a LaTeX template: disable microtype protrusion for typewriter font.
Closes #1549. Thanks to lemzwerg.
2014-08-20 08:17:10 -07:00
John MacFarlane
60f3e777f3 EPUB writer: don't use page-progression-direction in EPUB2.
Also, if page-progression-direction not specified in metadata,
don't include the attribute even in EPUB3; not including it is
the same as including it with the value "default", as we did before.

Closes #1550.
2014-08-19 09:21:26 -07:00
John MacFarlane
a79d477667 More Makefile tweaks. 2014-08-18 18:12:49 -07:00
John MacFarlane
112b2f9f52 Makefile tweaks. 2014-08-18 17:40:35 -07:00
John MacFarlane
84f27995ca Makefile: Added 'install' to PHONY list. 2014-08-18 16:14:31 -07:00
John MacFarlane
716ad5fd8a Merge pull request #1547 from jkr/styleparse
Docx reader: parsing styles
2014-08-18 14:14:01 -07:00
John MacFarlane
6dce8c6760 HTML reader: improved handling of tags that can be block or inline.
Previously a section like this would be enclosed in a paragraph,
with RawInline for the video tags (since video is a tag that can
be either block or inline):

    <video controls="controls">
       <source src="../videos/test.mp4" type="video/mp4" />
       <source src="../videos/test.webm" type="video/webm" />
       <p>
          The videos can not be played back on your system.<br/>
          Try viewing on Youtube (requires Internet connection):
          <a href="http://youtu.be/etE5urBps_w">Relative Velocity on
    Youtube</a>.
       </p>
    </video>

This change will cause the video and source tags to be parsed
as RawBlock instead, giving better output.

The general change is this:  when we're parsing a "plain" sequence
of inlines, we don't parse anything that COULD be a block-level tag.
2014-08-18 12:41:09 -07:00
John MacFarlane
ee88f5662b Improved osx build procedure. 2014-08-17 23:24:21 -07:00
Jesse Rosenthal
4b38e9f1f0 Docx reader: whitespace fix. 2014-08-17 20:11:50 -04:00
John MacFarlane
d5c41bdd84 Updated release checklist. 2014-08-17 16:29:22 -07:00
John MacFarlane
915ff1c9d3 Added tables.dokuwiki and tables.icml to extra-source-files. 2014-08-17 16:23:26 -07:00
John MacFarlane
ef7f08ba74 Updated changelog 2014-08-17 16:14:03 -07:00
John MacFarlane
3dd536a4ee Makefile: include trypandoc flag in main build target. 2014-08-17 16:12:46 -07:00
John MacFarlane
886cc0dd36 Added trypandoc flag to build trypandoc cgi executable.
Supporting files are in trypandoc/.
2014-08-17 16:11:09 -07:00
Jesse Rosenthal
198aea190f Docx reader: remove emph styles and strong styles list.
We no longer need the explicit lists since we're deriving them from the
ground up.
2014-08-17 17:04:55 -04:00
Jesse Rosenthal
9da7b0946e Docx reader: Add "Hyperlink" to blacklisted styles.
This is the only one so far. We'll add others as they show up.
2014-08-17 17:04:14 -04:00
Jesse Rosenthal
15ce28b8ca Docx reader: Use style resolver.
We now no longer check against explicit styles.
2014-08-17 17:03:44 -04:00
Jesse Rosenthal
03d5d8e596 Docx Reader: Introduce function for resolving dependent run styles.
We always favor an explicit positive or negative in a style in a
descendent, and only turn to the ancestor if nothing is set.

We also introduce an (empty) list of styles that are black-listed. We
won't check them. (Think underlines in hyperlinks).
2014-08-17 16:54:11 -04:00
John MacFarlane
fa0d9a28df Makefile: added osxpkg target. 2014-08-17 13:34:12 -07:00
John MacFarlane
90e4603f8a Bump version to 1.13.0.1. 2014-08-17 13:24:52 -07:00
John MacFarlane
bdaa5cbba6 Updated changelog. 2014-08-17 13:24:38 -07:00
John MacFarlane
8e60d35d58 Merge pull request #1536 from considerate/master
Add row width to tables in Docx XML
2014-08-17 12:54:38 -07:00
John MacFarlane
b6103eeb83 Merge pull request #1543 from jkr/superSubVert
Docx reader: Change behavior of Super/Subscript
2014-08-17 12:54:10 -07:00
John MacFarlane
c14088ea93 Docx writer: Fixed regression, bungled list numbering.
In pandoc 1.13, all lists come out as basic ordered lists.
This fixes that bad regression.

Closes #1544.
2014-08-17 12:48:41 -07:00
Jesse Rosenthal
99491f0d98 Docx Parse: build a bottom-up style tree.
Two points here: (1) We're going bottom-up, from styles not based on
anything, to avoid circular dependencies or any other sort of
maliciousness/incompetence. And (2) each style points to its
parent. That way, we don't need the whole tree to pass a style over to
Docx.hs
2014-08-17 15:46:17 -04:00
John MacFarlane
58cbd20b1f Removed check for PATH variable in running filters.
This cause problems on Windows 8, where the variable is called
`Path`.

Instead, simply trap the exception that will be raised by
`findExecutable` if path is not set.

This should fix #1542.
2014-08-17 10:33:18 -07:00
John MacFarlane
eab5fbb4fd Fixed typo in templates README. 2014-08-17 09:57:41 -07:00
Jesse Rosenthal
b8f1658c36 Alias string and runStyle to CharStyle type. 2014-08-17 11:30:22 -04:00
Jesse Rosenthal
c4871ac790 Docx Style parser: Basic one now just takes a parent style.
This will make it easier to build the style map from the bottom up (to
avoid any infinite references).
2014-08-17 10:19:48 -04:00
Jesse Rosenthal
75eec0a6b8 Docx reader: work with new rStyle.
Just discards info at the moment, so at least it works the same.
2014-08-17 09:22:25 -04:00
Jesse Rosenthal
ea85a797c2 Parser: Framework for parsing styles.
We want to be able to read user-defined styles. Eventually we'll be able
to figure out styles in terms of inheritance as well. The actual
cascading will happen in the docx reader.
2014-08-17 09:22:21 -04:00
Jesse Rosenthal
dc5b0ba09b Docx reader: Change behavior of Super/Subscript
In docx, super- and subscript are attributes of Vertalign. It makes more
sense to follow this, and have different possible values of Vertalign in
runStyle. This is mainly a preparatory step for real style parsing,
since it can distinguish between vertical align being explicitly turned
off and it not being set.

In addition, it makes parsing a bit clearer, and makes sure we don't do
docx-impossible things like being simultaneously super and sub.
2014-08-17 08:20:00 -04:00
John MacFarlane
9d52ecdd42 HTML reader: Parse appropriately styled span as SmallCaps. 2014-08-16 22:57:00 -07:00
Viktor Kronvall
753e47194c Simplify row width calculation. 2014-08-17 03:24:44 +02:00
Christoffer Ackelman
9f3c34841b Include row width in table rows.
Added a property to all table rows where the sum of column widths
is specified in pct (fraction of 5000).
2014-08-17 03:24:44 +02:00
John MacFarlane
cb4ae6112e Markdown writer: don't escape $, ^, ~ when extensions are deactivated.
`tex_math_dollars`, `superscript`, and `subscript` extensions,
respectively.

Closes #1127.
2014-08-16 17:14:51 -07:00
John MacFarlane
fd8ad0413b Makefile: Added 'quick' target. 2014-08-16 17:14:33 -07:00
John MacFarlane
118cdad8e8 Updated README in templates to indicate templates license.
The templates are duel licensed, BSD3 and GPL2+.
2014-08-16 16:48:46 -07:00
John MacFarlane
acde31585b Release checklist: No longer need to compile pandoc-dingus.
trypandoc is used.
2014-08-16 16:03:52 -07:00
John MacFarlane
7672997d18 Merge pull request #1540 from jkr/charStyles
Char styles
2014-08-16 15:39:56 -07:00
Jesse Rosenthal
9bb0b99981 Docx reader: Remove unnecessary plural functions
functions like runElemsToInlines and parPartsToInlines are just defined
in terms of concatting and mapping their singular
version (e.g. `runElemToInlines`). Having two functions with almost
identical names makes it easier to introduce errors. It's easy enough to
just concat and map inline, and it makes it clearer what is going on in
the code.
2014-08-16 15:07:41 -04:00
Jesse Rosenthal
180f5cbe63 Docx reader: Test for character styles. 2014-08-16 14:05:56 -04:00
Jesse Rosenthal
9969b2ebee Docx reader: Fix bug in character styles.
Style handling has been cleaned up, but introduced a bug here. There
wasn't previously a test to catch it.
2014-08-16 14:05:19 -04:00
John MacFarlane
b578245650 Merge pull request #1539 from jkr/builderRewrite
Rewrite Docx.hs and Reducible to use Builder.
2014-08-16 10:48:27 -07:00
Jesse Rosenthal
0ff9ec2f4e Rewrite Docx.hs and Reducible to use Builder.
The big news here is a rewrite of Docx to use the builder
functions. As opposed to previous attempts, we now see a significant
speedup -- times are cut in half (or more) in a few informal tests.

Reducible has also been rewritten. It can doubtless be simplified and
clarified further. We can consider this, at the moment, a reference for
correct behavior.
2014-08-16 10:22:55 -04:00
John MacFarlane
0d9b35a6e3 Minor Makefile tweaks. 2014-08-15 21:07:22 -07:00
John MacFarlane
a004216706 make_osx_package: add -osx suffix to package. 2014-08-15 09:51:59 -07:00
John MacFarlane
2b6e8f4c83 OSX installer improvements.
* Use new pkgbuild, productbuild instead of deprecated PackageMaker.
* Removed scripts, which are no longer needed.
* Added distribution.xml.
2014-08-15 00:46:01 -07:00
John MacFarlane
a44650bf97 Fixed typo in changelog. 2014-08-14 22:53:42 -07:00