aboutsummaryrefslogtreecommitdiff
path: root/test/command/ascii.md
AgeCommit message (Collapse)Author
2025-03-23Use the most compatible form for roff escapes.John MacFarlane
This affects T.P.RoffChar, T.P.Writers.Roff, and the Man and Ms writers. That is, `\(xy` instead of `\[xy]`. This was the original AT&T troff form and is the most widely supported. The bracketed form causes problem for some tools, e.g. `makewhatis` on macOS. Closes #10716.
2021-09-21Add missing `%` on command tests.John MacFarlane
This prevented `--accept` from working properly.
2019-09-03XML: change toEntities to emit numerical hex character references.John MacFarlane
Previously decimal references were used. But Polyglot Markup prefers hex. See #5718. This affects the output of pandoc with `--ascii`.
2019-09-02HTML writer: use numeric character references with `--ascii`.John MacFarlane
Previously we used named character references with html5 output. But these aren't valid XML, and we aim to produce html5 that is also valid XHTML (polyglot markup). (This is also needed for epub3.) Closes #5718.
2019-02-01LaTeX writer: avoid `{}` after control sequences when escaping.John MacFarlane
`\ldots{}.` doesn't behave as well as `\ldots.` with the latex ellipsis package. This patch causes pandoc to avoid emitting the `{}` when it is not necessary. Now `\ldots` and other control sequences used in escaping will be followed by either a `{}`, a space, or nothing, depending on context. Thanks to Elliott Slaughter for the suggestion.
2018-11-05CommonMark writer: respect --ascii (#5043)quasicomputational
2018-11-04XML: toHtml5Entities: prefer shorter entities...John MacFarlane
when there are several choices for a particular character.
2018-11-01Implement --ascii for Markdown writer.John MacFarlane
2018-11-01HTML writer: use character entities references when possible for HTML5.John MacFarlane
2018-10-18Groff escaping changes.John MacFarlane
- `--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-09-30Implement `--ascii` (`writerPreferAscii`) in writers, not App.John MacFarlane
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.