See paper.png to see what this looks like!
Writes a file to a paper in your terminal. Especially if that file is Markdown! Features supported include:
The usual text, and paragraphs with automatic line-wrapping. You can manually wrap with
hard breaks as expected.
Otherwise, paragraphs will be nicely spaced.
Inline code
rust
fn main() {
println!("Hello world");
}
Blockquotes
Blockquotes
And even nested block quotes
And even images! Here's a photo of my cat
Task lists:
Footnotes[^ft]
[^ft]: This is the footnote!
Tables
Not a very good comparison... this is more of an example of a table!
| Tool | CommonMark | Paper | Paging | Wrapping | Syntax | Images | Tables | Looks good* | | :------------------- | :--------- | :---- | :----- | :------- | :--------- | :-------- | :----- | :----------- | | oinkiguana/paper | Yes | Yes | No | Yes | syncat | Pixelated | Yes | Yes | | ttscoff/mdless | Yes | No | Yes | No | pygmentize | Sometimes | Yes | No | | lunaryorn/mdcat | Yes | No | No | No | syntect | Sometimes | No | No |
* subjective
Paper uses syncat stylesheets to allow full customization of styling. See the default stylesheet (src/default.syncat
)
as an example of how this works. To override the default styles, create paper.syncat
in your active syncat theme.
Different scopes are represented as nodes, inspired by the corresponding HTML tag names.
h1
through h6
strong
emphasis
strikethrough
code
blockquote
ul
, ol
, li
footnote-ref
, footnote-def
, footnote
table
caption
link
The paper and shadow can be matched with paper
and shadow
. Styles applied to paper
are applied to everything.
"prefix"
and "suffix"
tokens can be used to match the decorations
"lang-tag"
token matches the language name written in the bottom corner of the code blockFor now, the prefix/suffix contents are not customizable, but this may be added in future if it is desired.
Paper can be installed from crates.io using Cargo:
bash
cargo install paper-terminal
```bash
paper --help
paper README.md
paper README.md -s ```
```
paper 0.1.0
Cameron Eldridge
USAGE: paper [FLAGS] [OPTIONS] [file]...
FLAGS: --dev Print in debug mode --help Prints help information -u, --hide-urls Hide link URLs -i, --no-images Disable drawing images -p, --plain Don't parse as Markdown, just render the plain text on a paper -s, --syncat Use syncat to highlight code blocks. Requires you have syncat installed. -V, --version Prints version information
OPTIONS:
-h, --h-margin
ARGS: