aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Ms.hs
AgeCommit message (Collapse)AuthorFilesLines
2018-11-01Change 'groff' -> 'roff'.John MacFarlane1-4/+4
These formats (man, ms) are not groff-specific.
2018-10-26Rename Groff -> Roff.John MacFarlane1-1/+1
Module T.P.Readers.Groff -> T.P.Readers.Roff Module T.P.Writers.Groff -> T.P.Writers.Roff Module T.P.GroffChar -> T.P.RoffChar GroffTokens -> RoffTokens GroffToken -> RoffToken.
2018-10-24Ms writer - removed old escapeBar.John MacFarlane1-8/+2
We don't need this now that we use @ for delim.
2018-10-23Groff writer character escaping changes.John MacFarlane1-15/+15
T.P.GroffChar: replaced `essentialEscapes` with `manEscapes`, which includes all the escapes mentioned in the groff_man manual. T.P.Writers.Groff: removed escapeCode; changed parameter on escapeString from Bool to new type `EscapeMode`. Rewrote `escapeString`.
2018-10-22T.P.Writers.Groff - don't export escapeChar.John MacFarlane1-1/+1
2018-10-18Groff escaping changes.John MacFarlane1-24/+28
- `--ascii` is now turned on automatically for man output, for portability. All man output will be escaped to ASCII. - In T.P.Writers.Groff, `escapeChar`, `escapeString`, and `escapeCode` now take a boolean parameter that selects ascii-only output. This is used by the Ms writer for `--ascii`, instead of doing an extra pass after writing the document. - In ms output without `--ascii`, unicode is used whenever possible (e.g. for double quotes). - A few escapes are changed: e.g. `\[rs]` instead of `\\` for backslash, and `\ga]` instead of `` \` `` for backtick.
2018-10-17Move common groff functions to Text.Pandoc.Writers.GroffJohn MacFarlane1-85/+3
(unexported module). These are used in both the man and ms writers. Moved groffEscape out of Text.Pandoc.Writers.Shared [cancels earlier API change from adding it, which was after last release]. This fixes strong/code combination on man (should be `\f[CB]` not `\f[BC]`), mentioned in #4973. Updated tests. Closes #4975.
2018-10-02Removed Text.Pandoc.Groff.John MacFarlane1-1/+0
Moved groffEscape function to Text.Pandoc.Writers.Shared. [API change, since T.P.W.S is exported.]
2018-10-01Shared: new export `splitSentences` [API change].John MacFarlane1-26/+0
This was duplicated in the Man and Ms writers, and really belongs in Shared.
2018-09-30Implement `--ascii` (`writerPreferAscii`) in writers, not App.John MacFarlane1-1/+3
Now the `write*` functions for Docbook, HTML, ICML, JATS, Man, Ms, OPML are sensitive to `writerPreferAscii`. Previously the to-ascii translation was done in Text.Pandoc.App, and thus not available to those using the writer functions directly. In addition, the LaTeX writer is now sensitive to `writerPreferAscii` and to `--ascii`. 100% ASCII output can't be guaranteed, but the writer will use commands like `\"{a}` and `\l` whenever possible, to avoid emiting a non-ASCII character. A new unexported module, Text.Pandoc.Groff, has been added to store functions used in the different groff-based writers.
2018-09-04hlint some writersAlexander Krotov1-1/+1
2018-04-15Ms writer: font improvements.John MacFarlane1-3/+14
* Use `\f[R]` rather than `\f[]` to reset. The latter returns to the previous font, which gives unintended results in some cases. * Use `\f[BI]` and `\f[CB]` in headers, instead of `\f[I]` and `\f[C]`, since the header font is automatically bold. * Use `\f[CB]` rather than `\f[BC]` for monospace bold. Closes #4552.
2018-04-14Ms writer link improvements.John MacFarlane1-5/+13
+ Create pdf anchor for a Div with an identifier. + Escape `/` character in anchor ids. + Improve escaping for anchor ids: we now use _uNNN_ instead of uNNN to avoid ambiguity. This is intended to help with #4515; however, in my tests, the link to the reference does not seem to work. I'm not sure why.
2018-04-14Man writer: Don't escape U+2019 as '.John MacFarlane1-1/+0
Closes #4550.
2018-03-18Ms writer: don't escape hyphens.John MacFarlane1-1/+0
Previously we escaped hyphens as `\-`, but that's a minus sign. Closes #4467. Updated changelog.
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-03-09Ms writer: asciify pdf anchors, since unicode anchors don't work.John MacFarlane1-4/+11
Closes #4436. Internal links should be converted automatically, so this shouldn't affect users directly.
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-2/+2
2017-12-10Changes for skylighting-0.5.John MacFarlane1-2/+2
This fixes a bug in 2.0.4, whereby pandoc could not read the theme files generated with `--print-highlight-style`. It also fixes some CSS issues involving line numbers. Highlighted code blocks are now enclosed in a div with class sourceCode. Highlighting CSS no longer sets a generic color for pre and code; we only set these for class `sourceCode`. This will close #4133 and #4128.
2017-10-29Source code reformatting.John MacFarlane1-3/+3
2017-10-29hlint suggestions.John MacFarlane1-23/+20
2017-10-27Automatic reformating by stylish-haskell.John MacFarlane1-25/+25
2017-06-20Writers: adjusted for renderTemplate' changes.John MacFarlane1-2/+3
Now we raise a proper error on template failure.
2017-06-17Use Control.Monad.State.Strict throughout.John MacFarlane1-1/+1
This gives 20-30% speedup and reduction of memory usage in most of the writers.
2017-06-11Switched Writer types to use Text.John MacFarlane1-5/+7
* XML.toEntities: changed type to Text -> Text. * Shared.tabFilter -- fixed so it strips out CRs as before. * Modified writers to take Text. * Updated tests, benchmarks, trypandoc. [API change] Closes #3731.
2017-05-13Update dates in copyright noticesAlbert Krewinkel1-2/+2
This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
2017-04-28Ms writer: make use of already defined render' (#3613)Alexander Krotov1-2/+2
2017-04-06Ms writer: wider indents for lists.John MacFarlane1-5/+6
Previously some indents weren't wide enough, leading the list item to start on a line after the marker.
2017-04-05Ms writer: respect text wrapping options.John MacFarlane1-1/+6
2017-04-04Ms writer improvements:John MacFarlane1-4/+3
- added some variables to the default template. - cleaner output for images (stringify alt text).
2017-04-04Ms writer: ensure that @ is escaped in URIs.John MacFarlane1-1/+5
Otherwise we may get unescaped @s that give eqn fits, with @ as the delimiter character.
2017-04-01Ms writer: added syntax highlighting.John MacFarlane1-5/+84
Closes #3547. Macro definitions are inserted in the template when there is highlighted code. Limitations: background colors and underline currently not supported.
2017-03-26Ms writer: update TODO comments.John MacFarlane1-3/+0
2017-03-26Ms writer: Hyperlink table of contents and other improvements.John MacFarlane1-9/+21
2017-03-26Ms writer: Add PDF outline bookmarks.John MacFarlane1-0/+3
2017-03-26Ms writer: Use @ instead of | for inline math delimiter.John MacFarlane1-3/+3
The `|` delimiter had a bad interaction with tbl. See discussion in #1839.
2017-03-26Ms writre: Added some escapes.John MacFarlane1-2/+4
2017-03-26Removed unused imports.John MacFarlane1-3/+3
2017-03-26Ms writer: Support external links.John MacFarlane1-21/+7
Also add config options for link color.
2017-03-26Ms writer: better placement of header anchors.John MacFarlane1-9/+5
2017-03-26Ms writer: more spacing fixes for internal links.John MacFarlane1-4/+9
2017-03-26Ms writer: improved internal links.John MacFarlane1-2/+3
2017-03-25Ms writer: added TODO comment.John MacFarlane1-0/+3
2017-03-25Ms writer: Implement header identifiers and internal links.John MacFarlane1-9/+27
2017-03-25Ms writer: revise TODO comments.John MacFarlane1-16/+0
2017-03-25Ms writer: use light gray for strikeout.John MacFarlane1-1/+3
Pending groff definitions for striking out an arbitrary section of text (not just a few words).
2017-03-25Ms writer: improved pdf metadata.John MacFarlane1-0/+4
2017-03-25Ms. writer: links: use footnote only for absolute URIs.John MacFarlane1-1/+3
2017-03-25Ms writer: Got figures with ps and eps images working.John MacFarlane1-5/+23
2017-03-24Ms writer: Use indented paragraphs after first in section.John MacFarlane1-11/+37
Note that the current indentation setting is 0; see the settings in the template.