summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/xelatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-03-18 22:19:10 +0000
committerKarl Berry <karl@freefriends.org>2015-03-18 22:19:10 +0000
commit19dcc636657c83f928c71c3ad6cdc1c2dedb265f (patch)
tree6de2d817472d83763c77ced1449f6bc0510d1604 /Master/texmf-dist/doc/xelatex
parent3f21ad1106c152aa75655ef3ff6c9079047cef55 (diff)
xespotcolor (18mar15)
git-svn-id: svn://tug.org/texlive/trunk@36555 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/xelatex')
-rw-r--r--Master/texmf-dist/doc/xelatex/xespotcolor/PATCHES238
-rw-r--r--Master/texmf-dist/doc/xelatex/xespotcolor/README21
-rw-r--r--Master/texmf-dist/doc/xelatex/xespotcolor/spotcolor-test.pdfbin481663 -> 70346 bytes
-rw-r--r--Master/texmf-dist/doc/xelatex/xespotcolor/xespotcolor.pdfbin60607 -> 61014 bytes
4 files changed, 5 insertions, 254 deletions
diff --git a/Master/texmf-dist/doc/xelatex/xespotcolor/PATCHES b/Master/texmf-dist/doc/xelatex/xespotcolor/PATCHES
deleted file mode 100644
index ce25525c7ef..00000000000
--- a/Master/texmf-dist/doc/xelatex/xespotcolor/PATCHES
+++ /dev/null
@@ -1,238 +0,0 @@
---- pdfcolor.c.orig 2014-07-30 22:27:05.423428483 +0300
-+++ pdfcolor.c 2014-08-13 22:59:53.862311266 +0300
-@@ -27,6 +27,7 @@
- #include <config.h>
- #endif
-
-+#include <strings.h>
- #include "system.h"
- #include "mem.h"
- #include "error.h"
-@@ -79,6 +80,8 @@
-
- color->num_components = 3;
-
-+ bzero(color->SpotColorName, 256);
-+
- return 0;
- }
-
-@@ -112,6 +115,7 @@
-
- color->num_components = 4;
-
-+ bzero(color->SpotColorName, 256);
- return 0;
- }
-
-@@ -129,6 +133,27 @@
-
- color->num_components = 1;
-
-+ bzero(color->SpotColorName, 256);
-+
-+ return 0;
-+}
-+
-+int
-+pdf_color_spotcolor (pdf_color *color, char* spot_color_name, double c)
-+{
-+ ASSERT(color);
-+
-+ if (c < 0.0 || c > 1.0) {
-+ WARN("Invalid color value specified: grade=%g", c);
-+ return -1;
-+ }
-+
-+ color->values[0] = c;
-+
-+ color->num_components = 2;
-+
-+ strcpy(color->SpotColorName, spot_color_name);
-+
- return 0;
- }
-
-@@ -190,24 +215,35 @@
- return 1;
- }
-
--int
--pdf_color_to_string (const pdf_color *color, char *buffer)
-+int
-+pdf_color_to_string (const pdf_color *color, char *buffer, char mask)
- {
- int i, len = 0;
-
-- for (i = 0; i < color->num_components; i++) {
-- len += sprintf(buffer+len, " %g", ROUND(color->values[i], 0.001));
-+ if ( (-color->num_components) == PDF_COLORSPACE_TYPE_SPOT ) {
-+ if (mask == '0') {
-+ len += sprintf(buffer+len, " /%s CS %g SC", color->SpotColorName, ROUND(color->values[0], 0.001));
-+ }
-+ else {
-+ len += sprintf(buffer+len, " /%s cs %g sc", color->SpotColorName, ROUND(color->values[0], 0.001));
-+ }
- }
-+ else {
-+ for (i = 0; i < color->num_components; i++) {
-+ len += sprintf(buffer+len, " %g", ROUND(color->values[i], 0.001));
-+ }
-+ }
-+
- return len;
- }
-
- pdf_color current_fill = {
-- 1,
-+ 1, {'\0'},
- {0.0, 0.0, 0.0, 0.0}
- };
-
- pdf_color current_stroke = {
-- 1,
-+ 1, {'\0'},
- {0.0, 0.0, 0.0, 0.0}
- };
-
-@@ -244,6 +280,9 @@
- {
- int n;
-
-+ if ( color->SpotColorName[0] != '\0' )
-+ return 1;
-+
- n = color->num_components;
- switch (n) {
- case 1: /* Gray */
-@@ -265,7 +304,7 @@
-
- /* Dvipdfm special */
- pdf_color default_color = {
-- 1,
-+ 1, {'\0'},
- {0.0, 0.0, 0.0, 0.0}
- };
-
---- pdfcolor.h.orig 2014-07-24 21:57:12.649698246 +0300
-+++ pdfcolor.h 2014-08-06 23:31:39.430330177 +0300
-@@ -37,6 +37,7 @@
- #define PDF_COLORSPACE_TYPE_CMYK PDF_COLORSPACE_TYPE_DEVICECMYK
- #define PDF_COLORSPACE_TYPE_RGB PDF_COLORSPACE_TYPE_DEVICERGB
- #define PDF_COLORSPACE_TYPE_GRAY PDF_COLORSPACE_TYPE_DEVICEGRAY
-+#define PDF_COLORSPACE_TYPE_SPOT -2
-
-
- #define PDF_COLOR_COMPONENT_MAX 4
-@@ -44,6 +45,7 @@
- typedef struct
- {
- int num_components;
-+ char SpotColorName[255];
- double values[PDF_COLOR_COMPONENT_MAX];
- } pdf_color;
-
-@@ -54,6 +56,9 @@
- extern int pdf_color_cmykcolor (pdf_color *color,
- double c, double m, double y, double k);
- extern int pdf_color_graycolor (pdf_color *color, double g);
-+
-+extern int pdf_color_spotcolor (pdf_color *color,
-+ char* spot_color_name, double c);
- extern void pdf_color_copycolor (pdf_color *color1, const pdf_color *color2);
-
- #define pdf_color_black(c) pdf_color_graycolor(c, 0.0);
-@@ -63,7 +68,7 @@
-
- extern int pdf_color_type (const pdf_color *color);
- extern int pdf_color_compare (const pdf_color *color1, const pdf_color *color2);
--extern int pdf_color_to_string (const pdf_color *color, char *buffer);
-+extern int pdf_color_to_string (const pdf_color *color, char *buffer, char mask);
-
- extern int pdf_color_is_white (const pdf_color *color);
- extern int pdf_color_is_valid (const pdf_color *color);
---- pdfdraw.c.orig 2014-08-01 23:26:17.454362614 +0300
-+++ pdfdraw.c 2014-08-13 22:56:05.927819086 +0300
-@@ -1260,7 +1260,7 @@
- * the color is the same as the current graphics state color
- */
- void
--pdf_dev_set_color (const pdf_color *color, char mask, int force)
-+pdf_dev_set_color (const pdf_color *color, char mask, int force)
- {
- int len;
-
-@@ -1269,7 +1269,7 @@
-
- ASSERT(pdf_color_is_valid(color));
-
-- if (!(pdf_dev_get_param(PDF_DEV_PARAM_COLORMODE) &&
-+ if (!(pdf_dev_get_param(PDF_DEV_PARAM_COLORMODE) &&
- (force || pdf_color_compare(color, current))))
- /* If "color" is already the current color, then do nothing
- * unless a color operator is forced
-@@ -1277,7 +1277,7 @@
- return;
-
- graphics_mode();
-- len = pdf_color_to_string(color, fmt_buf);
-+ len = pdf_color_to_string(color, fmt_buf, mask);
- fmt_buf[len++] = ' ';
- switch (pdf_color_type(color)) {
- case PDF_COLORSPACE_TYPE_RGB:
-@@ -1293,7 +1293,7 @@
- default: /* already verified the given color */
- break;
- }
-- pdf_doc_add_page_content(fmt_buf, len); /* op: RG K G rg k g */
-+ pdf_doc_add_page_content(fmt_buf, len); /* op: RG K G rg k g etc. */
-
- pdf_color_copycolor(current, color);
- }
---- spc_util.c.orig 2014-07-17 16:35:39.531113864 +0300
-+++ spc_util.c 2014-08-04 23:29:53.857556810 +0300
-@@ -38,7 +38,6 @@
-
- #include "spc_util.h"
-
--
- #ifndef ISBLANK
- #define ISBLANK(c) ((c) == ' ' || (c) == '\t')
- #endif
-@@ -111,6 +110,7 @@
- spc_read_color_color (struct spc_env *spe, pdf_color *colorspec, struct spc_arg *ap)
- {
- char *q;
-+ char *spotColorName;
- double cv[4];
- int nc;
- int error = 0;
-@@ -146,6 +146,20 @@
- } else {
- pdf_color_graycolor(colorspec, cv[0]);
- }
-+ } else if (!strcmp(q, "spot")) { /* Handle spot colors */
-+ spotColorName = parse_c_ident(&ap->curptr, ap->endptr);
-+ if (!spotColorName) {
-+ spc_warn(spe, "No valid spot color name specified?");
-+ return -1;
-+ }
-+ skip_blank(&ap->curptr, ap->endptr);
-+ nc = spc_util_read_numbers(cv, 1, spe, ap);
-+ if (nc != 1) {
-+ spc_warn(spe, "Invalid value for spot color specification.");
-+ error = -1;
-+ } else {
-+ pdf_color_spotcolor(colorspec, spotColorName, cv[0]);
-+ }
- } else if (!strcmp(q, "hsb")) {
- nc = spc_util_read_numbers(cv, 3, spe, ap);
- if (nc != 3) {
-@@ -236,7 +250,6 @@
- if (ap->curptr >= ap->endptr) {
- return -1;
- }
--
- if (syntax)
- return spc_read_color_color(spe, colorspec, ap);
- else
diff --git a/Master/texmf-dist/doc/xelatex/xespotcolor/README b/Master/texmf-dist/doc/xelatex/xespotcolor/README
index a755c9e9c91..57169d9ac70 100644
--- a/Master/texmf-dist/doc/xelatex/xespotcolor/README
+++ b/Master/texmf-dist/doc/xelatex/xespotcolor/README
@@ -5,21 +5,10 @@ by Jens Elstner is a first attempt to introduce the use of
spot colors with pdfLaTeX. The xespotcolor package is a
reimplementation of this package so to be usable with
XeLaTeX. As such, it has the same user interface and
-the same capabilities.
-
-Currently, xdvipdfm-x does not support the spot command,
-which is needed in order to be able top use commands like
-the following one:
-
-\definecolor{Spots}{spotcolor}{SOMECOLOR,1.0}
-
-File PATCHES contains patches that should be applied to the
-source code of xdvipdfm-x so to be able to deal with such
-commands. Also, file spotcolor-test.tex is test file based on
-the documentation of the original package. Finally, file
-spotcolor-test.pdf cannot be produced with a current TeX
-installation. When the source code of xdvipdfm-x will be
-updated, then the contents of this folder will change.
+the same capabilities. The latest version of xdvipdfm-x
+(svn revision 36553) has been modified to handle spot colors.
+So one needs a very recent version of xdvipdfm-x in order to
+run the test file revision 36553.
Apostolos Syropoulos
-2014/11/13
+2015/03/18
diff --git a/Master/texmf-dist/doc/xelatex/xespotcolor/spotcolor-test.pdf b/Master/texmf-dist/doc/xelatex/xespotcolor/spotcolor-test.pdf
index 1ca0367f644..28e70ea54f4 100644
--- a/Master/texmf-dist/doc/xelatex/xespotcolor/spotcolor-test.pdf
+++ b/Master/texmf-dist/doc/xelatex/xespotcolor/spotcolor-test.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xelatex/xespotcolor/xespotcolor.pdf b/Master/texmf-dist/doc/xelatex/xespotcolor/xespotcolor.pdf
index 22ee859858b..5ea7cf1cf54 100644
--- a/Master/texmf-dist/doc/xelatex/xespotcolor/xespotcolor.pdf
+++ b/Master/texmf-dist/doc/xelatex/xespotcolor/xespotcolor.pdf
Binary files differ