Commit graph

5470 commits

Author SHA1 Message Date
John MacFarlane
3533218d6d Merge pull request #1594 from jkr/itemFix
Item fix
2014-08-31 19:31:38 -07:00
John MacFarlane
01b7957812 EPUB writer: Extract title even from structured title.
Added docTitle'.
2014-08-31 14:47:07 -07:00
John MacFarlane
5459b22d50 Use real copyright symbol in README epub metadata example. 2014-08-31 14:46:51 -07:00
Jesse Rosenthal
dfc8ab5a6a LaTeX writer: Add tests for header-in-item. 2014-08-31 16:05:20 -04:00
Jesse Rosenthal
d3053807a8 LaTeX writer: Put ~ before header in item text.
Because of the built-in line skip, LaTeX can't handle a section header
as the first element in a list item. (To be precise, it can't handle it
if the list immediately follows a section header, but the instance is
rare enough that we can afford to be a bit more general). This puts a
non-breaking space before the header to solve this problem. We won't see
this space, since the header skips a line before printing anyway.

The output is ugly in LaTeX and this structure seems like it should
probably be avoided. But it is valid HTML and native pandoc, so we
should have some sort of typesettable representation in LaTeX.
2014-08-31 16:05:09 -04:00
John MacFarlane
598d3ee23b Markdown reader: better handling of paragraph in div.
Previously text that ended a div would be parsed as Plain
unless there was a blank line before the closing div tag.

Test case:

    <div class="first">
    This is a paragraph.

    This is another paragraph.
    </div>

Closes #1591.
2014-08-31 12:55:47 -07:00
John MacFarlane
6cf9ab7855 README: escape (c) in epub metadata example 2014-08-31 12:31:36 -07:00
John MacFarlane
54df49335a EPUB writer: Don't use opf:title-type for epub2.
It is not supported and epubcheck complains.
2014-08-31 12:08:17 -07:00
John MacFarlane
d1948ce012 EPUB, EPUB3 templates: Handle structured metadata on titlepage.
Previously we just expected 'title', 'subtitle', 'author', 'date'.
Now we still support those, but also support the format recommended
for epub metadata in the pandoc README:

    ---
    title:
    - type: main
      text: My Book
    - type: subtitle
      text: An investigation of metadata
    creator:
    - role: author
      text: John Smith
    - role: editor
      text: Sarah Jones
    identifier:
    - scheme: DOI
      text: doi:10.234234.234/33
    publisher:  My Press
    rights:  (c) 2007 John Smith, CC BY-NC
    ...
2014-08-31 12:01:55 -07:00
John MacFarlane
b9d524c703 Use protocol-relative URL for mathjax.
See jgm/pandoc-templates#67.
2014-08-31 11:18:43 -07:00
John MacFarlane
611bc27862 Shared: Moved import of toChunks outside of conditional.
Closes #1590.
2014-08-31 11:17:53 -07:00
John MacFarlane
4455905550 Makefile: simplified 'make dist'.
Note that this may not work with older cabal versions.
2014-08-30 23:15:04 -07:00
John MacFarlane
374bb3c147 DokuWiki writer: Make tables prettier by aligning columns.
Also cleaned up crufty code and added tests.
2014-08-30 21:24:33 -07:00
John MacFarlane
d97aed3903 DokuWiki writer: Handle table cell alignments.
Closes #1566.
2014-08-30 20:54:33 -07:00
John MacFarlane
434ab0db13 Updated changelog. 2014-08-30 20:36:58 -07:00
John MacFarlane
a8273009ba Textile reader: Improved table support.
We can now handle all different alignment types, for simple
tables only (no captions, no relative widths, cell contents just
plain inlines).  Other tables are still handled using raw HTML.

Addresses #1585 as far as it can be addresssed, I believe.
2014-08-30 20:34:42 -07:00
John MacFarlane
b50927527c PDF: Catch errors in conversion of images and display message.
See #1582.
2014-08-30 18:45:58 -07:00
John MacFarlane
fcd35cc955 Put version in lower-left corner of man pages. 2014-08-30 16:11:45 -07:00
John MacFarlane
58b32107ad Makefile: Add README as dependency of man pages. 2014-08-30 15:39:40 -07:00
John MacFarlane
78da4d7bd8 Updated README date 2014-08-30 14:15:22 -07:00
John MacFarlane
6ce7081617 Version bump to 1.13.1. 2014-08-30 13:50:49 -07:00
John MacFarlane
9c8588f208 Makefile: Fixed install target to use copy, register.
This way the last configuration is used.
2014-08-30 13:40:45 -07:00
John MacFarlane
8f53918ebe Added new dokuwiki multiblock table tests to pandoc.cabal. 2014-08-30 13:14:50 -07:00
Jesse Rosenthal
4eb9769a4c Dokuwiki writer: Add a test for multiblock table cells.
We have to add a new file, because the original table tests don't look
for this.
2014-08-30 15:34:40 -04:00
John MacFarlane
c3f60e972c Updated changelog. 2014-08-30 11:52:37 -07:00
John MacFarlane
f70e3c3297 Merge branch 'mime' of https://github.com/Aelve/John into Aelve-mime
Conflicts:
	src/Text/Pandoc/Writers/Docx.hs
