Giter Club home page Giter Club logo

xkcdcolors's People

Contributors

rmano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

xkcdcolors's Issues

Text under the colored boxes in the manual not correctly centered

This can better be seen if in xkcdcolors-manual.tex you replace the line 24:

        \node[align=center, anchor=north west, text width=\ancho] at (0,0) {\strut\hspace{0pt}\relax #1};

by:

        \node[fill=lightgray, align=center, anchor=north west, text width=\ancho] at (0,0) {\strut\hspace{0pt}\relax #1};

(fill=lightgray is added in options of \node).

As you see below, the color names are centered in the light gray boxes, but the light gray boxes are larger than the colored boxes, so the color names are not centered under the colored boxes
image

If you see carefully, clearly length A is greater than length B:
image

This offset is due to the inner xsep, which is by default 0.3333em (in pgfmanual, section 17.2.3).

So I suggest using:

        \node[fill=lightgray, inner xsep=0pt, align=center, anchor=north west, text width=\ancho] at (0,0) {\strut\hspace{0pt}\relax #1};

in line 24, which give this result:
image

So centering is OK, but not spacing between colors. This can be corrected by replacing line 1012:

{\colorblock{\xkcdcol}\ }

by

{\colorblock{\xkcdcol}\hspace{0.6666em}\ }

(because left inner sep is 0.3333em and right inner sep is 0.3333em.)

So you obtain:
image

Finally, you can remove fill=lightgray in line 24.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.