Commit graph

34 commits

Author SHA1 Message Date
John MacFarlane
cae52ecc31 Revert "LaTeX reader: citation handling changes."
This reverts commit f7229b1473.
2013-03-17 08:48:29 -07:00
John MacFarlane
f7229b1473 LaTeX reader: citation handling changes.
Previously, a LaTeX citation would always be parsed as a Citation
element, with the raw LaTeX in the [Inline] part.

Now, the LaTeX citation is parsed as a Citation element only if
`--biblio` was specified (i.e. only if there is a nonempty set
of references in readerReferences).  Otherwise it is parsed as
raw LaTeX.

This will make it possible to simplify some things in the markdown
writer.  It also makes the LaTeX reader behave more like the Markdown
reader.
2013-03-09 10:33:25 -08:00
John MacFarlane
9cc1cf1f40 Fixed bug with escaped % in LaTeX reader.
Also added tests.  Closes #710.
2013-01-20 19:21:13 -08:00
John MacFarlane
d599c4cdab Added Attr field to Header.
Previously header ids were autogenerated by the writers.
Now they are generated (unless supplied explicitly) in the
markdown parser, if the `header_identifiers` extension is
selected.

In addition, the textile reader now supports id attributes on
headers.
2013-01-09 09:30:05 -08:00
John MacFarlane
8c48bd8feb Don't put the text of an autolink in Code font. 2013-01-06 20:51:51 -08:00
John MacFarlane
06300e59d5 Removed citationSuppressParens.
Makefile: Use citeproc-0.3.6 release.
2012-10-28 09:36:15 -07:00
John MacFarlane
6f2347635c LaTeX reader: Initialize citationSuppressParens field. 2012-10-22 19:17:00 -07:00
John MacFarlane
bfddcb46dc Revert "Adjust LaTeX reader test for last change."
This reverts commit ea34087cde.
2012-10-21 23:14:42 -07:00
John MacFarlane
ea34087cde Adjust LaTeX reader test for last change. 2012-10-15 20:01:07 -07:00
John MacFarlane
4349097990 LaTeX reader: Better support for citation commands.
* Make `\cite` etc. an AuthorInText.
* Make `\footcite` etc. into citations in notes.
2012-10-10 19:41:39 -07:00
John MacFarlane
7d0438897b LaTeX reader: Support obeylines environment.
Closes #604.
2012-09-06 16:27:01 -07:00
John MacFarlane
e2cc9e7ca1 LaTeX reader: Use curly quotes for bare straight quotes. 2012-09-06 16:02:56 -07:00
John MacFarlane
2894df7b76 Added test for one column table in LaTeX. 2012-03-19 08:29:19 -07: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
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
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
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
a579e2c892 Replaced Apostrophe, Ellipses, EmDash, EnDash w/ unicode strings. 2011-12-27 15:45:34 -08:00
John MacFarlane
f8dca6ccbc Add support for attributes in inline Code.
Additional related changes:

* URLs in Code in autolinks now use class "url".
* Require highlighting-kate 0.2.8.2, which omits the final <br/> tag,
  essential for inline code.
2011-01-26 20:44:25 -08:00
John MacFarlane
bd43c0f4c9 Bumped version to 1.8; depend on pandoc-types 1.8.
The old TeX, HtmlInline and RawHtml elements have been removed
and replaced by generic RawInline and RawBlock elements.

All modules updated to use the new raw elements.
2011-01-26 17:22:53 -08:00
John MacFarlane
5c35be1362 Make sure native output ends in newline with --standalone. 2011-01-21 09:58:23 -08:00
John MacFarlane
52b6e38425 Updated tests for new native format. 2011-01-20 22:36:40 -08:00
John MacFarlane
d891b2c29d LaTeX reader: Support simple tables. 2011-01-07 10:15:48 -08:00
Nathan Gass
c2d3796439 Added support for latex cite commands in latex reader. 2010-12-13 20:48:19 -08:00
John MacFarlane
feb70b6e93 Made spacing at end of output more consistent.
Previously some of the writers added spurious whitespace.
This has been removed, resolving Issue #232.

NOTE: If your application combines pandoc's output with other
text, for example in a template, you may need to add spacing.
For example, a pandoc-generated markdown file will not have
a blank line after the final block element.  If you are inserting
it into another markdown file, you will need to make sure there
is a blank line between it and the next block element.
2010-07-20 12:42:12 -07:00
fiddlosopher
36675bd206 Added accessors (docTitle, docAuthors, docDate) to Meta type.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1853 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-28 08:13:48 +00:00
fiddlosopher
3ec8772daf Changed Meta author and date types to Inline lists instead of Strings.
Meta [Inline] [[Inline]] [Inline] rather than
Meta [Inline] [String] String.

This is a breaking change for libraries that use pandoc and
manipulate the metadata.

Changed .native files in test suite for new Meta format.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1699 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:12:44 +00:00
fiddlosopher
5082b5411b Improved syntax for markdown definition lists.
Definition lists are now more compatible with PHP Markdown Extra.
Resolves Issue #24.

+ You can have multiple definitions for a term (but still not
  multiple terms).
+ Multi-block definitions no longer need a
  column before each block (indeed, this will now cause
  multiple definitions).
+ The marker no longer needs to be flush with the left margin,
  but can be indented at or two spaces.  Also, ~ as well as :
  can be used as the marker (this suggestion due to David
  Wheeler.)
+ There can now be a blank line between the term and
  the definitions.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1656 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-07 08:26:53 +00:00
fiddlosopher
b422711451 LaTeX reader: minor improvements.
+ parse '{}', if present, after \textless, \textgreater,
  \textbar, \textbackslash, \ldots.
+ Parse unescaped special characters verbatim rather than
  changing them to spaces.  This way arguments of unknown
  commands will appear in braces.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1424 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-06 20:45:53 +00:00
fiddlosopher
f53fb554fe Support for display math; changed ASCIIMathML -> LaTeXMathML:
Resolves Issue #47.

+ Added a DisplayMath/InlineMath selector to Math inlines.
+ Markdown parser yields DisplayMath for $$...$$.
+ LaTeX parser yields DisplayMath when appropriate.  Removed
  mathBlock parsers, since the same effect is achieved by the math
  inline parsers, now that they handle display math.
+ Writers handle DisplayMath as appropriate for the format.
+ Changed -m option to use LaTeXMathML rather than ASCIIMathML.
  LaTeXMathML is closer to LaTeX in its display of math, and
  supports many non-math LaTeX environments.
+ Modified HTML writer to print raw TeX when LaTeXMathML is
  being used instead of suppressing it.
+ Removed ASCIIMathML files from data/ and added LaTeXMathML.
+ Replaced ASCIIMathML with LaTeXMathML in source files.
+ Modified README and pandoc man page source.
+ Modified web page.
+ Added --latexmathml option (kept --asciimathml as a synonym
  for backwards compatibility)
+ Modified tests accordingly; added new tests for display math.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1409 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-13 03:02:42 +00:00
fiddlosopher
db0d658e9c Updated test suite to new baseline (but no tests yet for new code block syntax).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1210 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:19:54 +00:00
fiddlosopher
fa0ab8617a Modified tests for new argument in CodeBlock.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1201 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:18:38 +00:00
fiddlosopher
dc42600081 Changed tests to use new Math block element.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1111 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-29 08:09:04 +00:00
fiddlosopher
f6043ef7bf Added separate latex reader and native reader tests;
removed round-trip tests.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@986 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-01 20:54:39 +00:00