summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/metapost/mpcolornames/tab-clash-svg-dvips.awk
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-07-27 23:15:42 +0000
committerKarl Berry <karl@freefriends.org>2011-07-27 23:15:42 +0000
commit62263d6664dd3ca8d42bcfc6445e2c189154745b (patch)
tree5d8c5f33a619380e316ca222a26e1807be042e57 /Master/texmf-dist/source/metapost/mpcolornames/tab-clash-svg-dvips.awk
parenta5f505fa400aa240740da0daee3c527b2e63934c (diff)
new metapost package mpcolornames (27jul11)
git-svn-id: svn://tug.org/texlive/trunk@23252 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/metapost/mpcolornames/tab-clash-svg-dvips.awk')
-rw-r--r--Master/texmf-dist/source/metapost/mpcolornames/tab-clash-svg-dvips.awk40
1 files changed, 40 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/metapost/mpcolornames/tab-clash-svg-dvips.awk b/Master/texmf-dist/source/metapost/mpcolornames/tab-clash-svg-dvips.awk
new file mode 100644
index 00000000000..0fd63a95f8a
--- /dev/null
+++ b/Master/texmf-dist/source/metapost/mpcolornames/tab-clash-svg-dvips.awk
@@ -0,0 +1,40 @@
+### file tab-clash-svg-dvips.awk
+### Copyright 2009, 2011 Stephan Hennig
+#
+# This work may be distributed and/or modified under the conditions of
+# the LaTeX Project Public License, either version 1.3 of this license
+# or (at your option) any later version. The latest version of this
+# license is in http://www.latex-project.org/lppl.txt
+#
+BEGIN {
+ FS = ":=|(|)|,"
+}
+/^[^:]+:=[(]*[0-9.,]+[)]*);$/ {
+ name = $1
+ color[$1] = color[$1] + 1
+# print name
+}
+END {
+# Build file tab-clash-dvips-svg.tex.
+ file = "tab-clash-svg-dvips.tex"
+ print "%%% file " file > file
+ print "\\vspace{\\floatsep}" >> file
+ print "\\begin{multicols}{4}[\\noindent\\parbox{\\textwidth}{%" >> file
+ print " \\captionof{table}{Color names clashing in SVG (left) and DVIPS (right) specifications.}%" >> file
+ print " \\label{tab:clash-svg-dvips}%" >> file
+ print " }]" >> file
+ print " \\raggedcolumns" >> file
+ print " \\setlength{\\parindent}{0pt}" >> file
+ print " \\ttfamily\\small\\color{mpcolor}" >> file
+ ncolors = asorti(color, sortcolor)# requires gawk
+ n = 0
+ for (i = 1; i <= ncolors; i++) {
+ name = sortcolor[i]
+ if (color[name] > 1) {
+ n++
+ print "\\colorproof{" name "}\\par" >> file
+ }
+ }
+ print "\\end{multicols}" >> file
+ print "Found " n " color names clashing in SVG and DVIPS specs."
+}