Commit graph

300 commits

Author SHA1 Message Date
John MacFarlane
d0726920db Added Tests.Writers.ConTeXt and helpers for writer tests. 2011-01-21 10:23:41 -08:00
John MacFarlane
e1f3c6058e Added Text.Pandoc.Readers.Native (readNative).
readNative can now read full pandoc documents, block lists, blocks,
inline lists, or inlines.  It will interpret

Str "hi"

as if it were

Pandoc (Meta [] [] []) [Plain [Str "hi"]]

This should make testing easier.
2011-01-19 18:36:27 -08:00
John MacFarlane
3442df88bd Include man pages in extra-source-files.
The man pages are produced by a post-build hook, using
MakeManPage.hs.  However, there seem to be problems running
this program on some systems; see
https://github.com/jgm/pandoc/issues/#issue/15.

This change means that the generated man pages will be included in
the tarball produced by 'cabal sdist', and hence in releases.
They will still be updated by the build process if the sources
change, but in most builds, the man page won't need to be regenerated.
2011-01-19 12:17:37 -08:00
John MacFarlane
19234efc95 Added upper bounds to all cabal dependencies. 2011-01-15 11:51:39 -08:00
John MacFarlane
a0e19ba8aa Merge branch 'tests' 2011-01-15 09:25:01 -08:00
John MacFarlane
8ad6e013fc Added new tests to pandoc.cabal.
Otherwise cabal sdist won't include them.
2011-01-15 08:23:03 -08:00
John MacFarlane
4d0951d895 Require Cabal version >= 1.6. 2011-01-14 22:47:52 -08:00
John MacFarlane
0222f367b1 Keep Tests.Arbitrary but remove quickcheck tests for now.
Remove Tests.Shared.
Remove dependency on QuickCheck.
2011-01-14 18:01:57 -08:00
John MacFarlane
d41c17a2d5 Added quickcheck tests for normalize in Shared. 2011-01-14 00:30:36 -08:00
John MacFarlane
b3fb541d01 Added Tests/Arbitrary.hs, with Arbitrary instances. 2011-01-13 22:31:04 -08:00
Nathan Gass
6fbd446cbe Removed copy-pasted -O2. 2011-01-12 19:13:02 +01:00
Nathan Gass
ec4deb2532 Added some basic testing infrastructure and some latex reader tests. 2011-01-12 14:16:35 +01:00
John MacFarlane
eb1d014859 Improvements to test suite.
+ You can now specify glob patterns after 'cabal test';
  e.g. 'cabal test latex' will only run the latex tests.

+ Instead of detecting highlighting support in Setup.hs,
  we now detect it in test-pandoc, by looking to see if
  'languages' is null.

+ We now verify the lhs readers against the lhs-test.native,
  normalizing with 'normalize'.  This makes more sense than
  verifying against HTML, which also brings in the HTML writer.

+ Added lhsn-test.nohl.{html,html+lhs}, so we can do the lhs
  tests whether or not highlighting has been installed.
2011-01-12 11:35:10 +01:00
Nathan Gass
e8fa72c6a7 Moved test-pandoc.hs to tests directory. 2011-01-11 21:49:49 +01:00
Nathan Gass
c0700987ba Changed test-pandoc to use test-framework and HUnit. 2011-01-10 00:37:46 +01:00
John MacFarlane
23aae79b01 Updated for texmath 0.5. 2011-01-05 14:44:26 -08:00
John MacFarlane
904050fa36 New HTML reader using tagsoup as a lexer.
* The new reader is faster and more accurate.

* API changes for Text.Pandoc.Readers.HTML:
   - removed rawHtmlBlock, anyHtmlBlockTag, anyHtmlInlineTag,
     anyHtmlTag, anyHtmlEndTag, htmlEndTag, extractTagType,
     htmlBlockElement, htmlComment
   - added htmlTag, htmlInBalanced, isInlineTag, isBlockTag, isTextTag

* tagsoup is a new dependency.

* Text.Pandoc.Parsing: Generalized type on readWith.

* Benchmark.hs: Added length calculation to force full evaluation.

* Updated HTML reader tests.

* Updated markdown and textile readers to use the functions from
  the HTML reader.

* Note: The markdown reader now correctly handles some cases it did not
  before. For example:

    <hr/>

  is reproduced without adding a space.

    <script>
      a = '<b>';
    </script>

  is parsed correctly.
