0

What is the proper way to insert some vertical material inside a paragraph? Like what quote or display math do.

I want to have a parbox or a minipage inserted at a given point of my paragraph vertically, and then the paragraph be resumed (without indentation, in particular). I can do it by hard breaking the line with \\, but this does not feel like the right way, and this is not how displayed equations or quote environment behave.

3
  • 1
    use quote or center or quotation Jun 20, 2023 at 8:34
  • @DavidCarlisle, quote and quotation add an (unwanted) margin. center is OK for full-width boxes, but otherwise I would like to have the material left-justified, like in normal vertical mode.
    – Alexey
    Jun 20, 2023 at 8:43
  • 2
    flushleft is same as center but not centered, but all of those are simple one line definitions wrapping list specifying the vertical space and alignment so if you don't want exactlly that just copy the definition and adjust Jun 20, 2023 at 9:13

1 Answer 1

2

If you look at the definition of the center environment (texdef -t latex center) then you see it is defined as follows:

\begin{trivlist}\centering\item\relax
[body]
\end{trivlist}

So you can take that definition and remove the \centering:

\documentclass{article}
\begin{document}
This is the first line of a paragraph that has intentation. The goal is to have vertical material within the paragraph that is not indented, not centered, and does not indent the following line.
\begin{center}
The center environment does this but is centered
\end{center}
Some more text, not indented
\begin{trivlist}\item\relax
A trivlist is not centered and meets all three criteria
\end{trivlist}
End of the text, also not indented
\end{document}

Result:

enter image description here

You must log in to answer this question.

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