Commit graph

551 commits

Author SHA1 Message Date
John MacFarlane
deb72b5f43 ConTeXt writer: Fixed escaping of %.
* In text, `%` needs to be escaped as `\letterpercent`, not `\%`
* Inside URLs, `%` needs to be escaped as `\%`

Thanks to jmarca and adityam for the fix.  Closes #492.
2012-04-29 14:21:56 -07:00
John MacFarlane
77125ea68c Texinfo writer: Escape special characters in node titles.
This fixes a problem pointed out by Joost Kremers.  Pandoc used
to escape an '@' in a chapter title, but not in the corresponding
node title, leading to invalid texinfo.
2012-04-25 19:23:01 -07:00
John MacFarlane
f67a80cea2 Removed blaze_html_05 flag -- require blaze >= 0.5 by default. 2012-04-24 19:34:53 -04:00
Mark Wright
471d4dc502 changes for blaze-html 0.5 2012-04-23 19:53:04 +10:00
John MacFarlane
869ff43442 LaTeX writer: Use fixltx2e package to provide '\textsubscript'. 2012-04-21 09:59:36 -07:00
John MacFarlane
9a347c37ad RST writer: Don't wrap link references.
Closes #487.
2012-04-21 09:46:05 -07:00
John MacFarlane
9989170df2 LaTeX writer: Use \hyperref[ident]{text} for internal links.
Previously we used `\href{\#ident}{text}`, which didn't work on
all systems. Thanks to Dirk Laurie.
2012-04-21 09:41:05 -07:00
John MacFarlane
e6e63d1699 Docx writer: Fixed error message when style file can't be parsed. 2012-04-21 09:27:53 -07:00
John MacFarlane
7495d970b7 Mardkown writer: escape < and $. 2012-04-15 11:03:52 -07:00
John MacFarlane
dbbc932f24 Markdown writer: don't force delimited code blocks to be flush left.
Fixes bug with delimited code blocks inside lists etc.
2012-04-11 09:02:32 -07:00
John MacFarlane
66f8dc14b7 Docx writer: Fixed multi-paragraph list items.
Previously they each got a list marker.
Closes #457.
2012-04-07 17:08:52 -07:00
John MacFarlane
f25dcacedf LaTeX writer: don't use eurosym package unless document has a €. 2012-04-03 18:49:05 -07:00
John MacFarlane
0afd33e4c5 Markdown writer: don't replace empty alt in image with "image".
Previously `<img src="empty.png" alt=""/>` would be translated as
`![image](empty.png)`; now it becomes `![](empty.png)` as one might
naturally expect.
2012-04-03 18:28:08 -07:00
John MacFarlane
2f535ceda3 Avoid repeated id in section and header in HTML slides.
Previously pandoc would use the same id attribute for the
div or section and the header inside it; now the id is omitted
from the header if the div or section has it.
2012-03-29 11:10:10 -04:00
John MacFarlane
7bc4dc37b2 Added PDF metadata (title,author) in LaTeX standalone + PDF output.
Closes #459.
2012-03-25 12:10:43 -07:00
John MacFarlane
9352750cb2 RST writer: Better handling of inline formatting.
* `hi*there*hi` now gets rendered properly as `hi\ *there*\ hi`
* Unnecessary '\ ' are avoided around :math:, :sub:, :sup:
* Implemented most of the rules in
  http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules,
  though some unnecessary '\ ' may be inserted when unicode quotes
  are used.
2012-03-24 15:53:57 -07:00
Peter Wang
d74f3e1f28 Texinfo writer: retain directories in image paths. 2012-03-21 09:20:30 +11:00
John MacFarlane
60fb915351 Use {} around ctable caption. Closes #445. 2012-03-12 11:06:49 -07:00
John MacFarlane
5f013051e2 Made man writer more robust.
Previously it assumed that inlines weren't normalized.
2012-03-09 13:39:19 -08:00
John MacFarlane
4a17d661ff EPUB reader: convert e.g. en_US from locale to en-US in language. 2012-03-09 09:25:24 -08:00
John MacFarlane
7a5f51eb95 Merge pull request #438 from michaelt/patch-2
Fix initial `Str "."` after `LineBreak` as well?
2012-03-07 12:50:56 -08:00
John MacFarlane
45aed51628 Merge pull request #437 from michaelt/patch-1
escape initial dot in code lines
2012-03-07 10:50:08 -08:00
John MacFarlane
8a8d4a8abc Set mainlang variable in context writer.
This parallels behavior of latex writer.  Mainlang is the last
of a comma-separated list of languages in lang.
2012-03-07 10:09:17 -08:00
Michael Thompson
2d1703e8a0 Fix initial Str "." after LineBreak as well? 2012-03-07 12:27:46 -05:00
Michael Thompson
698eb059b7 escape initial dot in code lines 2012-03-07 11:35:18 -05:00
John MacFarlane
30cafd913a Fixed ployglossia support in LaTeX template for multiple langs.
\setmainlanguage will now just use the last of a comma-separated
list of languages.
2012-03-05 09:07:14 -08:00
John MacFarlane
40133e8a7d Use <q> tags for Quoted items for HTML5 output.
The quote style can be changed by modifying the template
or including a css file. A default quote style is included.
2012-03-03 08:29:01 -08:00
John MacFarlane
e6a03cdd4b EPUB writer: Use extensible exceptions. 2012-03-03 08:16:16 -08:00
John MacFarlane
940b603548 Use \textasciitilde for ~ in LaTeX writer. 2012-03-03 06:33:24 -08:00
John MacFarlane
53e6bf36a9 Fixed bug in LaTeX string escaper (with ~). 2012-03-02 07:49:55 -08:00
John MacFarlane
c468272e34 HTML writer: Don't escape contents of EQ tags with --gladtex.
This fixes a regression from 1.8.x.  Closes #428.
2012-02-21 09:00:30 -08:00
John MacFarlane
7376d26c36 Add TableNormal style to tables.
Needs testing with Word.
2012-02-14 17:41:11 -08:00
John MacFarlane
5cfec4b922 Fix _rels/.rels if it has been screwed up by Word.
Closes #414.

