Good morning,
We are generating a table of contents in a pdf by adding contents=yes to the pdf options.
In each line to show in the index we add an ods proclabel.
We are trying to change the color with a proc template but we can't get it to paint black.
Since the titles are blue.
If you could give us a hand.
Thank you very much, we appreciate it in advance.
/* Proc Template */
proc template;
define style Styles.AnuarioText2;
parent=styles.htmlblue;
style body from document / leftmargin=1.5cm rightmargin=1.5cm topmargin=0cm bottommargin=0cm;
class usertext from usertext / foreground=red font_face="arial" font_size=9pt font_weight=bold color=bigb;
class systemtitle / font_face="arial" font_size=9pt font_weight=bold color=bigb;
class table / font_face="arial" font_size=7pt cellpadding=1.5;
class data / font_face="arial" font_size=7pt borderrightwidth=2 borderleftwidth=2 borderbottomwidth=2 bordertopwidth=2;
class rowheader / font_face="arial" font_size=7pt font_weight=bold backgroundcolor=white borderrightwidth=2 borderleftwidth=2 borderbottomwidth=2 bordertopwidth=2;
class header / font_face="arial" font_size=7pt font_weight=bold vjust=c cellheight=0.7cm borderrightwidth=2 borderleftwidth=2 borderbottomwidth=2 bordertopwidth=2;
class ContentTitle from ContentTitle / pretext='Índice';
end;
run;
/* Proc Template END */
/* Table Of Contents */
ods pdf style=Styles.AnuarioText2 CONTENTS=YES;
ods pdf startpage=now;
/* Table Of Contents END */
Hi,
Add this line to your AnuarioText2 template and see if it produces the result you expect:
class colors / 'systitlefg' = black;
Otherwise look at the definition of the HTMLBLUE template in SAS and try to change every single color until you get the result you expect.
This is the definition I have:
proc template;
define style Styles.HTMLBlue;
parent = styles.statistical;
class GraphColors /
'gndata12' = cxECE8C4
'gndata11' = cxDBD8F8
'gndata10' = cxC6E4BF
'gndata9' = cxE6CEAD
'gndata8' = cxE5C1D4
'gndata7' = cxCCDFF0
'gndata6' = cxDDDEB5
'gndata5' = cxDBC7E7
'gndata4' = cxD5C6B4
'gndata3' = cxB7D4D3
'gndata2' = cxE7B3B4
'gndata1' = cxBBC2DC
'gndata' = cxBBC2DC
'gofill' = cxFAFBFE
'gblockheader' = cxcfd5de
'gcphasebox' = cx989EA1
'gphasebox' = cxDBE6F2
'gczonec' = cxBECEE0
'gzonec' = cxCCDCEE
'gczoneb' = cxCCDCEE
'gzoneb' = cxD7E5F3
'gzonea' = cxE3EDF7
'gconramp3cend' = cx9C1C00
'gconramp3cneutral' = cx222222
'gconramp3cstart' = cx0E36AC
'gramp3cend' = cxD05B5B
'gramp3cneutral' = cxFAFBFE
'gramp3cstart' = cx667FA2
'gcontrollim' = cxE6F2FF
'gccontrollim' = cxBFC7D9
'gruntest' = cxCAE3FF
'gcruntest' = cxBF4D4D
'gclipping' = cxFFFFC6
'gcclipping' = cxC1C100
'gaxis' = cx989EA1
'greferencelines' = cx989EA1;
class colors /
'link2' = cx0000FF
'link1' = cx800080
'docbg' = cxFAFBFE
'contentbg' = cxFAFBFE
'systitlebg' = cxFAFBFE
'titlebg' = cxFAFBFE
'proctitlebg' = cxFAFBFE
'headerbg' = cxEDF2F9
'captionbg' = cxFAFBFE
'captionfg' = cx112277
'bylinebg' = cxFAFBFE
'notebg' = cxFAFBFE
'tablebg' = cxFAFBFE
'batchbg' = cxFAFBFE
'systitlefg' = cx112277
'titlefg' = cx112277
'proctitlefg' = cx112277
'bylinefg' = cx112277
'notefg' = cx112277;
class Header /
bordercolor = cxB0B7BB
backgroundcolor = cxEDF2F9
color = cx112277;
class Footer /
bordercolor = cxB0B7BB
backgroundcolor = cxEDF2F9
color = cx112277;
class RowHeader /
bordercolor = cxB0B7BB
backgroundcolor = cxEDF2F9
color = cx112277;
class RowFooter /
bordercolor = cxB0B7BB
backgroundcolor = cxEDF2F9
color = cx112277;
class Table /
cellpadding = 5;
class Graph /
attrpriority = "Color";
class GraphFit2 /
linestyle = 1;
class GraphClipping /
markersymbol = "circlefilled";
end;
run;
- Cheers -
Hi,
Add this line to your AnuarioText2 template and see if it produces the result you expect:
class colors / 'systitlefg' = black;
Otherwise look at the definition of the HTMLBLUE template in SAS and try to change every single color until you get the result you expect.
This is the definition I have:
proc template;
define style Styles.HTMLBlue;
parent = styles.statistical;
class GraphColors /
'gndata12' = cxECE8C4
'gndata11' = cxDBD8F8
'gndata10' = cxC6E4BF
'gndata9' = cxE6CEAD
'gndata8' = cxE5C1D4
'gndata7' = cxCCDFF0
'gndata6' = cxDDDEB5
'gndata5' = cxDBC7E7
'gndata4' = cxD5C6B4
'gndata3' = cxB7D4D3
'gndata2' = cxE7B3B4
'gndata1' = cxBBC2DC
'gndata' = cxBBC2DC
'gofill' = cxFAFBFE
'gblockheader' = cxcfd5de
'gcphasebox' = cx989EA1
'gphasebox' = cxDBE6F2
'gczonec' = cxBECEE0
'gzonec' = cxCCDCEE
'gczoneb' = cxCCDCEE
'gzoneb' = cxD7E5F3
'gzonea' = cxE3EDF7
'gconramp3cend' = cx9C1C00
'gconramp3cneutral' = cx222222
'gconramp3cstart' = cx0E36AC
'gramp3cend' = cxD05B5B
'gramp3cneutral' = cxFAFBFE
'gramp3cstart' = cx667FA2
'gcontrollim' = cxE6F2FF
'gccontrollim' = cxBFC7D9
'gruntest' = cxCAE3FF
'gcruntest' = cxBF4D4D
'gclipping' = cxFFFFC6
'gcclipping' = cxC1C100
'gaxis' = cx989EA1
'greferencelines' = cx989EA1;
class colors /
'link2' = cx0000FF
'link1' = cx800080
'docbg' = cxFAFBFE
'contentbg' = cxFAFBFE
'systitlebg' = cxFAFBFE
'titlebg' = cxFAFBFE
'proctitlebg' = cxFAFBFE
'headerbg' = cxEDF2F9
'captionbg' = cxFAFBFE
'captionfg' = cx112277
'bylinebg' = cxFAFBFE
'notebg' = cxFAFBFE
'tablebg' = cxFAFBFE
'batchbg' = cxFAFBFE
'systitlefg' = cx112277
'titlefg' = cx112277
'proctitlefg' = cx112277
'bylinefg' = cx112277
'notefg' = cx112277;
class Header /
bordercolor = cxB0B7BB
backgroundcolor = cxEDF2F9
color = cx112277;
class Footer /
bordercolor = cxB0B7BB
backgroundcolor = cxEDF2F9
color = cx112277;
class RowHeader /
bordercolor = cxB0B7BB
backgroundcolor = cxEDF2F9
color = cx112277;
class RowFooter /
bordercolor = cxB0B7BB
backgroundcolor = cxEDF2F9
color = cx112277;
class Table /
cellpadding = 5;
class Graph /
attrpriority = "Color";
class GraphFit2 /
linestyle = 1;
class GraphClipping /
markersymbol = "circlefilled";
end;
run;
- Cheers -
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.