1
% oblivoir is for korean characters
\documentclass{oblivoir}
% oblivoir contains enumerate package
% \usepackage{enumerate}

\begin{document}

\paragraph{Q: }
\begin{enumerate}[(a)]
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    Praesent ornare purus augue, ac consequat magna viverra vel.
    Donec auctor tortor vel aliquam tempus.
\item Praesent faucibus rutrum massa, iaculis vulputate risus faucibus a.
    Duis vel rhoncus ante.
    Quisque feugiat mattis turpis, in ultrices ipsum luctus ut.
    Sed volutpat id justo eget cursus.
\end{enumerate}

\end{document}

If I run the above code, you'll get something like this. Enumerate begins with a newline.

Q:
(a) blah blah blah..
    And the text is indented blah blah...
(b) blah blah blah
    Also this one is indented blah blah...

I want to make enumerate right next to the paragraph like this:

Q:  (a) blah blah blah..
        And the text is indented blah blah...
    (b) blah blah blah..
        Also this one is indented blah blah...

Or at least like this:

Q:  (a) blah blah blah..
        And the text is indented blah blah...
(b) blah blah blah..
    Also this one is indented blah blah...

Unfortunately, enumitem package with inline option and using enumerate* environment with itemjoin = \newline option was not a solution because it won't indent the text.

Q:  (a) blah blah blah..
And the text is NOT indented blah blah...
(b) blah blah blah..
Also this one is NOT indented blah blah...
JamesT
  • 3,169
  • 2
    Welcome to TeX SX! Maybe define the \paragraph format as runin with \titlesec if it is compatible with your class. – Bernard Oct 07 '20 at 09:04
  • @Bernard Is this the correct way to do it? \titleformat{\paragraph}[runin]{}{}{0pt}{} Then it doesn't work. Also documentation of titlesec says runin makes it like \paragraph, so I think it won't work. – CookieHCl Oct 07 '20 at 10:41
  • Hard to say, as I don't know your class. I thought that maybe it put paragraphs on their own line, and in this case, it would have been a possible solution. This being said, yes, in usual contexts, your code produces what you describe. – Bernard Oct 07 '20 at 11:01
  • Just an idea: in the place of \paragraph, you might try to use a customised description environment. – Bernard Oct 07 '20 at 11:15

1 Answers1

2

This is more a workaround than a real solution, but if you don't really need the \paragraph, you could place the "Q:" inside of the first item.

\documentclass{oblivoir}
\newcommand*{\firstitem}{%
    \refstepcounter{enumi}%
    \item[\textbf{Q:} (\theenumi)]%
}
\begin{document}

\begin{enumerate}[(a)] \firstitem Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent ornare purus augue, ac consequat magna viverra vel. Donec auctor tortor vel aliquam tempus. \item Praesent faucibus rutrum massa, iaculis vulputate risus faucibus a. Duis vel rhoncus ante. Quisque feugiat mattis turpis, in ultrices ipsum luctus ut. Sed volutpat id justo eget cursus. \end{enumerate}

\end{document}

Vincent
  • 20,157