I want to add this table using a lyx shortcut: enter image description here

The LaTex code is as follows:

\textenglish[variant=american]{state} & \LRE{$P\left[kPa\right]$} & \LRE{$T\left[c\lyxmathsym{\textdegree}\right]$} & \LRE{$v\left[m^{3}/kg\right]$} & \LRE{$u\left[kJ/kg\right]$} & \LRE{$h\left[kJ/kg\right]$} & \LRE{$m\left[kg\right]$} & \LRE{$V\left[m^{3}\right]$} & \textenglish[variant=american]{phase}\tabularnewline
\LRE{$A1$} &  &  &  &  &  &  &  & \tabularnewline
\LRE{$A2$} &  &  &  &  &  &  &  & \tabularnewline
\LRE{$B1$} &  &  &  &  &  &  &  & \tabularnewline
\LRE{$B2$} &  &  &  &  &  &  &  & \tabularnewline

what is the needed shortcut code?

  • Do you really want a single keyboard shortcut to add that entire table, with the text? Dec 5, 2021 at 12:54
  • You might consider using a clipboard manager like CopyQ (github.com/hluk/CopyQ). That is what I use for things like this. You can make a tab called something like "LyX preset tables" and just copy the table (in LyX) and save it in that tab and then whenever you want to paste it go back to that tab. This works well for me with CopyQ on Linux and I would imagine on other platforms as well.
    – scottkosty
    Dec 5, 2021 at 14:03
  • There's Is it possible to define snippets in LyX? - TeX - LaTeX Stack Exchange , but I would imagine that doing multiple lines is not very easy.
    – user202729
    Dec 5, 2021 at 18:22

1 Answer 1


I know this question is quite old, but you might want to consider using AutoHotkey to achieve something like this.

AutoHotkey is useful nearly every and any time you want to automate a user action on a PC, because it can emulate any keyboard action.

  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Apr 14 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .