[PATCH 2/4] doc: fix colors

Akim Demaille <[email protected]>
Newsgroups gmane.comp.parsers.bison.patches
Message-ID <[email protected]>
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 | 41 +++++++++++++++++++++++++++--------------
 1 file changed, 27 insertions(+), 14 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, <b style="color:green">}
+@inlineraw{html, <span style="color:green">}
 @end macro
 @macro colorYellow
-@inlineraw{html, <b style="color:#ff8000">}
+@inlineraw{html, <span style="color:#ff8000">}
 @end macro
 @macro colorRed
-@inlineraw{html, <b style="color:red">}
+@inlineraw{html, <span style="color:red">}
 @end macro
 @macro colorBlue
-@inlineraw{html, <b style="color:blue">}
+@inlineraw{html, <span style="color:blue">}
 @end macro
 @macro colorPurple
-@inlineraw{html, <b style="color:darkviolet">}
+@inlineraw{html, <span style="color:darkviolet">}
+@end macro
+@macro colorOff
+@inlineraw{html, </span>}
 @end macro
 
-@macro colorError
+@macro diagError
 @inlineraw{html, <b style="color:red">}
 @end macro
-@macro colorNotice
+@macro diagNotice
 @inlineraw{html, <b style="color:darkcyan">}
 @end macro
-@macro colorOff
+@macro diagWarning
+@inlineraw{html, <b style="color:darkviolet">}
+@end macro
+@macro diagOff
 @inlineraw{html, </b>}
 @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
-- 
2.27.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.