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...
4
  • 2
    Welcome to TeX SX! Maybe define the \paragraph format as runin with \titlesec if it is compatible with your class.
    – Bernard
    Commented Oct 7, 2020 at 9: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
    Commented Oct 7, 2020 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
    Commented Oct 7, 2020 at 11:01
  • Just an idea: in the place of \paragraph, you might try to use a customised description environment.
    – Bernard
    Commented Oct 7, 2020 at 11:15

1 Answer 1

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}
3
  • such an innovative idea !! +1
    – MadyYuvi
    Commented Oct 7, 2020 at 14:28
  • Thanks! Is there any reason for adding % at the end of newcommand? I thought % is for comments
    – CookieHCl
    Commented Oct 8, 2020 at 13:39
  • @CookieHCl Yes, it is often important. This answer explains it in details.
    – Vincent
    Commented Oct 8, 2020 at 14:42

You must log in to answer this question.

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