LyXAutomate TeX Macro

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
lalebarde
Posts: 1
Joined: Sun Nov 06, 2011 8:04 pm

Automate TeX Macro

Post by lalebarde »

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 :

Code: Select all

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 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 :

Code: Select all

\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 ?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply