4

I am having a problem defining a script that I got as a macro in LyX (or even making it "work" in LyX).
The script I have is the following:

\newcommand{\from}{\mathbin{\vbox{\baselineskip=3pt\lineskiplimit=0pt
                     \hbox{.}\hbox{.}\hbox{.}}}}

It suppose to be three dots, kind of like \vdots, but just lower.. Do you have a clue how to make it work in LyX? I don't even know if this script (which is I suppose in Latex) is suitable to LyX.

  • What do you want to do? Do you want to know how to make Lyx accept that definition? Do you want to know how to run user-supplied Tex macros in Lyx? Do you want to know how to add symbols to the symbols Lyx recognises? – Charles Stewart Apr 2 '14 at 11:42
  • Oh, sorry, I forgot to tell that.. I would like to know how to make lyx accept that definition – Buzi Apr 2 '14 at 12:10
5

LyX uses LaTeX as the backend, so in principle you can use any LaTeX macro in LyX.

For your case, you can go to Document --> Settings --> LaTeX preamble, and add your \newcommand there. To use it in a document just type \from, but note that this only works in math mode.

LyX won't necessarily show it formatted as you're typing but it will come up in a PDF export.

2

LyX includes a feature for inserting macros that if used will (in most cases) replace the defined command with a LyX graphical representation of it's definition.

To use macros, do Insert > Math > Macro and insert your to be defined command and its content.

Alternatively, or if something goes haywire while the content is being typed, you can write out the entire \newcommand... in normal text mode, and then in one fell swoop convert it to a macro by highlighting it, and then applying Insert > Math > Inline formula (or the corresponding keyboard shortcut).

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.