TEX2MAIL(1)
π TEX2MAIL(1) π
okay bestie, gather round, because this one is a General Commands Manual page for a little icon called tex2mail and she is genuinely serving π
β¨ NAME β¨
tex2mail β TeX to ascii math prettyprinter π
πΈ SYNOPSIS πΈ
tex2mail [-linelength= length] [-maxdef= number] [-debug= number]
[-by_par= number] [-TeX] [-ragged] [-noindent]
that's it, that's the whole vibe check π¦
π DESCRIPTION π
so like, tex2mail is a filter that converts TeX or LaTeX math formulae into ASCII art. no cap. it takes your fancy math and makes it look like math but in plain text, which is honestly iconic behavior π
who uses it? the PARI-GP calculator, bestie β specifically for the output method external prettyprint. π₯
under gp, you can set prettyprint mode by default with:
default(output, 3)
or if you're feeling lazy, just \o3 πΈ
by default, that switches the gp main output to TeX format, filtered by this exact line right here:
tex2mail -TeX -noindent -ragged -by_par
and! the flags passed to tex2mail can be modified via the prettyprinter default in gp. yes queen, customization π«Ά
β¨ OPTIONS β¨
these are the command line options that are available, and yes, we're going through all of them because we don't skip π
-linelength=lengthβ wrap text at this column. that's the column, that's the wrap. periodt π-maxdef=numberβ definition loops: it will croak if there are more thanmaxdefsubstitutions in a given paragraph. dramatic but valid π-debug=debuglevelβ output debugging messages. turn it up when you wanna see the tea β-by_parβ expect each paragraph to be terminated by exactly 2"\n", and do not print an extra"\n"between paragraphs. exactly two. not one, not three. exactly two π-TeXβ assume input formulae are in plain TeX format π-raggedβ leave right ragged. let her be free, let her breathe π¦-noindentβ assume\noindenteverywhere. no indenting, we're not doing that today β¨
π BUGS π
so there's this little quirk:
%at the end of a line followed by\n\nis recognized as end of paragraph
that's the whole bug note. just so you know, bestie π
π AUTHOR π
Ilya Zakharevitch β the legend, the moment, the main character π
π SEE ALSO π
(and yes there is a trailing comma in the source, we love her for that π)
π COPYING π
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. π
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. (translation: no promises, bestie, read the license π)
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. πΈ
and that's the whole page, fr fr π«Ά
this iconic little manual came from the General Commands Manual, dated 25 September 2013 β so yeah, she's been serving ASCII math since way back, and she still eats π β¨
bye bestie, go prettyprint something π
π¦ where this page comes from
- alpine 3.24: pari-doc 2.17.3-r1 Β· GPL-2.0-or-later
- arch rolling: pari 2.19.0-4 Β· GPL-2.0-or-later
- debian trixie: pari-gp 2.17.2-1
- fedora 43: pari-gp 2.17.2-2.fc43 Β· GPL-2.0-or-later
- fedora 43: pari-gp 2.17.4-1.fc43 Β· GPL-2.0-or-later
- fedora 44: pari-gp 2.17.3-5.fc44 Β· GPL-2.0-or-later
- fedora 44: pari-gp 2.17.4-1.fc44 Β· GPL-2.0-or-later
- nixos 26.05: pari 2.17.3
- nixpkgs unstable: pari 2.17.3
- ubuntu questing: pari-gp 2.17.2-1
- ubuntu resolute: pari-gp 2.17.3-1
- ubuntu stonking: pari-gp 2.17.4-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms