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.

In LyX, I can define a hot-key for listing-insert. But in this case, what appears is the \begin{lstlisting}...\end{lstlisting} environment. In fact I want to insert a inline listings command \lstinline{...}. There is no predefined lyx command for insert an inline listings. How can I do this?

share|improve this question

1 Answer 1

Does the following do what you want?

command-sequence ert-insert; self-insert \lstinline{; char-forward; ert-insert; self-insert }; char-forward; word-backward

Press "alt-x" and insert that in the mini-buffer to test it. If it does what you want, make a shortcut for it.

share|improve this answer
    
This can insert ERT for inline listing. However it's not what I really want. I want the xxxx command in command-sequence listing-insert; inset-settings; xxxx; which can set "inline true" for the inset. –  goodluck Aug 30 '12 at 5:05
    
@goodluck, ah I see what you mean. I don't know how to automate that. –  scottkosty Aug 30 '12 at 6:19

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.