2

Hey I want to start numbering in LyX beamer from a given number but it doesnt work. Unfortunately I get following numbering: 1, 2, 1, 4.

enter image description here

Enumitem package doesnt work for me so I am looking for another solution

1
  • 1
    I added the beamer tag since you mention using it in your question. Please include a minimal working example (MWE) of what you tried so far. Also, you decribe getting "1, 2, 1, 4", but your screenshot sows "1, 2, 1, 2". Which output doyou expect? Do you want the items to be numbered consecutively from 1 through 4?
    – leandriis
    May 5 at 11:08
2

I first provide an answer that works for all LyX versions. I then give an answer that only works for LyX 2.4.0, which has not been released yet. If you happen to be on Linux, let me know if you would be interested in testing the current 2.4.0dev. For all solutions, the LyX display will not be WYSIWYM, but the output in the PDF will be what you want.

All LyX versions:

Although it is not very LyXish, you can use ERT: Go to Insert > TeX Code, copy the following and then use Shift + Ctrl + V inside the TeX box:

\begin{enumerate}
\setcounter{enumi}{2}
\item This will be 3.
\item This will be 4.
\end{enumerate}

In LyX 2.4.0, there will be two slightly better ways to accomplish what you want while avoiding a full ERT.

LyX >= 2.4.0 Approach 1: Put the cursor in item 1 of the enumerate, go to Insert > List preamble, then inside there go to Insert > TeX Box and paste in \setcounter{enumi}{2}.

LyX >= 2.4.0 Approach 2: Put the cursor in item 1 of the enumerate, go to Insert > List preamble, then inside there go to Edit > Manage Counter Values and in that dialog for "Counter" select "Numbered List (Level 1)" and change "0" to "2" and press "OK".

Here is the LyX display showing all approaches:

enter image description here

And here is the PDF compiled from that LyX document:

enter image description here

0

If it's just a few lines one can do

\begin{itemize}
\item[1.] First
\item[2.] Second
\item[]
\item[3.] Third
\item[4.] Fourth 
\end{itemize}

1
  • But I want to numerate these lines from 1 to 4, but when I do it as in our screen then I get :1,2,1,4 May 5 at 11:38

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.