Commit graph

3853 commits

Author SHA1 Message Date
John MacFarlane
48be39ae2a Support :number-lines: in RST code output. 2013-03-06 10:13:12 -08:00
John MacFarlane
f7d37c97bb LaTeX reader: Better support for Verbatim and minted environments.
Closes #763.
2013-03-06 09:58:47 -08:00
John MacFarlane
8b3a81e4dd LaTeX reader: Handle language attribute for lstlistings.
Convert it to a highlighting-kate language name.
2013-03-05 22:43:27 -08:00
John MacFarlane
3b63cb0903 Hide Text.Pandoc.Highlighting.
* Moved code for translating listings language names to
  highlighting-kate names and back from LaTeX reader to Highlighting.
* Text.Pandoc.Highlighting no longer exposed (API change)
* Text.Pandoc.Highlighting exports toListingsLang, fromListingsLang
2013-03-05 22:09:42 -08:00
John MacFarlane
fd657986cc pandoc.cabal: Require latest h-k, texmath, citeproc-hs, zip-archive.
Pandoc will compile with older versions, but there will be bugs
relating to these functions.  Making the current versions dependencies
is the only way to get packages updated in the distros.
2013-03-04 17:15:51 -08:00
John MacFarlane
ab24871cc0 Updated changelog.
It still needs a lot of cleaning up before a release.
2013-03-04 10:02:28 -08:00
John MacFarlane
3692e371a7 LaTeX reader: Read optional attributes in lstlisting environment.
We convert these to pandoc standard names, e.g. "numberLines"
for "numbers=left", "startFrom=100" from "firstnumber=100".

Still need to add code to convert the language names.
2013-03-04 09:50:11 -08:00
John MacFarlane
0bbee1bcf6 LaTeX writer: Support line numbering with --listings.
If "numberLines" class is present, we add "numbers=left";
if "startFrom" is present, we add "firstnumber=".

Partially addresses #763.
2013-03-04 09:31:31 -08:00
John MacFarlane
b2b38a6c0f beamer template: Provide \Oldincludegraphics as in LaTeX template.
The template redefines `\includegraphics` to give special treatment
for too-wide images.  But this causes problems for literal uses
of `\includegraphics`. This change allows authors to use
`\Oldincludegraphics`, as in the latex template.
2013-03-03 17:20:03 -08:00
John MacFarlane
76c5ebf141 EPUB writer: Include html TOC even in epub2.
* The TOC is included in `<spine>`, but `linear` is set
  to `no` unless the `--toc` option is specified.
* Include `<guide>` element in OPF.
* This should allow the TOC to be useable in Kindles when
  converted with kindlegen.
* Results validate with epubcheck 3.0 for both epub and epub3
  output.
* Closes #773.
2013-03-03 08:42:45 -08:00
John MacFarlane
2a707b8171 README: Documented 'unnumbered' class and '-' shortcut. 2013-03-02 21:12:00 -08:00
John MacFarlane
f4629df14a Markdown reader: attribute parsing improvements.
* Cleaned up parsing code.
* '-' in an attribute context = '.unnumbered'.  The point of this
  is to provide a way to specify unnumbered headers in non-English
  documents.
2013-03-02 21:08:33 -08:00
John MacFarlane
5b0b21b51d Added test for pipe table with spaces around header lines. 2013-03-02 19:06:12 -08:00
John MacFarlane
3ad68b2522 Check for tables before line blocks.
Otherwise some pipe tables get treated as line blocks.
2013-03-02 19:02:50 -08:00
John MacFarlane
1aff783095 Markdown reader: Allow spaces around borders in pipe tables.
Closes #772.
2013-03-02 18:59:50 -08:00
John MacFarlane
f449dfd55d LaTeX reader: Add "fig:" as title for images with captions.
This is needed for them to be rendered as figures.
Closes #766.
2013-03-01 12:22:01 -08:00
John MacFarlane
6611ec399c Textile writer: Removed an unused assignment. 2013-03-01 12:17:49 -08:00
John MacFarlane
649608d324 Markdown: allow ---- in angle-bracket autolinks.
The uri parser is designed for bare URIs.  In angle-bracket contexts,
we can be sure that we don't have trailing punctuation.  So
`<http://openclipart.org/detail/22566/lego-smiley----happy-by-pitr>`
should work now.

Closes #768.
2013-02-28 22:05:22 -08:00
John MacFarlane
abdaa96b03 Markdown writer: Use grid tables when needed, and if enabled.
Closes #740.
2013-02-28 20:22:28 -08:00
John MacFarlane
68c95f4857 Pretty: Fixed chomp so it works inside Prefixed elements. 2013-02-28 20:22:08 -08:00
John MacFarlane
0c4965847f Pretty: Better Show instance for debugging purposes. 2013-02-28 20:12:21 -08:00
John MacFarlane
0c9bb40403 Textile writer: Support header attributes. 2013-02-28 18:47:49 -08:00
John MacFarlane
d5c2ace9ae Updated tests for latex template change (microtype). 2013-02-27 19:42:54 -08:00
John MacFarlane
a19971d358 Updated README on docx styles. 2013-02-27 18:58:26 -08:00
John MacFarlane
1a09a0b921 LaTeX template: Load microtype after fonts.
Microtype needs to know what fonts are being used.
Thanks to dfc for the patch.
2013-02-27 09:52:26 -08:00
John MacFarlane
6cfd2e8fa9 Docx writer: Better treatment of display math.
Display math inside a paragraph is now put in a separate
paragraph, so it will render properly (centered and without
extra blank lines around it).

