From fa390dc3115bdaaa3ad54eb7118105f01ac8c899 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 28 Jul 2020 07:14:24 +0200 Subject: [PATCH] doc: fix colors The original Texinfo macros introducing colors were made for diagnostics, which are printed in bold. So by copy-paste accident the styles we introduced for counterexamples were also in bold. They should not. * doc/bison.texi: Separate the styling of diagnostics from the styling for counterexamples. Don't use bold in the latter case. --- doc/bison.texi | 49 +++++++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/doc/bison.texi b/doc/bison.texi index 1953e9e0..b3222f93 100644 --- a/doc/bison.texi +++ b/doc/bison.texi @@ -57,44 +57,57 @@ \gdef\colorPurple{% \setcolor{\rgbPurple}% } +\gdef\colorOff{% + \setcolor{\maincolor}% +} \gdef\rgbError{0.80 0 0} -\gdef\colorError{% +\gdef\diagError{% \setcolor{\rgbError}% } \gdef\rgbNotice{0 0 0.80} -\gdef\colorNotice{% +\gdef\diagNotice{% \setcolor{\rgbNotice}% } -\gdef\colorOff{% +\gdef\rgbWarning{0.50 0 0.50} +\gdef\diagWarning{% + \setcolor{\rgbWarning}% +} +\gdef\diagOff{% \setcolor{\maincolor}% } @end tex @ifnottex @macro colorGreen -@inlineraw{html, } +@inlineraw{html, } @end macro @macro colorYellow -@inlineraw{html, } +@inlineraw{html, } @end macro @macro colorRed -@inlineraw{html, } +@inlineraw{html, } @end macro @macro colorBlue -@inlineraw{html, } +@inlineraw{html, } @end macro @macro colorPurple -@inlineraw{html, } -@end macro - -@macro colorError -@inlineraw{html, } -@end macro -@macro colorNotice -@inlineraw{html, } +@inlineraw{html, } @end macro @macro colorOff +@inlineraw{html, } +@end macro + +@macro diagError +@inlineraw{html, } +@end macro +@macro diagNotice +@inlineraw{html, } +@end macro +@macro diagWarning +@inlineraw{html, } +@end macro +@macro diagOff @inlineraw{html, } @end macro @end ifnottex @@ -120,15 +133,15 @@ @end macro @macro dwarning{text} -@purple{\text\} +@diagWarning{}\text\@diagOff{} @end macro @macro derror{text} -@colorError{}\text\@colorOff{} +@diagError{}\text\@diagOff{} @end macro @macro dnotice{text} -@colorNotice{}\text\@colorOff{} +@diagNotice{}\text\@diagOff{} @end macro @finalout