Commit graph

417 commits

Author SHA1 Message Date
fiddlosopher
0ceb538ecd Markdown writer:
Fixed a small problem with lengths of dashed lines in tables.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@659 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09 01:24:49 +00:00
fiddlosopher
ad7bb70cce Added --toc support to Markdown writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@658 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09 01:14:35 +00:00
fiddlosopher
56efd6176f Added support for --toc to RTF writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@657 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09 00:51:07 +00:00
fiddlosopher
489a2bb1d9 Moved isHeaderBlock from Text.Pandoc.Writers.HTML
to Text.Pandoc.Shared.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@656 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09 00:50:14 +00:00
fiddlosopher
2d4a22d0be Regularized the scheme for unique header identifiers in HTML writer:
- punctuation is now all removed (except -)
 - spaces are turned into -
 - all lowercase
This scheme should be fairly predictable.
Updated tests accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@655 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 17:33:03 +00:00
fiddlosopher
497a1b7815 Changes to tests to accommodate r653.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@654 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 17:09:37 +00:00
fiddlosopher
7f5638853b HTML writer changes:
+ change in scheme for construction of unique identifiers for headers:
  - all lowercase
  - spaces turn into -, not _
+ TOC items now have their own identifiers, starting with TOC-
+ when there is a TOC, headers link back to the corresponding TOC items,
  rather than the top of the TOC.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@653 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 17:09:17 +00:00
fiddlosopher
c3fb1dd4ea Added --toc support to RST writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@652 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 16:48:54 +00:00
fiddlosopher
369a57e339 Modified markdown2pdf to run pdflatex a second time if --toc was
specified; otherwise the table of contents won't appear.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@651 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 16:40:07 +00:00
fiddlosopher
dfcae807b0 Man writer: Don't print .\" t at beginning unless we're
in --standalone mode.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@650 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:54:07 +00:00
fiddlosopher
e58a55eb41 LaTeX writer:
+ Leave extra blank line after \maketitle
+ Insert \tableofcontents if --toc option was selected

Test suite:
+ extra blank line after \maketitle in writer.latex


git-svn-id: https://pandoc.googlecode.com/svn/trunk@649 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:48:07 +00:00
fiddlosopher
608b22e9dd HTML writer: Slight change in code for generating unique
identifiers.  The numbers used after duplicate identifiers
are now separated from them by a hyphen:  Duplicate-1
rather than Duplicate1.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@648 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:40:22 +00:00
fiddlosopher
5b68993a3e Added tests for man writer to runtests.pl.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@647 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:39:24 +00:00
fiddlosopher
e252fa300a Fixed bug in Notes ($$ instead of <>), which caused
note blocks to be indented.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@646 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:38:54 +00:00
fiddlosopher
4e81ef28ed Added version of test suite for man page.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@645 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:38:14 +00:00
fiddlosopher
595f6bf39a Man page templates:
Escaped --'s in option list headers, so they won't be parsed
as Em dashes when -S mode is used.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@644 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:31:26 +00:00
fiddlosopher
dc7102eec3 Use -S option in building man pages.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@643 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:22:00 +00:00
fiddlosopher
3f3c29f9a4 Added test suites for RST, markdown, and man tables.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@642 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:11:26 +00:00
fiddlosopher
766dbb9899 Updated tests to account for changes in HTML writer (identifiers).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@641 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:09:26 +00:00
fiddlosopher
a414ec9d63 Adjusted copyright notices to 2006-7; use
real email address instead of lamely attempting
to obfuscate.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@640 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07 22:51:55 +00:00
fiddlosopher
8e1f484353 Added table tests for all writers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@639 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07 22:50:12 +00:00
fiddlosopher
956deeda4b Haddock documentation for Text.Pandoc.Blocks.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@638 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07 22:37:11 +00:00
fiddlosopher
3e6184763e Man writer: Use integral n measures instead of fractional i
measures.  Calculate on basis of a 70 character line, since
the default is 78 but the table will appear indented 8 spaces
in standard man output.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@637 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07 22:18:46 +00:00
fiddlosopher
f82b1f8eec Added Maintainer and Copyright fields to pandoc.cabal.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@636 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07 21:57:18 +00:00
fiddlosopher
6f4017b8ea Put table of contents in its own div (id="toc").
git-svn-id: https://pandoc.googlecode.com/svn/trunk@635 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07 21:49:46 +00:00
fiddlosopher
54a0e4c3b2 HTML writer modifications:
+ Added code to HTML Writer to generate a table of contents if the
  writerTableOfContents option is specified.  This is an unordered list
  with links to the headers.  It is constructed hierarchically, based on
  the order of the headers and their levels.
+ If a TOC is used, the headers become links back to the TOC.
+ Removed Toc from WriterState; instead, the TOC is generated at the top
  level, by the function tableOfContents.
+ Fixed a bug in uniqueIdentifiers which prevented it from handling more than
  one duplicate.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@634 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07 19:08:11 +00:00
fiddlosopher
f2b16c2065 + Introduced writerIgnoreNotes option in WriterOptions. This is needed
for processing header blocks for a table of contents, since notes on
  headers should not appear in the TOC.  Set default in Main.hs.