Partially addresses #742.
2013-02-26 22:59:21 -08:00
John MacFarlane
61958de6c2 Merge pull request #769 from dfc/fix-readme
Fix example header identifier. Very minor.
2013-02-26 22:17:09 -08:00
John MacFarlane
52ee09608a LaTeX reader: Handle \caption for images in figures.
Closes #766.
2013-02-26 22:16:03 -08:00
John MacFarlane
3fca434737 Changed style names in reference docx.
FootnoteReference -> FootnoteRef.
Hyperlink -> Link.

Why?  Because the old names got changed by Word when the
reference.docx was edited.  I don't understand why, but this
fixes things.

Closes #414.
2013-02-26 22:01:47 -08:00
Douglas F. Calvert
a4f31b102a Fix example header identifier. Very minor. 2013-02-26 23:48:56 -05:00
John MacFarlane
caed0df4a7 Docx writer: Create content types and document rels from scratch.
This fixes problems that arise when you edit the reference.docx
with Word.  Word tends to remove things from the `[Content_Types].xml`
and `word/_rels/document.xml.rels` files that are needed (e.g.
references to the `footnotes.xml` file and image default mime types).
So we regenerate these completely rather than taking them from
the `reference.docx`.

We also now encode mime types for each individual image rather
than using defaults.  This should allow us to handle a wider
range of image types.

This mostly addresses #414.  The only remaining issue I can see
is the issue of style IDs, which Word inexplicably changes in
some cases when the reference.docx is saved.  E.g.
`FootnoteReference` becomes `FootnoteReference1`.
2013-02-26 20:31:32 -08:00
John MacFarlane
270c33e9ad Added to RELEASE-CHECKLIST - tag templates repo. 2013-02-26 06:40:20 -08:00
John MacFarlane
c46eac5aea Refactoring in Docx writer. 2013-02-25 19:04:20 -08:00
John MacFarlane
ec2a51e40b Updated copyright year in README 2013-02-25 19:04:05 -08:00
John MacFarlane
e460ab2894 osx InstallationCheck script: use full path for sysctl.
Thanks to jonahbull for the suggestion.  Closes #580.
2013-02-24 14:05:53 -08:00
John MacFarlane
cae409725f Docx writer: Handle PDF images. 2013-02-23 23:04:42 -08:00
John MacFarlane
f40eab3540 Added PDF to content types in reference.docx. 2013-02-23 23:04:24 -08:00
John MacFarlane
588a49acf9 ImageSize: Added Pdf to ImageType.
So far we have no function to determine PDF's size.
2013-02-23 23:03:56 -08:00
John MacFarlane
aa4105d190 reference.docx: Added default content type for emf. 2013-02-23 22:47:10 -08:00
John MacFarlane
dd48e06a4d EPUB writer: Improved behavior with --number-sections.
* Headers with "unnumbered" attribute are not numbered.
  (Nor do they cause an increment in running numbering.)
* Section numbers now work properly, even when there is
  material before the first numbered section.
2013-02-23 20:21:45 -08:00
John MacFarlane
ca6cb04509 EPUB writer: more transition.
Changed toChunks to toChapters.
2013-02-23 19:34:04 -08:00
John MacFarlane
9c40535c47 EPUB writer: Temporary step towards a better system for numbering.
With this change, `--number-sections` won't work.  This will
be fixed later.
2013-02-23 18:51:58 -08:00
John MacFarlane
8b8c8cfed9 HTML writer: fix case when writerNumberOffet is empty or short.
We add 0s to the end of the list if it's shorter than needed.
2013-02-23 18:51:33 -08:00
John MacFarlane
5afe5218b7 Added examples in README for --number-offset. 2013-02-23 18:39:21 -08:00
John MacFarlane
756c8d492a --number-from -> --number-offset
Also `writerNumberFrom` -> `writeNumberOffset`.
The offset is a list of numbers (0 by default).
These are added to the section, subsection, etc.
numbers that would have been generated automatically.
2013-02-23 18:11:05 -08:00
John MacFarlane
a7245b453c EPUB writer: Minor section numbering tweaks.
* If we need to add an initial section, make it unnumbered.
* Don't add extra space before unnumbered section titles in TOC.
2013-02-22 20:38:56 -08:00
John MacFarlane
4d54c6368b Clarify that --number-from only works in HTML. 2013-02-22 20:03:48 -08:00
John MacFarlane
a33828f375 EPUB writer: Use writerNumberFrom instead of ugly hack. 2013-02-22 19:45:39 -08:00
John MacFarlane
4c106993b5 Documented --number-from. 2013-02-22 19:42:22 -08:00
John MacFarlane
91f507d393 --number-from implies --number-sections. 2013-02-22 19:42:11 -08:00