rmano / xkcdcolors Goto Github PK
View Code? Open in Web Editor NEWXKCD colors for LaTeX
XKCD colors for LaTeX
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
If you see carefully, clearly length A is greater than length B:
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:
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.)
Finally, you can remove fill=lightgray
in line 24.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.