2010-12-30 13:55:40 -08:00
John MacFarlane
dc597a8a68 Removed all dependencies on 'pretty' package. 2010-12-22 11:48:08 -08:00
John MacFarlane
543aa28c38 Added new prettyprinting module.
* Added Text.Pandoc.Pretty.
  This is better suited for pandoc than the 'pretty' package.
  One advantage is that we now get proper wrapping; Emph [Inline]
  is no longer treated as a big unwrappable unit. Previously
  we only got breaks for spaces at the "outer level." We can also
  more easily avoid doubled blank lines.  Performance is
  significantly better as well.

* Removed Text.Pandoc.Blocks.
  Text.Pandoc.Pretty allows you to define blocks and concatenate
  them.

* Modified markdown, RST, org readers to use Text.Pandoc.Pretty
  instead of Text.PrettyPrint.HughesPJ.

* Text.Pandoc.Shared:  Added writerColumns to WriterOptions.

* Markdown, RST, Org writers now break text at writerColumns.

* Added --columns command-line option, which sets stColumns
  and writerColumns.

* Table parsing:  If the size of the header > stColumns,
  use the header size as 100% for purposes of calculating
  relative widths of columns.
2010-12-17 13:39:17 -08:00
John MacFarlane
2a075e9d7a test-pandoc: removed need to depend on MissingH. 2010-12-15 18:07:36 -08:00
John MacFarlane
605648cbbf Added 'tests' Cabal flag.
+ This ensures that test-pandoc gets built.
+ 'cabal test' now runs this.
+ The old tests/RunTests.hs has been removed, and
  src/test-pandoc.hs added.
2010-12-15 17:54:51 -08:00
John MacFarlane
f5c2082304 Added JSON reader and writer.
The JSON reader is about 20x faster than the native reader.
So this can be a good way to serialize a pandoc document.
2010-12-11 00:06:03 -08:00
John MacFarlane
dab645440a Added Benchmark.hs to extra-source-files. 2010-12-10 23:58:02 -08:00
John MacFarlane
167eeef6cb Added json format for reading and writing.
This is faster to parse than native.
2010-12-09 10:40:31 -08:00
John MacFarlane
3b3387b4a3 Improved process to create man page from README.
Previously it relied on pandoc already being installed.
Now it uses dist/package.conf.inplace.
2010-12-07 12:29:43 -08:00
John MacFarlane
05b8017679 Documented org-mode writer in README, cabal, man pages. 2010-12-05 09:45:55 -08:00
Puneeth Chaganti
85263ecda9 Added templates/org.template to pandoc.cabal. 2010-12-05 11:18:02 +05:30
Puneeth Chaganti
921e2b6e67 Added Org-mode writer
+ Added Text/Pandoc/Writers/Org.hs
    + Added to pandoc.cabal
    + Added to pandoc.hs and Text/Pandoc.hs exports.
2010-12-04 15:57:39 +05:30
John MacFarlane
357b965b44 Merge branch 'citeproc' into master.
Conflicts:
	src/Text/Pandoc/Definition.hs
2010-12-03 23:43:47 -08:00
Paul Rivier
a7da0672dc more support for Textile reader (explicit links, images), tests and cabal entries 2010-12-03 23:10:51 -08:00
John MacFarlane
54397a9e99 Merge branch 'master' into citeproc 2010-11-27 10:58:05 -08:00
John MacFarlane
c989bf028f Merge branch 'textile'
Conflicts:
	README
	man/man1/pandoc.1.md
	pandoc.cabal
2010-11-27 10:52:44 -08:00
John MacFarlane
1b1287e888 Removed citeproc flag and CPP conditionals. 2010-11-23 21:14:31 -08:00
John MacFarlane
254c67a4fb Made citeproc flag default to True. 2010-11-20 22:00:57 -08:00
John MacFarlane
482b4b8d73 Added default.csl to data files. 2010-11-18 14:14:20 -08:00
John MacFarlane
07775b5f4f cabal file: Made library and executable build-depends match. 2010-11-06 15:00:37 -07:00
John MacFarlane
f7f6b2427d Changes to use citeproc-hs 0.3. 2010-11-06 14:43:23 -07:00
John MacFarlane
db03741847 Removed Text.Pandoc.Definition, bump version to 1.7.
We now get Text.Pandoc.Definition from the new pandoc-types package.
This will make it possible for other programs to supply output
in Pandoc format, without depending on the whole pandoc package.
2010-11-05 17:06:47 -07:00
John MacFarlane
7fdf3f5a46 Bump version to 1.6.1. 2010-10-26 19:52:24 -07:00
John MacFarlane
6b722d1b45 Process LaTeX macros in markdown, and apply to TeX math.
Example:
\newcommand{\plus}[2]{#1 + #2}

$\plus{3}{4}$

yields:

3+4
2010-10-26 09:03:03 -07:00
John MacFarlane
f94173f6a1 pandoc.cabal: Remove profiling options from 'else' clause. 2010-07-24 18:06:42 -07:00
John MacFarlane
01a191709e Moved Text.Pandoc.Writers.S5 -> Text.Pandoc.S5.
Now it doesn't export a writer, just some CSS and JS.
2010-07-22 23:37:06 -07:00
John MacFarlane
a11b530935 Moved s5 writing from S5 module to HTML.
Now s5 is handled in more or less the same way as slidy,
as a variant of HTML.
2010-07-22 22:58:48 -07:00
John MacFarlane
c5ed016616 Added new --offline option for slidy.
Added slidy/slidy.min.{css,js}.
2010-07-22 21:50:53 -07:00
John MacFarlane
2253c8ef65 Require texmath >= 0.3, adjusted for new elements. 2010-07-22 15:06:46 -07:00
John MacFarlane
5be880bd48 Reintroduced 'library' cabal flag.
It is needed for the Windows installer, since if a library
is produced, the binary can't be made relocatable.
See http://www.haskell.org/ghc/docs/6.12.2/html/Cabal/builders.html
section 4.1.2.3.
2010-07-21 11:26:13 -07:00
John MacFarlane
3adacdb04e Updated pandoc to use css for highlighting-kate 0.2.7.
Note: Update any custom CSS or templates accordingly.
2010-07-15 23:02:29 -07:00
John MacFarlane
9b833e8744 Added a slidy writer.
Resolves Issue #122.
2010-07-13 20:44:56 -07:00
John MacFarlane
10e284aaf4 Version bump to 1.6, due to removed functions. 2010-07-05 00:06:28 -07:00
John MacFarlane
3548bf6d9c Moved Pandoc prettyprinting code from Shared to new Native writer.
+ Text.Pandoc.Writers.Native
+ The function prettyPandoc is now gone.  Use writeNative instead.
2010-07-05 00:06:27 -07:00
John MacFarlane
998fd098d0 Moved parsing functions from Text.Pandoc.Shared to new module.
+ Text.Pandoc.Parsing
2010-07-05 00:06:27 -07:00
John MacFarlane
f1114733a6 Added an EPUB writer.
+ New writer module Text.Pandoc.Writers.EPUB
+ Stylesheet in epub.css
+ --epub-stylesheet command-line option.
+ New utility module Text.Pandoc.UUID to generate
  random UUIDs for EPUBs.
2010-07-05 00:06:27 -07:00
John MacFarlane
ff4d94e054 Made a proper ODT writer.
+ Transformed the old Text.Pandoc.ODT module into a proper
  writer module, Text.Pandoc.Writers.ODT.
+ Instead of saveOpenDocumentAsODT, we now have writeODT, which
  takes a Pandoc document and produces a bytestring.
  saveOpenDocumentAsODT has been removed.
+ To extract the images and insert them into the ODT, we now use
  processPandocM on the Pandoc document rather than a custom XML parser.
+ Handle the case where the image is remote (or not found) by
  converting the Image element into an Emph with the label.
+ Plumbing in pandoc.hs changed slightly to accomodate this, and to
  allow other writers that live in the IO monad.
2010-07-05 00:06:26 -07:00
John MacFarlane
d073b16892 Added Textile writer module. 2010-05-17 21:52:45 -07:00
John MacFarlane
7be82b4536 Added Text.Pandoc.UTF8 for portable UTF8 string IO. 2010-05-06 20:27:10 -07:00
John MacFarlane
2afa967ade Removed parsec < 3 restriction. 2010-04-23 22:43:47 -07:00
John MacFarlane
0d5065c1e7 Added 'threaded' flag.
+ GHC lacks a threaded runtime on some architectures.
  Provide a 'threaded' flag that can be disabled for compiling
  on these architectures.
+ Removed '-threaded' from pandoc's ghc-options.  '-threaded'
  is only needed for markdown2pdf, due to its use of readProcess.
2010-04-20 22:59:38 -07:00
John MacFarlane
7d8c8c7880 Removed 'library' Cabal flag.
Reason: starting with Cabal 1.8, installing pandoc with '-library
+executable' did not work, since the build-depends in the Library
stanza were ignored. The problem could be solved by repeating the
build-depends in the Executable stanza, but this seems non-ideal
(and might lead to errors later on).  The '-library' option isn't
so useful anyway, since to compile pandoc in the first place, you
need a large number of Haskell libraries installed, and in this
case, why balk at another? It was chiefly intended for packagers,
but packagers will need to use a chroot environment anyway, and
they can then simply copy the executable and not the library.

Thanks to Jim Pryor for calling the problem to my attention
in connection with an arch linux package.
2010-04-10 11:16:48 -07:00
John MacFarlane
5a60bfd645 Removed markdown2pdf from list of data-files. 2010-04-06 23:00:42 -07:00
John MacFarlane
41bc23709c Bumped version to 1.5.1.1, updated changelog. 2010-03-29 07:15:28 -07:00
John MacFarlane
666a51b7fc Version bump to 1.5.1. 2010-03-23 00:46:54 -07:00
John MacFarlane
0e6bb176f9 Updated changelog and bumped version to 1.5.0.1. 2010-03-21 22:51:04 -07:00
John MacFarlane
6e498fc727 cabal: included several missing test files. 2010-03-20 14:47:57 -07:00
fiddlosopher
5ae0e0d442 Depend on extensible-exceptions, remove CPP in Templates module.
It's safe to depend on extensible-exceptions, since this is
shipped with GHC 6.10 and 6.12.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1911 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-19 02:33:15 +00:00
fiddlosopher
56217f1004 Added --mathml option; removed Text.Pandoc.LaTeXMathML.
* Added data/MathMLinHTML.js, which is included when no URL is provided
  for --mathml.  This allows MathML to be displayed in better browsers,
  as text/html.
* The module was no longer necessary; its functionality (two lines)
  was incorporated into pandoc.hs.
* Consolidated the two LaTeXMathML.js files into one.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1909 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18 06:45:56 +00:00
fiddlosopher
695961155a Added plain writer.
Text.Pandoc.Writers.Markdown now exports a writePlain,
which writes plain text without links, pictures, or
special formatting (not even markdown conventions).

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1907 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18 06:45:43 +00:00
fiddlosopher
d7e5bb96a7 cabal: Depend on extensible-exception for GHC < 6.10.
This, I hope, will allow pandoc to be compiled on ghc 6.8
again.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1903 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18 02:39:23 +00:00
fiddlosopher
c2ce51e9f5 Cabal file: depend on HTTP >= 4000.0.5.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1870 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-07 19:35:53 +00:00
fiddlosopher
997ea5ea1d Removed html2markdown and hsmarkdown.
html2markdown is no longer needed, since you can pass URI arguments
to pandoc and directly convert web pages. (Note, however, that pandoc
assumes the pages are UTF8. html2markdown made an attempt to guess the
encoding and convert them.)

hsmarkdown is pointless -- a large executable that could be replaced
by 'pandoc --strict'.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1834 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-06 18:55:28 +00:00
fiddlosopher
d6642c322c Bump version to 1.5 since API has changed.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1831 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-03 05:53:49 +00:00
fiddlosopher
9fee73d2a3 Allow absolute URI as parameter (in this case, content is downloaded).
+ Adds dependency on HTTP.
+ If a parameter is an absolute URI, pandoc will try to
  get the content via HTTP.
+ So, you can do:  pandoc -r html -w markdown http://www.fsf.org

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1826 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-02 07:37:01 +00:00
fiddlosopher
00da8f49bf Removed ref to Makefile in cabal file.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1819 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-17 09:10:51 +00:00
fiddlosopher
58f32c1928 Version bump to 1.4.1.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1802 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-10 08:30:21 +00:00
fiddlosopher
dba0b40e2e Removed unneeded dependency on template-haskell.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1791 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-03 08:24:54 +00:00
fiddlosopher
2ae3b9239e Moved data/ui -> s5. Added note on this in README.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1763 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-01 01:25:24 +00:00
fiddlosopher
c9b5fa20e6 Updated copyright date in cabal file.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1762 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 22:44:08 +00:00
fiddlosopher
ed1535de10 Added --reference-odt option.
This allows the user to customized the styles used in pandoc-generated
ODTs.  The user may also put a default reference.odt in the ~/.pandoc
directory.

We have removed the old data/odt directory and replaced it with a
reference.odt.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1760 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 22:40:59 +00:00
fiddlosopher
9c54354cd7 Make the -fno-warn-unused-do-bind conditional on ghc >= 6.12.
This option isn't recognized by older ghcs.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1753 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 16:48:50 +00:00
fiddlosopher
c8a9cbf911 Revised tested-with field to be more precise.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1751 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 16:48:41 +00:00
fiddlosopher
a37527c501 Added GHC versions to tested-with field in cabal file.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1749 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 16:48:26 +00:00
fiddlosopher
c97c099c61 Removed unneeded Extensions from cabal file.
Also disable compiler warnings for discarded values in do blocks.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1746 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 16:48:05 +00:00
fiddlosopher
fdf00ce17e Version bump to 1.4.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1745 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 02:09:43 +00:00
fiddlosopher
225f7dd411 Got s5 writer working with html template.
s5 css and js is included using header-includes variable.
We don't need a separate s5 template, so it has been
removed.

Use linebreak to separate authors in S5 title page.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1705 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:13:41 +00:00
fiddlosopher
b80de325b7 Moved odt-styles -> odt. Changed ODT module to look at user data first.
So if the user has an odt-styles directory in ~/.pandoc, it
will be used instead of the default.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1694 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:11:49 +00:00
fiddlosopher
9eb435d3c1 Removed TH module; refactored LaTeXMathML not to use TH.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1692 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:11:23 +00:00
fiddlosopher
ae44c7297f Removed TH dependency from S5 module, removed DefaultTemplates.
S5 module now exports s5HeaderIncludes, which pandoc.hs
includes if writer is s5 and standalone.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1691 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:11:13 +00:00
fiddlosopher
2b1c010599 Added getDefaultTemplate to Templates.
Exposed Templates module in API.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1688 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:10:49 +00:00
fiddlosopher
8c74cebbfc Added templates/ directory.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1687 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:10:42 +00:00
fiddlosopher
ca97f1482d Renamed headers -> templates.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1677 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:09:20 +00:00
fiddlosopher
a42bae619a Added templates module.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1673 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:08:38 +00:00
fiddlosopher
d86c01795f Changed RunTests.hs to use the Diff library.
Previously a copy of Diff.hs was included.  But it is better
to use the compiled, installed version, since speed can be
a problem in some cases.

This change means that 'cabal test' presupposes that the Diff
library is installed.

Removed tests/Diff.hs from cabal file.

Changed RunTests to use local environment.
We need at least HOME, so pandoc can find its data directory.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1672 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:08:30 +00:00
fiddlosopher
2a6803c7b6 Removed reference to html2markdown wrapper in wrapper flag description.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1653 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-07 08:26:22 +00:00
fiddlosopher
8c23996fae Version bump to 1.3 (because of change to ParserState).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1641 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-01 20:35:52 +00:00
fiddlosopher
7c6467a115 Bumped version to 1.2.2 and updated changelog.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1630 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-11-28 03:22:22 +00:00
fiddlosopher
11867521f7 Version bump to 1.2.1.1.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1625 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-11-22 18:31:38 +00:00
fiddlosopher
4c387a4bc7 Added markdown2pdf.1 to tmp-files in cabal.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1623 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-11-22 08:20:51 +00:00
fiddlosopher
f361a743b6 Added upper version limit to base in cabal file.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1590 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-07-04 07:27:17 +00:00
fiddlosopher
ccc70f62e4 Version bump to 1.2.1.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1589 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-07-04 07:27:12 +00:00
fiddlosopher
15258f66f0 Fixed duplicate text bug in markdown2pdf.hs. (Paulo Tanimoto)
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1582 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-06-25 01:12:07 +00:00
fiddlosopher
541a032e49 Don't install markdown2pdf by default - still has bugs.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1581 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-06-17 03:40:45 +00:00
fiddlosopher
cceede4ca2 Added new Haskell version of markdown2pdf.
Thanks to Paulo Tanimoto for the patch.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1573 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-05-01 04:18:14 +00:00
fiddlosopher
490c4304f5 Fixed profiling options.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1569 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-04-29 19:29:09 +00:00
fiddlosopher
59563e5fb1 Added -caf-all to profiling options.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1566 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-04-29 19:28:45 +00:00
fiddlosopher
a972a6ccbc Use Paths_pandoc to get version number.
(Instead of hard-coding it into Text/Pandoc.hs.)

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1560 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-04-18 16:15:56 +00:00
fiddlosopher
24cb44ad6c Revert "Require Cabal >= 1.6."
This reverts commit 1823bf615b.
Reason:  This requirement doesn't help, since the problem is in
compiling Setup.hs.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1550 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-26 15:58:32 +00:00
fiddlosopher
1823bf615b Require Cabal >= 1.6.
This is needed for the new test hook, because the
PackageName type is new in 1.6.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1549 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-26 15:56:15 +00:00
fiddlosopher
5f3a147dfd Removed plugin support.
Plugins will probably be added in a later version,
but for now we want to avoid the heavy GHC API dependency.
Also, plugins are very slow with the current system.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1548 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-24 22:59:44 +00:00
fiddlosopher
bb639d5506 Added new lhs tests to cabal file.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1547 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-14 18:54:30 +00:00
fiddlosopher
f1c22f3d1a Version bump to 1.2.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1546 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-14 18:30:11 +00:00
fiddlosopher
bdcd54a485 Make wrappers flag False by default.
This can change when we've got haskell versions of all
the wrappers.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1544 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-14 17:24:28 +00:00
fiddlosopher
cdd3b67a05 Rewrote hsmarkdown in Haskell for portability.
For now, keeping the old shell script too.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1533 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-31 18:30:26 +00:00
fiddlosopher
5a9e3b7445 Renamed Main.hs -> pandoc.hs.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1531 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-31 17:13:30 +00:00
fiddlosopher
155809d220 Added TemplateHaskell to Extensions for executable, removed -threaded for library.
Thanks to duncan.coutts for the bug report.  Resolves Issue #121.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1529 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-25 17:55:47 +00:00
fiddlosopher
42aca57dee Moved all haskell source to src subdirectory.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1528 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-24 20:00:26 +00:00
fiddlosopher
066e1cfe90 Moved some Extra-Source-Files to Data-Files.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1520 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-24 19:58:14 +00:00
fiddlosopher
874c3e0dea Added a plugin system, based on hint.
+ In Text.Pandoc.Definition, added processIn, processInM,
  and queryIn, and deprecated processPandoc and queryPandoc
  for these more general functions, which are useful in writing
  plugins.

+ Added module Text.Pandoc.Plugins.

+ Added a --plugins option to Main, and code to run the parsed pandoc
  document through all the plugins.

+ Provided five sample plugin files in the plugins/ directory.

+ Documented --plugin in the pandoc man page and README.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1519 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-24 19:58:06 +00:00
fiddlosopher
243008242d Brought citeproc support up to date for citeproc-hs-0.2.
(Patch by Andrea Rossato.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1518 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-12-29 22:45:18 +00:00
fiddlosopher
3a6bfd75cb Added Bug-Reports field to cabal file.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1516 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-12-23 02:57:00 +00:00
fiddlosopher
035f0ff917 Conditionally depend on syb and base >= 4 if ghc >= 6.10.
Resolves Issue #109.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1496 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-12-01 04:54:29 +00:00
fiddlosopher
e5c28b37c2 Removed package-URL field from cabal file.
This pointed to an old version, and isn't really needed since the
cabal file comes with the source bundle.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1495 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-12-01 04:54:23 +00:00
fiddlosopher
95efec1e62 Updated location of odt-styles in pandoc.cabal.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1488 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-11-06 17:12:02 +00:00
fiddlosopher
2ed83d7921 Version bump to 1.1.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1473 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-10-30 01:03:06 +00:00
fiddlosopher
51a58987b3 Bump version to 1.0.0.2.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1463 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-10-16 01:00:59 +00:00
fiddlosopher
d0fe8dcae0 Add BUGS to files in tarball.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1461 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-10-16 01:00:42 +00:00
fiddlosopher
2483d5ff5b Bumped version to 1.0.0.1.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1449 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-14 03:15:59 +00:00
fiddlosopher
087e4457d2 pandoc.cabal: Removed most upper-bounds on dependency versions.
Reason:  Upper bounds may cause problems for package managers, since
many package management systems do not (like Cabal) allow multiple
versions of libraries to be installed simultaneously.  At this point
very few packages in HackageDB use upper bounds.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1436 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-10 21:57:45 +00:00
fiddlosopher
8c182d4d99 Use versioned dependencies in pandoc.cabal, following guidelines in
<http://www.haskell.org/haskellwiki/Package_versioning_policy>.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1435 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-10 21:39:58 +00:00
fiddlosopher
e7cc9b26db Version bump to 1.0.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1434 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-10 21:39:50 +00:00
fiddlosopher
08ba270027 pandoc.cabal: removed COPYING from Extra-Source-Files;
it is already included under License-File.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1431 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-09 23:12:45 +00:00
fiddlosopher
000b89c718 Use Data.List's 'intercalate' instead of custom 'joinWithSep'.
+ Removed joinWithSep definition from Text.Pandoc.Shared.
+ Replaced joinWithSep with intercalate
+ Depend on base >= 3, since in base < 3 intercalate is not included.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1428 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-08 06:36:28 +00:00
fiddlosopher
4dca8f6e75 Reworked Text.Pandoc.ODT to use zip-archive instead of calling external 'zip'.
+ Removed utf8-string and xml-light modules, and unneeded content.xml.
+ Removed code for building reference.odt from Setup.hs.
  The ODT is now built using template haskell in Text.Pandoc.ODT.
+ Removed copyright statements for utf8-string and xml modules,
  since they are no longer included in the source.
+ README: Removed claim that 'zip' is needed for ODT production.
+ Removed dependency on 'zip' from debian/control.
+ Text.Pandoc.Shared: Removed withTempDir, added inDirectory.
+ Added makeZip to Text.Pandoc.TH.
+ pandoc.cabal: Added dependencies on old-time, zip-archive, and utf8-string.
  Added markdown2pdf files to extra-sources list.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1417 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-04 02:51:28 +00:00
fiddlosopher
3d2ff3d0a8 Removed PDF writer from core pandoc, restored markdown2pdf.
+ Added markdown2pdf.
+ Removed Text/Pandoc/PDF.hs.
+ Removed references to PDF writer from Main.hs.
+ Removed references to PDF writer from pandoc.cabal.
+ Added markdown2pdf.1 to list of man pages in Setup.hs.
+ Added markdown2pdf.1.md man page source.
+ Added reference to markdown2pdf(1) in pandoc man page.
+ Added markdown2pdf to WRAPPERS in Makefile.
+ Removed mention of pdf writer from README; added markdown2pdf.
+ Added remarks on markdown2pdf dependencies to README.Debian.
+ Added markdown2pdf to web/index.txt.in.
+ Use markdown2pdf for pdf web demos.
+ Put markdown2pdf back into debian control and rules.
+ Added markdown2pdf to macports Portfile.
+ Added markdown2pdf to freebsd package.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1415 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-27 05:50:26 +00:00
fiddlosopher
d00da31622 Simplified and improved UTF8 handling:
+ Removed utf8-string cabal configuration flag.
+ Instead, we just include System.IO.UTF8 and Codec.Binary.UTF8.String
  from utf8-string package in the source tree, avoiding a dependency
  on utf8-string and avoiding crufty custom UTF8 code. (The old
  Text.Pandoc.UTF8 had problems with the getContents function.)
+ Removed lots of CPP directives that are no longer needed.
+ In Setup.hs, use '-i..' in running RunTests.hs, so the local UTF8
  code will be found.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1411 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-14 01:32:54 +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
aeaf5e5108 Don't expose Text.Pandoc.Biblio module unless citeproc option is selected.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1408 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-12 01:23:17 +00:00
fiddlosopher
b7a9d3206e Added new markdown reader tests to list of extra source files in pandoc.cabal.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1404 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-11 06:57:53 +00:00
fiddlosopher
1cbc974e7e Removed markdown2pdf and all references to it.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1395 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-10 17:34:02 +00:00
fiddlosopher
0f4bdc6b7d Added Text.Pandoc.PDF module, 'pdf' as new output option.
The module calls pdflatex to produce the PDF, and is basically shell
scripting in haskell. But this is better than the existing markdown2pdf
script, which is limited to POSIX.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1394 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-10 17:33:20 +00:00
fiddlosopher
28828979a6 Moved more of the build process from Makefile to Setup.hs:
+ tarball target now calls 'sdist'
+ Added to "Extra-source-files" and "Extra-tmp-files" in pandoc.cabal,
  so 'sdist' and 'clean' will work properly.
+ Makefile no longer generates man pages or reference.odt.
+ Setup.hs now generates man pages in a postbuild hook.
+ Added dependency-checking to Setup.hs, so it only rebuilds things
  that need rebuilding.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1389 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-09 23:45:40 +00:00
fiddlosopher
5d3d2d79b3 Rewrote test suite so it doesn't depend on perl or unix tools.
+ Replaced old runtests.pl with a Haskell script RunTests.hs.
+ Added Diff.hs module to be used by RunTests.hs instead of unix 'diff'.
+ Added test hook to Setup.hs, so tests may be run from cabal.
+ Changed Makefile's 'test' target to run tests via cabal.
+ Removed old generate.sh.
+ Since we no longer have 'sed' to filter out raw HTML sections
  from the docbook writer test, or raw LaTeX sections from the
  context writer test, we now just include these sections.
  They can be taken out if it is necessary to process the files.
+ Updated latex and context writer tests to remove extra spaces
  after '\\item'
+ Added a markdown table reader test.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1385 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-09 16:51:08 +00:00
fiddlosopher
80715bd126 Added Text.Pandoc.UTF8 as a backup for when utf8-string is not present.
+ Added Text.Pandoc.UTF8
+ Changed flag name from utf8 to utf8-string
+ Changed CPP MACRO from _UTF8 to _UTF8STRING
+ Import IO functions from Text.Pandoc.UTF8 when utf8-string not available.
+ Removed utf8-string dependency from debian/control.
+ Removed pandoc.cabal.ghc66; we no longer support GHC 6.6
+ Modified INSTALL instructions


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1383 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-08 00:11:58 +00:00
fiddlosopher
a560c0acc1 Mention ODT writer in pandoc.cabal.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1379 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-05 23:10:04 +00:00
fiddlosopher
1bfe1b84a8 Added support for Cite to Markdown reader, and conditional support for citeproc module.
+ The citeproc cabal configuration option sets the _CITEPROC macro, which conditionally
  includes code for handling citations.
+ Added Text.Pandoc.Biblio module.
+ Made highlighting option default to False.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1376 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-04 03:15:34 +00:00
fiddlosopher
6ff1e2a976 Improved configuration options and CPP macros.
+ Now all macros that serve as flags start with a single _.
+ Added message to '-v' output about UTF-8 support.
+ Made highlighting the default.  If the highlighting-kate
  library is not present, cabal will deselect the option
  (unless it was explicitly set).
+ Add UTF8 support to test function in Text.Pandoc.Shared.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1374 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-03 23:33:40 +00:00
fiddlosopher
ed4b003997 Added 'utf8' configuration flag to pandoc.cabal.
This makes it possible to compile pandoc without utf8, using
'-f-utf8' at configuration time.  Utf-8 support is still the
default.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1373 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-03 08:43:28 +00:00
fiddlosopher
1e2f2bc4f6 Improved template handling:
+ Split template haskell functions into new module,
  Text.Pandoc.TH
+ Distinguish contentsOf and binaryContentsOf; the former
  uses text mode in Windows, while the latter uses binary mode


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1368 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-02 17:22:55 +00:00
fiddlosopher
e371db97d7 Fixes to make haddock work with template haskell:
+ Added CPP, TemplateHaskell, FlexibleInstances to cabal file "Extensions" field
+ Added #ifndef __HADDOCK__ cpp declarations in the files using template haskell.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1366 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-01 23:29:55 +00:00
fiddlosopher
5c1c786d65 Removed FlexibleInstances Extension line from pandoc.cabal; it isn't needed
because the relevant files have pragmas.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1365 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-01 21:48:16 +00:00
fiddlosopher
5383db206b Removed 'CPP' from Extension in pandoc.cabal.
It is not needed (since the relevant files have a pragma anyway),
and it causes problems on windows (Cabal thinks pandoc.cabal has
changed every time configure is run).


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1360 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-01 21:00:18 +00:00
fiddlosopher
7b986acd72 Don't use OverloadedStrings in ODT writer.
Remove version dependency from bytestring.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1359 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-01 15:17:48 +00:00