#5860 closed Feature Requests (fixed)
Coloring text in Quickbook
Reported by: | Paul A. Bristow | Owned by: | Daniel James |
---|---|---|---|
Milestone: | To Be Determined | Component: | quickbook |
Version: | Boost Development Trunk | Severity: | Cosmetic |
Keywords: | Quickbook color | Cc: |
Description
It would be rather nice to be able to color specified text items (like [*bold]) when writing layout in Quickbook. Perhaps some syntax like
where ? is some squiggle, and the color names are in the list of HTML colors.
where ? is some squiggle, and the hex values is the RGB color.
(But though I can't really see a real need for the full gamut of colors, hex format RGB might be simpler to implement?)
Change History (11)
follow-up: 2 comment:1 by , 11 years ago
comment:2 by , 11 years ago
Replying to danieljames:
Docbook has no support for colours, see:
http://cygwin.com/ml/docbook/2005-05/msg00040.html
A possiblity is to have a tag to allow text to be marked up with a role (as we do for syntax highlighting). That can be coloured for web pages in css, but you'd have to work out how to colour that for pdfs, which appears to be done in
tools/boostbook/xsl/fo.xsl
. I'd prefer to have semantic roles rather than presentational. Any additions to the roles supported in that file should probably be mentioned on the list first.
I'd image many users would be quite happy with a small set (9?)of 'color highlighting' sematic roles? Even just one (red?) could be useful.
Perhaps something like the six (five) [h1 headings]? Or color admonitions?
Or is injection of XML to set color for a text item possible?
But I have too little understanding of how things are processed to make sensible suggestions.
?
isn't available as it's already used for conditional phrases. I wouldn't want to use up an punctuation for this. There are only so many characters available, I don't want to waste them.
Of course, sadly, squiggles are in critically short supply, so I only put ? as a marker for any one chosen.
follow-up: 4 comment:3 by , 11 years ago
Owner: | changed from | to
---|
I don't own quickbook. Daniel, if you're not the owner, do you know who is?
comment:4 by , 11 years ago
Status: | new → assigned |
---|
Replying to eric_niebler:
I don't own quickbook. Daniel, if you're not the owner, do you know who is?
It's Joel in trac, but it probably should be me. I don't know why this was assigned to you.
comment:5 by , 11 years ago
(In [75255]) Quickbook: role
tag for 1.6. Refs #5860.
This implements the markup [role red Some red text]
. Although I'm not
sure I like it that much. It would be pretty easy to use a template for
the same effect.
This is just the quickbook part of supporting coloured text, to complete the ticket there needs to be css support for html pages and xsl support for pdfs.
comment:6 by , 11 years ago
I've rebuilt using Quickbook in trunk (after 75255) changed the header to 1.6 and tried
[role red Some red text]
but it seems to be passed straight thru to the docbook and html as
<p>
[role red Some red text]
</p>
What am I missing? (apart from changes to .css to use this to redden)
comment:8 by , 11 years ago
OK - but I get a compile error in id_manager.cpp
Perhaps you are still working on this and I'm jumping the gun?
Not urgent, but red would be sexy ;-)
Wait until you put into trunk?
comment:9 by , 11 years ago
Maybe a bit longer. I'm going to try to get the 1.6 stuff finished within the next release cycle, and ask for feedback. If it's positive, then I'll make 1.6 final and it'll be fine to use. Alternatively I could move the more controversial features to a later version number, so that some of the simpler things are ready earlier.
comment:10 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
1.6 is finally being released in 1.55. So this will be fixed then.
comment:11 by , 9 years ago
Added to boostbook.css to enable both color and align roles for html.
Revision: 86229 Author: pbristow Date: 10 October 2013 16:40:07 Message: Additions to implement colors from Quickbook 1.6.
But align feature (done in boostbook.css for html) is still not implemented.
Modified : /trunk/tools/boostbook/xsl/fo.xsl
for color feature for pdf (not done the align feature yet).
This file provides some helpful defs and templates for tick, cross etc
https://svn.boost.org/svn/boost/sandbox/guild/mylibrary/libs/mylibrary/doc/html4_symbols.qbk
and some very contrived demos at
https://svn.boost.org/svn/boost/sandbox/guild/mylibrary/libs/mylibrary/doc/mylibrary.qbk
For example...
[role red Some red text]
[*[role magenta [role aligncenter This is bold magenta and centered.]]]
['[*[role blue Some italic bold blue text]]]
Docbook has no support for colours, see:
http://cygwin.com/ml/docbook/2005-05/msg00040.html
A possiblity is to have a tag to allow text to be marked up with a role (as we do for syntax highlighting). That can be coloured for web pages in css, but you'd have to work out how to colour that for pdfs, which appears to be done in
tools/boostbook/xsl/fo.xsl
. I'd prefer to have semantic roles rather than presentational. Any additions to the roles supported in that file should probably be mentioned on the list first.?
isn't available as it's already used for conditional phrases. I wouldn't want to use up an punctuation for this. There are only so many characters available, I don't want to waste them.