[3.]\setcounter{enumi}{3}
Usually this works. But sometimes this does not work and instead the usual number, in this case, 2 is displayed and then [3.] is displayed following the 2.
After comparing working and non-working instances, I was able to determine that the non-working instances had the \noindent LaTeX code. The following are examples of working and non-working instances.
Works:
-----------
\begin_layout Enumerate
\begin_inset ERT
status open
\begin_layout Plain Layout
[3]
\backslash
setcounter{enumi}{3}
\end_layout
\end_inset
-----------
Doesn't work:
-----------
\begin_layout Enumerate
\noindent
\begin_inset ERT
status open
\begin_layout Plain Layout
[3]
\backslash
setcounter{enumi}{3}
\end_layout
\end_inset
-----------
Plus, if you get it working without the \noindent, if you try to shrink the font down to tiny, the same behavior results even without any \noindent to be found in the LyX code.
For example, if you see that the ERT box has shruken along with the surrounding text (blue highlighting only for emphasis):

then your pdf will look like this:

Note the annoying [3.] that shows up here. While if you reset the font size of the ERT box (including that right up next to the first shrunken text), like so


This post provides a workaround, but does not provide a full understanding of the underlying issue. :(
Don't ask me why, but yes, I have multiple 3s in a row.
No comments:
Post a Comment