2

I have the following code in Pstrick but the text color is not changing. Always text color shows black. I am running this code with xelatex

\documentclass[12pt]{article}
\usepackage[paperheight=9in,paperwidth=13.24in,margin=0in]{geometry}
  \usepackage[dvipsnames,prologue,table]{pstricks}
 \usepackage{pst-text}
\usepackage{pst-char}
\usepackage{pst-grad}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage[ISBN=978-80-85955-35-4]{ean13isbn}
\usepackage{rotating}
\usepackage{auto-pst-pdf,pst-text}
% begin the document and suppress page numbers
\DeclareFixedFont{\RM}{T1}{ptm}{b}{n}{2cm}

\begin{document}    
\psset{linecolor=yellow, fillstyle=gradient, gradbegin=white, gradend=blue}
\rput[lb](9,7){\pscharpath{ \RM Narayan}}
\end{document}

Please help me regarding this. The file is compiling and giving output but without color.

  • How that, without colour? – Bernard Jul 26 '16 at 19:55
  • yes text is in black color. I am running the code in Xelatex – NARAYAN CHANGDER Jul 27 '16 at 13:40
  • In xelatex I have no image! Can't you run pdflatex (with auto-pst-pdf)? – Bernard Jul 27 '16 at 13:45
2

With \pscharpath you can't use xelatex. Use always latex->dvips->ps2pdf or package auto-pst-pdf and then pdflatex. Or, as an alternetive, use package pst-pdf and run the document with ps4pdf file.tex:

\documentclass[12pt]{article}
\usepackage[paperheight=9in,paperwidth=13.24in,margin=0in]{geometry}
\usepackage[dvipsnames,prologue,table]{pstricks}
\usepackage{pst-text}
\usepackage{pst-grad}
\usepackage{pst-pdf}
% begin the document and suppress page numbers
\DeclareFixedFont{\RM}{T1}{ptm}{b}{n}{2cm}

\begin{document}    
\begin{pspicture}(17,10)
    \psset{linecolor=yellow, fillstyle=gradient, gradbegin=white, gradend=blue}
    \rput[lb](9,7){\pscharpath{ \RM Narayan}}
\end{pspicture}
\end{document}

enter image description here

Or with package auto-pst-pdf instead of pst-pdf and then running pdflatex --shell-escape file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.