howto automate Tex macro ?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

howto automate Tex macro ?

lalebarde
This post has NOT been accepted by the mailing list yet.
Hi all,

I would like to reproduce the \LyX{} or \LaTeX{} macros. When "LyX" or "LaTeX" are in a LyX file, they are processed as if the Tex code "\LyX{}" or "\LaTeX{}" was used.

When I look at the code, there is a macro definition :

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\providecommand{\LyX}{\texorpdfstring%
  {L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
  {LyX}}


If I try to do the same in the preambule of my LyX file :

\providecommand{\PoK}{\texorpdfstring%
  {P\kern-.1667em\lower.25em\hbox{O}\kern-.125emK\@}
  {PoK}}


Simply writing "PoK" in the LyX file does not produce anything special in the pdf. Only if I write the Tex code "\Pok{}", I get the right result.

How can it be done please ?