Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'ld love to create a Database-Symbol with pst-dbicons:

\rput(5.5,3.25){\database{3.5cm}{2cm}{Datenbank(en)}}

The problem is, that there are braces inside of the text. When I remove them, it works, but with the braces - no error - and no icon is drawn.

Any solutions?

share|improve this question
    
Can you please turn your code snippet into a complete, minimal document illustrating the problem? –  Gonzalo Medina Jul 28 '12 at 16:43
    
to put a ( into a postscript string you need (at the postscript level) \( so try Datenbank\string\(en\string\) untested as no MWE supplied in the question. –  David Carlisle Jul 28 '12 at 16:51
add comment

1 Answer 1

up vote 12 down vote accepted

\database needs an identifying name for the generated nodes. As default it uses the text of the third mandatory argument. But brackets do not work, because they will break the constructed name in PostScript: /N@Datenbank(en) is not a name token anymore. Therefore \database provides an optional argument at the end to specify an identification name:

\database{3.5cm}{2cm}{Datenbank(en)}[Datenbanken]

Note to implementors: This kind of problems are the reason for introducing \pdfescapename, \pdfescapestring and \pdfescapehex to pdfTeX that also works in DVI mode.

Package pdfescape also implements the escaping for e-TeX or vanilla TeX. The drawback is that \EdefEscapeName, \EdefEscapeString and friends are not expandable.

This allows an implementor to use arbitrary text for names or strings in PostScript or PDF that are written in a syntactically correct manner.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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