For those interested, here is a redefinition of the basic colors of color.pro using RGB values exclusively.
TeXDict begin/Rhodamine{1 0.18 1 setrgbcolor}N/OliveGreen{0 0.6 0 setrgbcolor}N/Mahogany{0 0 0.65 setrgbcolor}N/BlueGreen{0.67 1 0.15 setrgbcolor}N
/PineGreen{0.16 0.75 0 setrgbcolor}N ...
Search found 11 matches
- Fri Nov 05, 2010 5:36 pm
- Forum: Conversion Tools
- Topic: How can I generate a PS using RGB colors only with DVIPS/gs?
- Replies: 6
- Views: 6932
- Fri Nov 05, 2010 4:12 pm
- Forum: Conversion Tools
- Topic: How can I generate a PS using RGB colors only with DVIPS/gs?
- Replies: 6
- Views: 6932
How can I generate a PS using RGB colors only with DVIPS/gs?
Sorry, but in color.pro is only a definition for setcmykcolor but it does
not mean that it is already used. However, you can overwrite /setcmykcolor:
\AtBeginDocument{\special{ps:
/setcmykcolor { 10 dict begin
/K exch def
/K1 1 K sub def
/Y exch def
/M exch def
/C exch def
1 C K1 mul K add ...
- Fri Nov 05, 2010 3:11 pm
- Forum: Conversion Tools
- Topic: How can I generate a PS using RGB colors only with DVIPS/gs?
- Replies: 6
- Views: 6932
How can I generate a PS using RGB colors only with DVIPS/gs?
\usepackage[rgb]{xcolor}
Herbert
I use that already in LaTeX. What this does is to rewrite my own colors using RGB, but it does not prevent dvips from using the color.pro header file which uses CMYK. The color.pro header would work fine if setcmykcolor was undefined when I use
gs -dPDFA ...
- Thu Nov 04, 2010 11:50 pm
- Forum: Conversion Tools
- Topic: How can I generate a PS using RGB colors only with DVIPS/gs?
- Replies: 6
- Views: 6932
How can I generate a PS using RGB colors only with DVIPS/gs?
Hi,
I want to produce a postscript file that uses only RGB colors with DVIPs, but DVIPs includes color.pro which defines basic colors using CMYK values. color.pro defines setcmykcolor using setrgbcolor when it is undefined:
/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop
setrgbcolor}{1 sub 4 ...
I want to produce a postscript file that uses only RGB colors with DVIPs, but DVIPs includes color.pro which defines basic colors using CMYK values. color.pro defines setcmykcolor using setrgbcolor when it is undefined:
/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop
setrgbcolor}{1 sub 4 ...
- Wed Jan 27, 2010 6:06 pm
- Forum: General
- Topic: Question about expandafter chains...
- Replies: 9
- Views: 9276
Question about expandafter chains...
ok,
I have found a solution that works:
> \result=macro:
->Hello The World.
I have found a solution that works:
Code: Select all
Code, edit and compile here:
\def\hello#1 #2{Hello #1 #2}%\def\world{{The} {World}}%\def\exec#1#2{\expandafter\def\expandafter\result\expandafter{#1#2}}%\expandafter\exec\expandafter\hello\expandafter{\world}%\show\result
->Hello The World.
- Wed Jan 27, 2010 5:58 pm
- Forum: General
- Topic: Question about expandafter chains...
- Replies: 9
- Views: 9276
Question about expandafter chains...
I dodn't follow. If you avoid wrapping the expansion of \world in braces, then what is wrong with
\documentclass{minimal}
\begin{document}
\ttfamily
\def\hello#1 #2{Hello #1:#2:}%
\def\world{World}%
\expandafter\expandafter\expandafter\def
\expandafter\expandafter\expandafter\msg
\expandafter ...
\documentclass{minimal}
\begin{document}
\ttfamily
\def\hello#1 #2{Hello #1:#2:}%
\def\world{World}%
\expandafter\expandafter\expandafter\def
\expandafter\expandafter\expandafter\msg
\expandafter ...
- Wed Jan 27, 2010 4:45 pm
- Forum: General
- Topic: Question about expandafter chains...
- Replies: 9
- Views: 9276
Question about expandafter chains...
After TeX has
\documentclass{minimal}
\begin{document}
\ttfamily
\def\hello#1{Hello #1}%
\def\world{World}%
\expandafter\expandafter\expandafter\def
\expandafter\expandafter\expandafter\msg
\expandafter\expandafter\expandafter{%
\expandafter\hello\expandafter{\world}%
}
\meaning\msg
\end ...
\documentclass{minimal}
\begin{document}
\ttfamily
\def\hello#1{Hello #1}%
\def\world{World}%
\expandafter\expandafter\expandafter\def
\expandafter\expandafter\expandafter\msg
\expandafter\expandafter\expandafter{%
\expandafter\hello\expandafter{\world}%
}
\meaning\msg
\end ...
- Wed Jan 27, 2010 4:26 pm
- Forum: General
- Topic: Question about expandafter chains...
- Replies: 9
- Views: 9276
Re: Question about expandafter chains...
Thanks! I think I get the idea now. I was somehow misleaded by expandafter definition that says that
\expandafter\a\b
"expands \b, then \a". A more correct statement I think would be that it expands \b than put \a back in front of it, not preventing it from being expanded. What I mean is that ...
\expandafter\a\b
"expands \b, then \a". A more correct statement I think would be that it expands \b than put \a back in front of it, not preventing it from being expanded. What I mean is that ...
- Wed Jan 27, 2010 4:59 am
- Forum: General
- Topic: Question about expandafter chains...
- Replies: 9
- Views: 9276
Question about expandafter chains...
Hello,
could someone explain to me why in the following code the macro \msg is not defined as "Hello World"
\def\hello#1{Hello #1}%
\def\world{World}%
\expandafter\def\expandafter\msg\expandafter{\expandafter\hello\world}%
\show\def%
The output is
> \msg=macro:
->\hello World.
but I was ...
could someone explain to me why in the following code the macro \msg is not defined as "Hello World"
\def\hello#1{Hello #1}%
\def\world{World}%
\expandafter\def\expandafter\msg\expandafter{\expandafter\hello\world}%
\show\def%
The output is
> \msg=macro:
->\hello World.
but I was ...
- Tue Jan 26, 2010 6:11 pm
- Forum: General
- Topic: Macro with argument signature from another macro?
- Replies: 2
- Views: 1730