diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2019-05-09 19:08:07 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2019-05-09 19:21:02 +0200 |
commit | ab3eaff7c40d6de0ca75a92f51225107ca7768ae (patch) | |
tree | 642b757766d6f39765eea1f0b86bdc01243caf85 /doc/bison.texi | |
parent | 85e83ea9687818cb4786d3e05b4419d68b792528 (diff) | |
download | bison-ab3eaff7c40d6de0ca75a92f51225107ca7768ae.tar.gz |
doc: use colors for diagnostics in TeX too
Thanks to Gavin Smith and Patrice Dumas.
http://lists.gnu.org/archive/html/help-texinfo/2019-04/msg00015.html
* doc/bison.texi (@colorWarning, @colorError, @colorNotice)
(@colorOff): Define for TeX and HTML.
(@dwarning, @derror, @dnotice): Use them.
Diffstat (limited to 'doc/bison.texi')
-rw-r--r-- | doc/bison.texi | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/doc/bison.texi b/doc/bison.texi index a6cd29a1..821a5b4c 100644 --- a/doc/bison.texi +++ b/doc/bison.texi @@ -7,16 +7,49 @@ @settitle Bison @value{VERSION} @setchapternewpage odd +@tex +\gdef\rgbWarning{0.50 0 0.50} +\gdef\colorWarning{% + \setcolor{\rgbWarning}% +} +\gdef\rgbError{0.80 0 0} +\gdef\colorError{% + \setcolor{\rgbError}% +} +\gdef\rgbNotice{0 0 0.80} +\gdef\colorNotice{% + \setcolor{\rgbNotice}% +} +\gdef\colorOff{% + \setcolor{\maincolor}% +} +@end tex + +@ifnottex +@macro colorWarning +@inlineraw{html, <b style="color:darkviolet">} +@end macro +@macro colorError +@inlineraw{html, <b style="color:red">} +@end macro +@macro colorNotice +@inlineraw{html, <b style="color:darkcyan">} +@end macro +@macro colorOff +@inlineraw{html, </b>} +@end macro +@end ifnottex + @macro dwarning{text} -@inlineraw{html, <b style="color:darkviolet">} \text\ @inlineraw{html, </b>} +@colorWarning{}\text\@colorOff{} @end macro @macro derror{text} -@inlineraw{html, <b style="color:red">} \text\ @inlineraw{html, </b>} +@colorError{}\text\@colorOff{} @end macro @macro dnotice{text} -@inlineraw{html, <b style="color:darkcyan">} \text\ @inlineraw{html, </b>} +@colorNotice{}\text\@colorOff{} @end macro @finalout |