Commit graph

275 commits

Author SHA1 Message Date
fiddlosopher
e6cc2aa3cf Fixed bug in smart quoting: recognize ' in contractions like
"don't" as not beginning single quoted contexts.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@505 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-24 04:49:36 +00:00
fiddlosopher
1121e8738b Removed 'gsub' entirely and replaced its uses with 'substitute'.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@501 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-22 22:52:39 +00:00
fiddlosopher
8f0750574a + Added a 'substitute' function to Shared.hs. This is a generic
list function that can be used to substitute one substring
  for another in a string, like 'gsub' except without regular
  expressions.
+ Use 'substitute' instead of 'gsub' in the LaTeX writer.  This
  avoids what appears to be a bug in Text.Regex, whereby "\\^"
  matches "\350".  There seems to be a slight speed improvement
  as well.  (Note:  If this works, it would be good to replace
  other uses of gsub that don't employ regexs with 'substitute'.) 


git-svn-id: https://pandoc.googlecode.com/svn/trunk@500 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-22 21:28:46 +00:00
fiddlosopher
a7839a18a7 Small bug fix to last change, and count "'S" as well as "'s" as
possessive when followed by non-alphanumeric.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@499 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-18 02:54:07 +00:00
fiddlosopher
2c64e7947b More tweaks to smart quote parsing: a ' is not a single quote
start if followed by 's' and then a non-alphanumeric.  (Yes,
this is English-centric, I'm afraid.  But it does help, and I
can't think of a language in which 's' by itself is a word.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@498 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-18 02:47:27 +00:00
fiddlosopher
5a48839168 Minor tweaks to smart quoting code.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@497 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-16 23:51:57 +00:00
fiddlosopher
8c257385ac Fixed bug in smart quote recognition: ' before ) or certain
other punctuation must not be an open quote.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@496 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-16 23:46:33 +00:00
fiddlosopher
f3cf1cc168 Fixed haddock documentation errors.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@495 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-16 00:07:42 +00:00
roktas
b4f3eb53f1 Fix debian/changelog.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@494 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-15 22:50:29 +00:00
fiddlosopher
60989d0637 Added support for tables in markdown reader and in LaTeX,
DocBook, and HTML writers.  The syntax is documented in
README.  Tests have been added to the test suite.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@493 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-15 19:52:42 +00:00
fiddlosopher
4224d91388 Changed website to link to Google's download details page (with
SHA1 checksum) rather than directly to the files.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@491 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-10 22:41:05 +00:00
fiddlosopher
9a2c653277 More website tweaks. Added demo of extra xsl configuration
and CSS in chunked xhtml produced from docbook.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@489 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-10 03:17:37 +00:00
fiddlosopher
3528c72d7e Minor changes to Makefile required by changes to website
build system.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@488 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-10 02:41:27 +00:00
fiddlosopher
e7dabc9dd0 More Changes to website target. Moved to a templating system
for the examples page.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@487 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-10 02:33:33 +00:00
fiddlosopher
8d4a1ed039 More website changes. Include demo of docbook postprocessed
by xmlto.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@486 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 20:42:13 +00:00
fiddlosopher
c80f181137 Reorganized Makefile target - now uses a subsidiary Makefile
that can be run from the website directory for small changes.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@485 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 18:55:50 +00:00
fiddlosopher
55031090de Need to export TMPDIR in tempdir.sh.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@482 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 08:39:19 +00:00
fiddlosopher
f55b54917a On Cygwin, set TMPDIR to . before using mktemp. Otherwise
one gets an error creating the output file in the /tmp directory.
I haven't tracked this one down, but this should serve as a 
workaround.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@481 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 08:32:59 +00:00
fiddlosopher
46580147a5 Reverted r471. My alternative to --strip-trailing-cr didn't
work.  This only affects the test target on systems without
GNU diff (rare), so I'm not too worried about it.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@480 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 07:40:00 +00:00
fiddlosopher
edfac2b491 Small tweak on last demo in website.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@479 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 07:16:51 +00:00
fiddlosopher
5bcfa22330 Added DocBook to description of package in Pandoc.cabal.in.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@478 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 07:07:21 +00:00
fiddlosopher
b37f8da181 Small change in web page for "Pandoc features."
git-svn-id: https://pandoc.googlecode.com/svn/trunk@477 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 07:06:15 +00:00
fiddlosopher
b25706e098 Cleaned up markdown2pdf.in. Note that bibtex does not return
an error condition when it gives warnings, so instead we grep
for warnings or error messages to see if we need to print the
log.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@476 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 06:38:15 +00:00
fiddlosopher
8adb142720 Minor changes to markdown2pdf: removed an unnecessary '|| exit $?',
and made sure error output goes to stderr.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@475 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 06:11:29 +00:00
fiddlosopher
458bb40989 Fixed docbook writer test -- removed named entities.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@474 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 05:45:06 +00:00
fiddlosopher
19123a540e Don't use named entities in docbook writer. Instead, use
numerical entities, for portability across stylesheets.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@473 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 05:40:40 +00:00
fiddlosopher
acb4dab5eb Added comment relevant to last revision.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@472 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 04:28:29 +00:00
fiddlosopher
35a06b9028 Replaced diff --strip-trailing-cr with something more portable
in runtests.pl.  (This is a GNU option.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@471 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 04:27:07 +00:00
fiddlosopher
4c59d89303 Removed "Extra-source-files" from Pandoc.cabal.in, since
it seems to cause problems on GHC 6.4.1!


git-svn-id: https://pandoc.googlecode.com/svn/trunk@470 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 04:23:05 +00:00
fiddlosopher
be157f353d Changes to markdown2pdf.in:
+ Exit if pandoc fails (second time through) -- no need to store the log for this.
+ Run pdflatex up to three times, if needed to resolve references.  Also
  run bibtex as needed.
+ Minor reformatting.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@469 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 04:10:24 +00:00
fiddlosopher
4814b0ae02 Minor cleanups in markdown2pdf.in.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@468 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 02:07:48 +00:00
fiddlosopher
11f1e77402 Change to Makefile to add features page to website.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@467 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 02:07:20 +00:00
fiddlosopher
8c98a36b33 Improvements in website:
+ Descriptions on examples.
+ New "features" page highlighting Pandoc's features.
+ Small other improvements.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@466 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 02:06:57 +00:00
fiddlosopher
a428c9fadc Moved up processing of --dump-args so that output file won't
be created first! 


git-svn-id: https://pandoc.googlecode.com/svn/trunk@465 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 01:43:23 +00:00
fiddlosopher
80224229fc Added notice about pandoc-announce list to web page.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@464 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 00:40:48 +00:00
fiddlosopher
9af97d16d2 Small css change on website.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@463 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 00:12:32 +00:00
fiddlosopher
3ae8476db0 Formatting changes in debian/changelog, and added note about
backslash escaping changes.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@462 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-09 00:03:31 +00:00
fiddlosopher
d83b70f3a0 + Changed 'escapedChar' in Markdown reader so that only the
characters Markdown escapes are escaped in strict mode.
  When not in strict mode, Pandoc allows all non-alphanumeric 
  characters to be escaped.
+ Added documentation of backslash escapes to README.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@461 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08 23:54:15 +00:00
roktas
3d0ee324f3 + Export TEXINPUTS variable.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@460 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08 21:54:10 +00:00
roktas
8b98ef22da Various fixes in markdown2pdf.
+ Add a trailing ':' to TEXTINPUTS as per the instruction in TeX FAQ:
    http://www.tex.ac.uk/cgi-bin/texfaq2html?label=graphicspath
  In the lack of it, pdflatex silently fails, for example, with the 
  following command: 'TEXINPUTS=/tmp markdown2pdf'
+ Put the origdir at the front for the correct directory search order.
+ pdflatex didn't create log file on one occasion (the above command) that 
  made sed commands failed.  Test the existence of log before filtering it.
+ A few non-essential changes.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@459 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08 21:50:58 +00:00
fiddlosopher
965f80a6cf Removed unneeded "export" statements.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@458 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08 21:24:31 +00:00
fiddlosopher
9a37ee459c Documentation changes corresponding to r456.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@457 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08 21:16:18 +00:00
fiddlosopher
58697ebe78 Modified shell scripts to use new Pandoc --dump-args and
--ignore-args features.  This allows a simpler, cleaner design.

Make use of TEXINPUTS environment variable to ensure that
pdflatex will find images and other sources in the working
directory from which markdown2pdf is called.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@456 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08 19:55:34 +00:00
fiddlosopher
9eafa97156 Have pandoc return exit code 2 whenever a usage message is
produced, even if it's because a bad option was specified.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@455 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08 16:29:29 +00:00
fiddlosopher
5dda65b5dc Changes to Pandoc's options to facilitate wrapper scripts:
+ removed -d/--debug option
+ added --dump-args option, which prints the name of the output file
  (or '-' for STDOUT) and all the command-line arguments (excluding
  Pandoc options and their arguments), one per line, then exits.  Note
  that special wrapper options will be treated as arguments if they
  follow '--' at the end of the command line.  Thus,
     pandoc --dump-args -o foo.html foo.txt -- -e latin1 
  will print the following to STDOUT:
     foo.html
     foo.txt
     -e
     latin1
+ added --ignore-args option, which causes Pandoc to ignore all
  (non-option) arguments, including any special options that occur
  after '--' at the end of the command line.
+ '-' now means STDIN as the name of an input file, STDOUT as the
  name of an output file.  So,
     pandoc -o - -
  will take input from STDIN and print output to STDOUT.  Note that
  if multiple '-o' options are specified on the same line, the last
  one takes precedence.  So, in a script,
     pandoc "$@" -o - 
  will guarantee output to STDOUT, even if the '-o' option was used.
+ documented these changes in man pages, README, and changelog.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@454 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08 08:11:08 +00:00
fiddlosopher
d47ce5b1f4 Added [breaklinks=true] to latex writer test case.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@453 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07 05:28:36 +00:00
roktas
856db32b85 Simplify regex.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@452 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07 05:12:56 +00:00
roktas
52666e2301 + Revert previous commit which is wrong and insufficient on some parts.
+ Improve sed filter to extract the following error contexts:
  1. From a line starting with ! to the next blank line.
  2. From a line beginning "LaTeX Warning:" to the next blank line.
  3. From a line beginning "Error:" to the next blank line, or EOF.
+ Improve the error message headers (perhaps needs a proof reading).   
  Prepend the wrapper name to the error headers for easy spotting.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@451 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07 05:09:07 +00:00
roktas
900e352f1c + Fix a nasty bug in markdown2pdf. It used to send the log file to
/dev/null!

+ Another problem is the sed filter which returns nothing with pdfeTeX 
  '3.141592-1.21a-2.2 (Web2C 7.5.4)' here.  As the first cut towards 
  fixing, use a somewhat heuristic approach: try to build a short log by 
  matching against a magic error stamp, dump the whole log if the previous 
  attempt failed.  Note that, there is still room to improve this code.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@450 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07 03:17:40 +00:00
fiddlosopher
6f76111e92 Added [breaklinks=true] to hyperref package in LaTeX header.
This produces nicer-looking output by default.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@449 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07 02:37:36 +00:00