Previously, if you edited the reference.docx with Word, then
created a new docx using the edited reference.docx, Word would complain
about the file being corrupt.  The problem seems to be that Word
changes _rels/.rels, changing the Type of the Relationship to
docProps/core.xml from
"http://schemas.openxmlformats.org/officedocument/2006/relationships/metadata/core-properties"
to
"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties".
As far as I can see, this is a bug in Word, since the latter is not
valid.  (See
http://idippedut.dk/post/2010/04/22/Correct-according-to-spec-or-implementation.aspx.)

This change simply does a global replace on _rels/.rels that reverts
the change Word makes.  And now producing docx files with Word-modified
reference.docx seems to work.
2012-02-11 09:12:58 -08:00
John MacFarlane
64304a2165 Don't wrap headers in markdown or rst. 2012-02-08 08:40:53 -08:00
John MacFarlane
66ac842456 LaTeX writer: prevent adjacent hyphens from forming ligatures.
This is important primarily for things like `--option`.
Em and En dashes will produce '---' and '--' in LaTeX, but
hyphens should not otherwise combine into dashes.
2012-02-06 13:48:59 -08:00
John MacFarlane
e2c157f86f Removed module Text.Pandoc.CharacterReferences.
Moved characterReference parser to Text.Pandoc.Parsing.
decodeCharacterReferences is now replaced by fromEntities
in Text.Pandoc.XML.
2012-02-05 22:52:00 -08:00
John MacFarlane
eed87d7755 Normalize date in EPUB metadata. 2012-02-05 14:05:30 -08:00
John MacFarlane
23ca68a5c4 Don't let autolinks create reference links.
Previously we got bad results with -t markdown --reference-links
if the input contained autolinks like <http://yahoo.com>.
2012-01-31 15:25:49 -08:00
John MacFarlane
e9a270d03b Don't include mathml javascript for html5 output.
mathml is supposed to be supported in HTML5.
2012-01-31 10:47:48 -08:00
John MacFarlane
3880828415 Support --mathml flag in docbook. 2012-01-31 10:32:40 -08:00
John MacFarlane
8f1bfec7b9 Added --epub-embed-font option.
* This can be repeated for multiple fonts.
* Added parameter for fonts to embed to writeEPUB.
* Added ttf, otf to Mime types in Text.Pandoc.MIME.
2012-01-30 13:09:52 -08:00
John MacFarlane
f437827b0c Remove dependency on old-time. 2012-01-28 16:04:35 -08:00
John MacFarlane
3a0b3df007 Put date in YYYY-MM-DD format if possible for HTML, docx metadata.
Added normalizeDate to Text.Pandoc.Shared.
2012-01-28 15:54:34 -08:00
John MacFarlane
513af8dd1b LaTeX writer: escape # in href URLs. Closes #359. 2012-01-27 13:44:17 -08:00
John MacFarlane
663cfc2fbd Docbook writer: Use sect1, sect2, etc. instead of section. 2012-01-27 11:32:02 -08:00
John MacFarlane
bd7918da4c Finished implementing --atx-headers in markdown writer. 2012-01-27 01:19:20 -08:00
John MacFarlane
4321e27bfd Removed some unused code. 2012-01-27 00:38:47 -08:00
John MacFarlane
60bf741d68 Added --slide-level option to override default.
This allows users to select a slide level below the first
header level with content.

Note that content under sections above the slide level will not appear
in slides (either in beamer or in HTML slide shows).

This is primarily useful for creating documents that can be made
into both slides and handouts (which contain additional content
outside the slides).
2012-01-25 17:51:52 -08:00
John MacFarlane
4ffff62097 Fixed regression in HTML writer: all headers level 1! 2012-01-25 11:30:12 -08:00
John MacFarlane
3a8afc119a Depend on highlighting-kate 0.5.
This uses styleToCss instead of styleToHtml.
2012-01-25 11:29:42 -08:00