[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-texinfo] html: playing with the style
From: |
Akim Demaille |
Subject: |
Re: [help-texinfo] html: playing with the style |
Date: |
Thu, 9 May 2019 19:22:27 +0200 |
Hi Gavin,
Sorry for the delays...
> Le 29 avr. 2019 à 18:31, Gavin Smith <address@hidden> a écrit :
>
> On Sun, Apr 28, 2019 at 06:42:05PM +0200, Akim Demaille wrote:
>> Actually it works so well that now I wish I could also use
>> colors in PDF. I have played with \pdfsetcolor, tweaked
>> with whatever seemed relevant in texinfo.tex, but to no
>> avail. The Internet offers nothing interesting on "Texinfo
>> PDF colors" (except for URLs).
>
>> Even something copied straight from texinfo.tex does not work:
>>
>> @macro dwarning{text}
>> @inlinefmtifelse{tex, @inlineraw{tex, {\setcolor{\linkcolor}}} \text\
>> @inlineraw{tex, {\endlink}}, \text\}
>> @end macro
>
> This may not work as \linkcolor is black by default.
What I meant is that it does not compile at all. I knew it was
black by default, but first have the syntax right :)
Reading your code, I realize it should have been
@macro dwarning{text}
@inlineraw{tex, address@hidden@linkcolor}}} \text\ @inlineraw{tex,
address@hidden@maincolor}}}
@end macro
> The following works to put text surrounded by @colorOn{} and @colorOff{}
> in a purple colour:
>
> [...]
> The colour is set in texinfo.tex with \pdfliteral and the "rg" and "RG"
> commands for PDF. These take RGB values with each component being a
> number between 0 and 1.
Thanks a lot for the hint! I'll install the following in Bison.
Cheers!
commit ab3eaff7c40d6de0ca75a92f51225107ca7768ae
Author: Akim Demaille <address@hidden>
Date: Thu May 9 19:08:07 2019 +0200
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.
diff --git a/THANKS b/THANKS
index 53a357ae..b14ee695 100644
--- a/THANKS
+++ b/THANKS
@@ -66,6 +66,7 @@ Frank Heckenbach address@hidden
Frans Englich address@hidden
Gabriel Rassoul address@hidden
Gary L Peskin address@hidden
+Gavin Smith address@hidden
Georg Sauthoff address@hidden
George Neuner address@hidden
Gilles Espinasse address@hidden
@@ -128,6 +129,7 @@ Oliver Mangold address@hidden
Paolo Bonzini address@hidden
Paolo Simone Gasparello address@hidden
Pascal Bart address@hidden
+Patrice Dumas address@hidden
Paul Eggert address@hidden
Paul Hilfinger address@hidden
Per Allansson address@hidden
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
address@hidden
+\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}%
+}
address@hidden tex
+
address@hidden
address@hidden colorWarning
address@hidden, <b style="color:darkviolet">}
address@hidden macro
address@hidden colorError
address@hidden, <b style="color:red">}
address@hidden macro
address@hidden colorNotice
address@hidden, <b style="color:darkcyan">}
address@hidden macro
address@hidden colorOff
address@hidden, </b>}
address@hidden macro
address@hidden ifnottex
+
@macro dwarning{text}
address@hidden, <b style="color:darkviolet">} \text\ @inlineraw{html, </b>}
address@hidden@colorOff{}
@end macro
@macro derror{text}
address@hidden, <b style="color:red">} \text\ @inlineraw{html, </b>}
address@hidden@colorOff{}
@end macro
@macro dnotice{text}
address@hidden, <b style="color:darkcyan">} \text\ @inlineraw{html, </b>}
address@hidden@colorOff{}
@end macro
@finalout
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [help-texinfo] html: playing with the style,
Akim Demaille <=