[Debian-handbook-translators] review request of selectable color scheme (gray-scale/full-color) for lulu.com POD

AYANOKOUZI, Ryuunosuke i38w7i3 at yahoo.co.jp
Thu Mar 3 20:36:36 UTC 2016


Dear Raphael,

At Wed, 02 Mar 2016 22:28:22 +0900,
AYANOKOUZI, Ryuunosuke wrote:
>
> At Wed, 2 Mar 2016 12:59:09 +0100,
> Raphael Hertzog wrote:
> >
> > On Sun, 28 Feb 2016, AYANOKOUZI, Ryuunosuke wrote:
> > > I would like to push a commit of adding a feature for selectable color
> > > scheme[1].  The purpose of this is generating suitable (gray-scale) PDF
> > > for lulu.com POD service.
> > > Since I'm satisfied with gray-scale conversion by lulu.com,
> > > automatic conversion of images are not considered.
> > > You can pass the pdf.color.scheme variable from command line [2],
> > > and colored parts such as URLs, mail-addresses, and clickable-linked words turn to be black.
> > >
> > > I would appreciate it if you review, modify and commit/push it as needed.
> >
> > I have a problem with this patch. It doesn't only change the color of
> > links, it changes the color of any text. Even text that was changed to
> > grey on purpose.
> >
> > If you look in the book when you have a page reference, the "page XX"
> > strings are in grey. With your patch they are in black.
>
> That is an intended effect.
> Because gray text on shaded part (such as sidebar) is even more bad for read for me
> compared to gray text on white background.
>
> See following sidebars
> * COMMUNITY For or against the non-free section?
> * VOCABULARY Sub-project and derivative distribution
> * BACK TO BASICS A catch-up course in the appendices
>
> You can search for examples by following command.
> $ xmlstarlet sel -t -c '//xref/parent::para/parent::sidebar' en-US/01_the-debian-project.xml
>
> Do you think such "page XX" string should also be kept in gray?

My approach was globally setting font color black,
but sometime this approach has side effects which cannot be ignored.
Such as...
* it turns text color black on black background
  (circled numbers, character on colored circle)
  (Ex: Section "Changes to smb.conf")
  $ xmlstarlet sel -t -c '//co/parent::*' en-US/*.xml | less
* prepositional arrow of URLs is still gray.

So, I revised my patch by following approach.

1. Setting "hidelinks" option of hyperref.sty.
   It removes color and border feature (clickable link feature is not removed).
2. Setting selectcolormodel "gray" by xcolor.sty.
   It simulate output from black & while printer.
3. Overriding color definition of "textgray" by xcolor.sty
   "textgray" text turn to be "black" text.

The text color of "page XX" string is changed to black by 3rd approach.
I think it is reasonable for black & white printer
especially "page XX" string on gray background.

This patch is available on my github account [1].
I'll be waiting for your comments.

[1] https://github.com/l/debian-handbook/commit/199e12f0e34fc6362974f557716db1ec30bc480e

Sincerely yours,
Ryuunosuke Ayanokouzi
--
AYANOKOUZI, Ryuunosuke <i38w7i3 at yahoo.co.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/debian-handbook-translators/attachments/20160304/d60ee3cb/attachment.sig>


More information about the Debian-handbook-translators mailing list