John MacFarlane
bf4e59bc46
LaTeX reader: correctly handle \^{}.
2012-02-25 09:55:38 -08:00
John MacFarlane
14984a7130
LaTeX reader: Fixed accents.
...
\~{a}, \c{c}.
2012-02-25 09:24:39 -08:00
François Gannaz
a922bd6d8e
Added support for markdown-extra tables in the markdown parser
...
Only tables whose lines begin with a "|" are supported.
There are 2 warnings about unused variables when compiling.
2012-02-21 22:00:10 +01: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
24e3a65167
LaTeX math environment fixes. Closes #423 .
...
`aligned` is now used instead of the nonexistent `aligned*`.
`multline` instead of the nonexistent `multiline`.
2012-02-19 21:11:07 -08:00
John MacFarlane
1ab21530b4
PDF: run latex 3 times if --toc specified.
...
Closes #424 .
2012-02-19 19:11:40 -08:00
John MacFarlane
5914ae1ea3
Don't escape <
in <style>
tags with --self-contained
.
...
Closes #422 : highlighting lost using `--self-contained`.
2012-02-17 10:44:46 -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
f59e33dd1a
LaTeX reader: Add ", " to suffix...
...
if it doesn't start w space or punctuation. Otherwise we
get no space between the year and the suffix in author-date styles.
2012-02-10 21:48:42 -08:00
John MacFarlane
ad4062fbff
Made LaTeX parser more robust.
...
+ Skip options after block commands.
+ Correctly handle {\\} in braced.
+ Added a needed 'try'.
2012-02-09 17:45:40 -08:00
John MacFarlane
5ac6f88e34
Better handling of raw latex environments in markdown.
...
Now
\begin{equation}
a_1
\end{equation}
turns into a raw latex block as expected.
2012-02-09 14:30:37 -08:00
John MacFarlane
24f7076622
Improvements to markdown attributes syntax (on code blocks).
...
(1) Attributes can contain line breaks.
(2) Values in key-value attributes can be surrounded by either
double or single quotes, or left unquoted if they contain no spaces.
2012-02-08 17:18:08 -08:00
John MacFarlane
1c432e72ea
Put LaTeX verse environments in blockquotes.
2012-02-08 14:03:55 -08:00
John MacFarlane
64304a2165
Don't wrap headers in markdown or rst.
2012-02-08 08:40:53 -08:00
John MacFarlane
142c29d908
More efficient implementation of nowrap in Pretty.
2012-02-08 08:32:32 -08:00
John MacFarlane
7a602d222f
Limit nesting of strong/emph.
...
This avoids exponential lookahead in parasitic cases, like
a**a*a**a*a**a*a**a*a**a*a**a*a**a*a**.
Added stateMaxNestingLevel to ParserState.
We set this to 6, so you can still have Emph inside Emph, just not
indefinitely.
2012-02-07 22:46:41 -08:00
John MacFarlane
12aa83f70e
PDF: Only run latex twice if \tableofcontents is present.
...
Note: This will pick up on \tableofcontents even if it's
in a verbatim environment. But the worst that can happen is
that the document takes a bit longer to build.
2012-02-07 22:00:22 -08:00
John MacFarlane
328c91e307
Handle escaped $ in latex math. Closes #186 .
2012-02-07 19:41:37 -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
df3f3ddb6e
LaTeX reader: use raw latex as fallback for Cites.
...
This way you can still get the raw latex back, even if you don't
process with citeproc. Previously, cites were not visible at all
unless you specified --biblio on the command line and converted
them using citeproc, or used --natbib or --biblatex.
2012-02-06 12:42:12 -08:00
John MacFarlane
acdbdd7da5
Text.Pandoc.PDF: Simplified tex2pdf.
...
We no longer try to parse the log file to determine whether latex
needs to be rerun. Instead, we run latex twice -- which should be
enough for table of contents and hyperrefs.
Closes #402 .
2012-02-06 12:12:23 -08:00
John MacFarlane
b63f924787
Fixed bug in fromEntities: require semicolon to process as entity.
2012-02-05 23:02:01 -08:00
John MacFarlane
521e90e839
Parsing: Make characterReference fail if entity not found.
2012-02-05 23:01:35 -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
9bf6e665ea
Removed outdated comment in LaTeX reader.
2012-02-05 22:51:42 -08:00
John MacFarlane
bec945518c
Fixed Pretty so it uses Data.Monoid's <> w/ GHC 7.4.
...
Note: changed fixity to infixr 6.
2012-02-05 19:57:59 -08:00
John MacFarlane
550b931c3c
Text.Pandoc.XML: Export fromEntities.
...
Remove old 'deEntities' from pandoc.hs.
2012-02-05 14:37:33 -08:00
John MacFarlane
4dec972cfe
Remove dependency on dlist.
...
Use sequence in Pretty instead.
2012-02-05 14:25:12 -08:00
John MacFarlane
eed87d7755
Normalize date in EPUB metadata.
2012-02-05 14:05:30 -08:00
John MacFarlane
f97391c7de
Support \frametitle, \framesubtitle.
2012-02-05 09:28:56 -08:00
John MacFarlane
922469bbb2
LaTeX reader: Fixed bug in authors.
2012-02-05 09:06:34 -08:00
John MacFarlane
bae3b49a5a
LaTeX reader: Support \TeX, \LaTeX.
2012-02-05 08:50:25 -08:00
John MacFarlane
c54c3d50b0
LaTeX reader: Skip everything after \end{document}.
2012-02-05 08:46:04 -08:00
John MacFarlane
79f1594470
Added \vspace and \hspace to latex ignored block commands.
2012-02-04 23:19:09 -08:00
John MacFarlane
be8bddcaf3
Improvements to LaTeX reader:
...
* Handle \ps
* Ignore ignorable commands in a uniform way.
* Handle \P
* handleIncludes skips \verb commands.
2012-02-04 22:28:16 -08:00
John MacFarlane
4257b9aff5
Handle \address and \signature in letter environment. Closes #393 .
2012-02-04 20:02:00 -08:00
John MacFarlane
800d5cdb07
LaTeX reader: support macron accents \=o.
2012-02-04 19:36:05 -08:00
John MacFarlane
80505bc490
LaTeX reader: support \. dot accent.
2012-02-04 19:31:01 -08:00
John MacFarlane
0ec953793d
handleIncludes: read file as UTF8, allow multiples separated by commas.
...
e.g. \usepackage{a,b}
2012-02-04 15:56:55 -08:00
John MacFarlane
93dad75a48
Don't print warnings for not-found packages, includes.
2012-02-04 13:31:21 -08:00
John MacFarlane
3f87c43640
Revert "LaTeX reader: Use kpsewhich to find paths for handleIncludes."
...
This reverts commit 1f90c6d7e0
.
2012-02-04 13:20:36 -08:00
John MacFarlane
1f90c6d7e0
LaTeX reader: Use kpsewhich to find paths for handleIncludes.
...
Fall back without an error if kpsewhich is not available.
2012-02-04 13:10:48 -08:00
John MacFarlane
253a9e32aa
Have handleIncludes look for local .sty files from \usepackage.
2012-02-04 13:01:00 -08:00
John MacFarlane
1e772aa59c
LaTeX reader: small bug fixes.
2012-02-04 12:51:27 -08:00
John MacFarlane
e58d5bf087
Minor formatting change
2012-02-04 12:27:37 -08:00
John MacFarlane
47eb69a7e1
LaTeX reader: Factored out rawEnv
2012-02-04 12:27:24 -08:00
John MacFarlane
ade08f6330
Small improvements in latex table parser.
2012-02-04 11:50:06 -08:00
John MacFarlane
75485c2f11
Complete rewrite of LaTeX reader.
...
* The new reader is more robust, accurate, and extensible.
It is still quite incomplete, but it should be easier
now to add features.
* Text.Pandoc.Parsing: Added withRaw combinator.
* Markdown reader: do escapedChar before raw latex inline.
Otherwise we capture commands like \{.
* Fixed latex citation tests for new citeproc.
* Handle \include{} commands in latex.
This is done in pandoc.hs, not the (pure) latex reader.
But the reader exports the needed function, handleIncludes.
* Moved err and warn from pandoc.hs to Shared.
* Fixed tests - raw tex should sometimes have trailing space.
* Updated lhs-test for highlighting-kate changes.
2012-02-04 09:56:43 -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