aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Man.hs
AgeCommit message (Collapse)AuthorFilesLines
2013-06-27Man writer: give more fine-grained control in template.John MacFarlane1-10/+16
Now the `title`, `section`, `header`, and `footer` can all be set individually in metadata. The `description` variable has been removed. Quotes have been added so that spaces are allowed in the title. If you have a title that begins COMMAND(1) footer here | header here pandoc will parse it as before into a title, section, header, and footer. But you can also specify these elements explicitly. Closes #885.
2013-06-24Use new flexible metadata type.John MacFarlane1-19/+17
* Depend on pandoc 1.12. * Added yaml dependency. * `Text.Pandoc.XML`: Removed `stripTags`. (API change.) * `Text.Pandoc.Shared`: Added `metaToJSON`. This will be used in writers to create a JSON object for use in the templates from the pandoc metadata. * Revised readers and writers to use the new Meta type. * `Text.Pandoc.Options`: Added `Ext_yaml_title_block`. * Markdown reader: Added support for YAML metadata block. Note that it must come at the beginning of the document. * `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`, `stateAuthors`, `stateDate` with `stateMeta`. * RST reader: Improved metadata. Treat initial field list as metadata when standalone specified. Previously ALL fields "title", "author", "date" in field lists were treated as metadata, even if not at the beginning. Use `subtitle` metadata field for subtitle. * `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string instead of a compiled template.. * OPML template: Use 'for' loop for authors. * Org template: '#+TITLE:' is inserted before the title. Previously the writer did this.
2013-06-24Revised Text.Pandoc.Templates to accept JSON contexts.John MacFarlane1-1/+5
Currently the library is set up with a shim for association lists, for compatibility, but this can change when the writers are changed. New export: `varListToJSON`. Removed `Empty`. Simplified template type to a newtype.
2013-04-09Man writer: use one decimal place for column widths.John MacFarlane1-1/+1
This, I hope, will fix test failures on GHC 7.6 due to (presumably) different rounding or floating point multiplication.
2013-01-09Added Attr field to Header.John MacFarlane1-1/+1
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-06Don't put the text of an autolink in Code font.John MacFarlane1-2/+3
2012-09-29Renamed removedLeadingTrailingSpace to trim.John MacFarlane1-2/+1
Also removeLeadingSpace to triml, removeTrailingSpace to trimr.
2012-08-18Man writer: Escape - as \-.John MacFarlane1-1/+1
Unescaped -'s become hyphens, while \-'s are left as ascii minus signs. That is preferable for use with command-line options. See http://lintian.debian.org/tags/hyphen-used-as-minus-sign.html. Thanks to Andrea Bolognani for bringing the issue to our attention.
2012-07-26Moved WriterOptions and associated types Shared -> Options.John MacFarlane1-0/+1
2012-07-26Fixed whitespace errors.John MacFarlane1-39/+39
2012-03-09Made man writer more robust.John MacFarlane1-5/+6
Previously it assumed that inlines weren't normalized.
2012-03-07Merge pull request #438 from michaelt/patch-2John MacFarlane1-0/+2
Fix initial `Str "."` after `LineBreak` as well?
2012-03-07Fix initial `Str "."` after `LineBreak` as well? Michael Thompson1-0/+2
2012-03-07escape initial dot in code linesMichael Thompson1-1/+5
2011-12-27Replaced Apostrophe, Ellipses, EmDash, EnDash w/ unicode strings.John MacFarlane1-5/+7
2011-01-26Add support for attributes in inline Code.John MacFarlane1-4/+5
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-26Bumped version to 1.8; depend on pandoc-types 1.8.John MacFarlane1-3/+4
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.
2010-12-22Man writer: updated to use Pretty.John MacFarlane1-18/+22
2010-12-21Shared: Made splitBy take a test instead of an element.John MacFarlane1-1/+1
2010-07-20Made spacing at end of output more consistent.John MacFarlane1-1/+1
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-14Improved handling of code in man writer.John MacFarlane1-3/+7
+ Inline code is now in monoscpace, not bold. + Code blocks now use .nf (no fill) and .IP (indented paragraph). + Resolves Issue #247.
2010-04-26Man writer: convert math to unicode when possible.John MacFarlane1-2/+3
(As in other writers.)
2010-03-23Updated copyright notices.John MacFarlane1-2/+2
2010-03-13Use template variables for include-before/after.fiddlosopher1-5/+1
* These options now imply -s; previously they worked also in fragment mode. * Users can now adjust position of include-before and include-after text in the templates. * Default position of include-before moved back (as it originally was) before table of contents. * Resolves Issue #217. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1883 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-13Man writer: properly handle headerless tables.fiddlosopher1-2/+4
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1881 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Removed redundant imports (found by ghc 6.12).fiddlosopher1-2/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1750 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Revised man writer to use new templates.fiddlosopher1-42/+37
Note that now the "--after-body" will come after the "AUTHORS" section, whereas before it would come before it. This is a slight break from backwards compatibility. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1733 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31Changed Meta author and date types to Inline lists instead of Strings.fiddlosopher1-4/+6
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-31Removed unneeded writer options; use template variables instead.fiddlosopher1-12/+13
Removed writerIncludeAfter, writerIncludeBefore, writerTitlePrefix, writerHeader. Removed corresponding fields of Options structure in pandoc.hs. The options now set template variables (writerVariables) instead. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1684 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-07Don't print raw HTML in man output.fiddlosopher1-2/+2
Resolves Issue #183. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1657 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-07Improved syntax for markdown definition lists.fiddlosopher1-8/+8
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-11-28Better looking simple tables. Resolves Issue #180.fiddlosopher1-1/+3
* Markdown reader: simple tables are now given column widths of 0. * Column width of 0 is interpreted as meaning: use default column width. * Writers now include explicit column width information only for multiline tables. (Exception: RTF writer, which requires column widths. In this case, columns are given equal widths, adding up to the text width.) * Simple tables should now look better in most output formats. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1631 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-06-06Man writer: break lines at end of each sentence.fiddlosopher1-3/+36
groff expects this and treats . and ? differently when followed by line ending as opposed to ordinary space. Also, don't escape periods. Instead, use zero-width character \& to avoid unwanted interpretation of periods at start of line. Resolves Issue #148. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1580 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-24Moved all haskell source to src subdirectory.fiddlosopher1-0/+301
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1528 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-29Moved everything from src into the top-level directory.fiddlosopher1-293/+0
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1104 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-03Reverted back to state as of r1062. The template haskell changesfiddlosopher1-0/+293
are more trouble than they're worth. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1064 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-03Use template haskell to avoid the need for templates:fiddlosopher1-293/+0
+ Added library Text.Pandoc.Include, with a template haskell function $(includeStrFrom fname) to include a file as a string constant at compile time. + This removes the need for the 'templates' directory or Makefile target. These have been removed. + The base source directory has been changed from src to . + A new 'data' directory has been added, containing the ASCIIMathML.js script, writer headers, and S5 files. + The src/wrappers directory has been moved to 'wrappers'. + The Text.Pandoc.ASCIIMathML library is no longer needed, since Text.Pandoc.Writers.HTML can use includeStrFrom to include the ASCIIMathML.js code directly. It has been removed. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1063 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-12Undid last change: instead of blocking the internal links in thefiddlosopher1-1/+0
writers, it makes more sense to block them in the HTML reader. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1048 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-11Man writer: Don't print link source for internal links (#...).fiddlosopher1-0/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1047 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-27Added a writer option for wrapped text and a command-line optionfiddlosopher1-2/+3
'--no-wrap', which disables text wrapping. (Resolves Issue #26.) + Added support for '--no-wrap' to Main.hs. + Added wrapIfNeeded function to Text.Pandoc.Shared. + Use wrapIfNeeded instead of wrapped in the RST, Man, Docbook, and Markdown writers. + Note: Not yet implemented in HTML, LaTeX, or ConTeXt writers. No documentation yet. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1034 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-30Replaced individual wrapping routines in RST, Man, andfiddlosopher1-8/+2
Markdown writers with 'wrapped' from Text.Pandoc.Shared. git-svn-id: https://pandoc.googlecode.com/svn/trunk@967 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-15Major code cleanup in all modules. (Removed unneeded imports,fiddlosopher1-16/+10
reformatted, etc.) More major changes are documented below: + Removed Text.Pandoc.ParserCombinators and moved all its definitions to Text.Pandoc.Shared. + In Text.Pandoc.Shared: - Removed unneeded 'try' in blanklines. - Removed endsWith function and rewrote functions to use isSuffixOf instead. - Added >>~ combinator. - Rewrote stripTrailingNewlines, removeLeadingSpaces. + Moved Text.Pandoc.Entities -> Text.Pandoc.CharacterReferences. - Removed unneeded functions charToEntity, charToNumericalEntity. - Renamed functions using proper terminology (character references, not entities). decodeEntities -> decodeCharacterReferences, characterEntity -> characterReference. - Moved escapeStringToXML to Docbook writer, which is the only thing that uses it. - Removed old entity parser in HTML and Markdown readers; replaced with new charRef parser in Text.Pandoc.Shared. + Fixed accent bug in Text.Pandoc.Readers.LaTeX: \^{} now correctly parses as a '^' character. + Text.Pandoc.ASCIIMathML is no longer an exported module. git-svn-id: https://pandoc.googlecode.com/svn/trunk@835 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-08Major change in the way ordered lists are handled:fiddlosopher1-17/+16
+ The changes are documented in README, under Lists. + The OrderedList block element now stores information about list number style, list number delimiter, and starting number. + The readers parse this information, when possible. + The writers use this information to style ordered lists. + Test suites have been changed accordingly. Motivation: It's often useful to start lists with numbers other than 1, and to have control over the style of the list. Added to Text.Pandoc.Shared: + camelCaseToHyphenated + toRomanNumeral + anyOrderedListMarker + orderedListMarker + orderedListMarkers Added to Text.Pandoc.ParserCombinators: + charsInBalanced' + withHorizDisplacement + romanNumeral RST writer: + Force blank line before lists, so that sublists will be handled correctly. LaTeX reader: + Fixed bug in parsing of footnotes containing multiple paragraphs, introduced by use of charsInBalanced. Fix: use charsInBalanced' instead. LaTeX header: + use mathletters option in ucs package, so that basic unicode Greek letters will work properly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@834 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28Man page writer: modified treatment of autolinks,fiddlosopher1-1/+1
in accord with recent change from Str to Code. git-svn-id: https://pandoc.googlecode.com/svn/trunk@816 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22Man writer: Use ~ and ^ for subscripts and superscripts.fiddlosopher1-6/+9
git-svn-id: https://pandoc.googlecode.com/svn/trunk@770 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22Man writer:fiddlosopher1-2/+2
+ Make sure to include "" if no section is specified in a man page TH line. + Updated man writer tests. git-svn-id: https://pandoc.googlecode.com/svn/trunk@758 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22Changed text to char for one character stringsfiddlosopher1-4/+4
in RST, Man, and Docbook writers. git-svn-id: https://pandoc.googlecode.com/svn/trunk@757 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22+ Added support for superscript, subscript, andfiddlosopher1-15/+12
strikeout to all writers. (Thanks to Bradley Kuhn for the patches for strikeout, here slightly modified.) + Refactored character escaping using the new functions escapeStringUsing and backslashEscapes. + Added state to LaTeX writer, which now keeps track of what packages need to be included in the preamble, based on the content of the document. (Thus, e.g., ulem is only required if you use strikeout.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@755 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-21Changed system for indicating man page title, section,fiddlosopher1-8/+9
header and footer. Documented in README. git-svn-id: https://pandoc.googlecode.com/svn/trunk@745 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08Man writer: Don't print .\" t at beginning unless we'refiddlosopher1-1/+1
in --standalone mode. git-svn-id: https://pandoc.googlecode.com/svn/trunk@650 788f1e2b-df1e-0410-8736-df70ead52e1b