2014-08-30 11:49:50 -07:00
John MacFarlane
eb29aab959 Updated changelog. 2014-08-30 11:13:22 -07:00
John MacFarlane
ee28dfb502 Updated README on --self-contained.
Removed outdated claim that pandoc will look in the user data
directory if a relative path is specified and the file is not
found locally.  Closes #1572.
2014-08-30 11:09:15 -07:00
John MacFarlane
8b09d954f9 Merge pull request #1580 from jkr/stringCellDokuWiki
DokuWiki writer: Backslash newlines in table cells
2014-08-30 09:22:38 -07:00
John MacFarlane
b36600092c Removed extra blank line after version. 2014-08-30 08:16:00 -07:00
Jesse Rosenthal
ccda2a902c DokuWiki writer: Use backslash newlines in table cells.
Write out strings in table cells with backslash linebreaks in place of
newlines. We also want to remove the first two spaces of an indent in lists.
2014-08-30 07:17:55 -04:00
John MacFarlane
aab833b4b4 Updated changelog. 2014-08-29 22:41:25 -07:00
John MacFarlane
218633548f Merge pull request #1574 from jlduran/latex-horizontal-rule
LaTeX writer: Make Horizontal Rules more flexible
2014-08-29 21:40:55 -07:00
John MacFarlane
017d44af1d Merge branch 'ugly-tables' of https://github.com/jlduran/pandoc into jlduran-ugly-tables 2014-08-29 21:24:36 -07:00
Jose Luis Duran
4c684561ee LaTeX writer: Add \strut to fix multiline tables
See: http://tex.stackexchange.com/questions/34971
2014-08-29 13:54:08 +00:00
John MacFarlane
608e402802 Merge pull request #1577 from jkr/plainCells
Plain cells
2014-08-28 13:10:48 -07:00
Jesse Rosenthal
3b5a868533 Docx reader: update tests for new table behavior. 2014-08-28 14:39:04 -04:00
Jesse Rosenthal
c931be24e1 Docx Reader: Read single para in table cell as plain
This makes to docx reader's native output fit with the way the markdown
reader understands its markdown output. Ie, as far as table cells go:

docx -> native == docx -> native -> markdown -> native

(This identity isn't true for other things outside of table cells, of
course).
2014-08-28 14:35:33 -04:00
Jose Luis Duran
1fc665c07d LaTeX writer: Make Horizontal Rules more flexible
Currently, pandoc has hard-coded the following in order to make horizontal
rules in LaTeX:

```hs
"\\begin{center}\\rule{3in}{0.4pt}\\end{center}"
```

Which is fine, but does not allow customizations.  It also does not take into
consideration the current line width.

I'm proposing this change:

```diff
@@ In Writers/LaTeX.hs:
-"\\begin{center}\\rule{3in}{0.4pt}\\end{center}"
+"\\begin{center}\\rule{0.5\\linewidth}{\\linethickness}\\end{center}"
```
2014-08-28 03:12:37 +00:00
Jose Luis Duran
f1d330b7b5 LaTeX writer: Fix tables
- [x] Fix a bug introduced in 66378062b6, which
  causes the table caption to repeat across all pages
- [x] Address the issues discussed
  [here](https://groups.google.com/forum/#!msg/pandoc-discuss/qMu6_5lYy0o/ZAU7lzAIKw0J)
  regarding the extra vertical space.
  - [ ] NOTE: This will cause multiline table cells to appear unpadded. See
    http://tex.stackexchange.com/questions/34971
  - [x] Use [`\tabularnewline`](http://tex.stackexchange.com/questions/78796)
    instead of `\\`.
2014-08-28 02:02:20 +00:00
John MacFarlane
c7f47d7646 Merge pull request #1567 from mpickering/dokuwidth
DokuWiki cleanup
2014-08-27 09:42:05 -07:00
Matthew Pickering
404a58f456 DokuWiki Writer: Refactor to use Reader monad 2014-08-27 14:29:09 +01:00
Matthew Pickering
495f55b03e DokuWiki Writer: Hlint cleanup 2014-08-27 13:48:19 +01:00
Matthew Pickering
3412018287 DokuWiki Writer: Qualified all imports 2014-08-27 13:29:09 +01:00
John MacFarlane
8f2aa45d69 Merge pull request #1564 from jkr/trackChangesWriter
Docx writer: write track changes.
2014-08-26 22:22:16 -07:00
John MacFarlane
5a6e0d3a08 Merge pull request #1565 from Chobbes/master
Org exampleLine parser accepts indented example lines!
2014-08-26 22:18:50 -07:00
Calvin Beck
f813755c55 Fixed exampleLine parser to accept example lines which have indentation at the start of the line. 2014-08-26 21:56:40 -06:00
Jesse Rosenthal
b613d85af9 Docx writer: Accomodate GHC 7.4 (no lookupEnv) 2014-08-26 06:43:14 -04:00
Jesse Rosenthal
21253b59e8 Docx writer: Default to user login and time of change if not given. 2014-08-25 14:03:35 -04:00
Jesse Rosenthal
e1bb28a388 Docx writer: Implement track changes.
These have default authors and dates of "unknown" and timestamp-zero,
respectively.
2014-08-25 12:37:56 -04:00