+ Moved Element, headerAtLeast, and hierarchicalize from Docbook writer
  to Text.Pandoc.Shared.  This is because HTML writer now uses these in
  constructing a table of contents.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@633 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07 19:04:10 +00:00
fiddlosopher
fdf31cd23d Added writerTableOfContents to WriterOptions, and added a
--table-of-contents/--toc command-line option to Main.hs.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@632 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07 05:43:23 +00:00
fiddlosopher
98372ea277 Renamed Pandoc.cabal -> pandoc.cabal, for better compatibility
with HackageDB, which likes the cabal file to have the same name
as the tarball.  Modified references to Pandoc.cabal in INSTALL
and Makefile.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@631 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07 05:25:44 +00:00
fiddlosopher
5a0ce1bcac Changes to HTML writer to incorporate automatic identifiers for
headers and table of contents:
+ WriterState now includes a list of header identifiers and a table
  of contents in addition to notes.
+ The function uniqueIdentifiers creates a list of unique identifiers
  from a list of inline lists (e.g. headers).
+ This list is part of WriterState and gets consumed by blockToHtml
  each time a header is encountered.
+ Headers are now printed with unique identifiers based on their names,
  e.g. Shell_scripts for "# Shell scripts".  Fancy stuff like links,
  italics, etc. gets ignored.  A numerical index is added to the end if
  there is already an identifier by the same name, e.g. "Shell_scripts1".
+ Provision has been made for a table-of-contents block element, but this
  has not yet been added.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@630 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07 03:52:10 +00:00
fiddlosopher
0a250edfde Minor comment change.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@629 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07 03:05:06 +00:00
fiddlosopher
ad2c642713 Pandoc.hs: Export all definitions in Text.Pandoc.Definition,
rather than exporting the module.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@628 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-06 16:37:46 +00:00
fiddlosopher
f8ce411ea1 README: Documented the fact that if pandoc is called
as 'hsmarkdown', it runs in strict markdown compatibility
mode.  This can be achieved using a symbolic link.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@627 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-06 16:30:32 +00:00
fiddlosopher
242ee99e8d Minor wording changes in README.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@626 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-06 16:21:38 +00:00
fiddlosopher
f9c988e703 Fixed bug in Markdown reader: links in footnotes were not
being processed.  Solution:  three-stage parse.  First, get
all the reference keys and add information to state.  Next,
get all the notes and add information to state.  (Reference
keys may be needed at this stage.)  Finally, parse everything
else.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@625 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-06 06:46:31 +00:00
fiddlosopher
1ca8a731bc Added table support to RST writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@624 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-05 06:14:48 +00:00
fiddlosopher
09f0247fd8 Added table support to markdown writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@623 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-04 22:21:52 +00:00
fiddlosopher
8d776e1e42 Improvements/bug fixes to Text.Pandoc.Blocks
library.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@622 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-04 22:21:08 +00:00
fiddlosopher
948ea86404 Include Text.Pandoc.Blocks in Pandoc.cabal's file list.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@621 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-04 18:55:25 +00:00
fiddlosopher
1a8b32afd5 Added Text.Pandoc.Blocks module for prettyprinting of
text tables.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@620 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-04 18:53:12 +00:00
fiddlosopher
4fe56a8d18 Man writer:
- Added scheme for specifying manual section and additional
  headers:
  % PROGNAM | 1 | User Manual | Version 4.0
- Modified man page sources to include section 1


git-svn-id: https://pandoc.googlecode.com/svn/trunk@619 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-04 15:53:49 +00:00
fiddlosopher
d5c47c33ca Added table support to man writer (using the tbl preprocessor).
The writer state now includes a list of "preprocessor" codes.
If the document contains a table, "t" (for "tbl") is added to the list.
If this list is nonempty, the man page starts with
.\" <list>
which instructs man to run the file through the appropriate
preprocessor before processing with groff.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@618 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-04 03:14:43 +00:00
fiddlosopher
cd08eabd26 Changes to website:
- Added groff man to list of output formats in index.txt
- Added a demo of man page creation to demos page


git-svn-id: https://pandoc.googlecode.com/svn/trunk@617 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-03 04:11:57 +00:00
fiddlosopher
cc67d17dda FreeBSD Makefile - bump version to 0.4, and require
GHC 6.6 or higher.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@616 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 03:49:08 +00:00
fiddlosopher
681ce02983 Documented man output in pandoc.1.md man page.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@615 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 03:40:46 +00:00
fiddlosopher
bd5f3876a4 Man writer: don't change - to \- (minus sign).
Leave them as hyphens.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@614 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 02:38:14 +00:00
fiddlosopher
2cb22a1f8a Man writer: better output for line break:
.PD 0     # set interparagraph space to 0
.P        # new paragraph
.PD       # reset interparagraph space to default.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@613 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 02:31:36 +00:00
fiddlosopher
f5a3d44494 Minor changes in Man writer:
- escape ' as \[aq], because ' can trigger groff commands.
- remove unneeded line breaks.
- use CR font in code blocks.
- use .P 0 for line breaks.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@612 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 02:23:05 +00:00
fiddlosopher
6d6fafde16 Don't use -S option in processing man pages,
since the '--' in options will be read as an
En-dash.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@611 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 02:19:43 +00:00
fiddlosopher
b412492725 Minor changes in man page sources.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@610 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 02:16:58 +00:00