I am not sure what to even search or how to describe what I'm trying to do here. I'm trying to do a definition-example type of thing. Here's an example:

enter image description here

For the Term definition part, I am using \paragraph{} and \subparagraph{} type thing, with the Term part in the brackets. If anyone has a better idea for that, please let me know.

My big issue is with the example part. I have no idea how to make the text line up on the right (for the first example). There's my first question.

The second is with the second example that I gave, namely with the dialogue. I was going to use the information in this post to make the dialogue. However, I have no idea how to put the Example: part in and have the dialogue indented in the proper fashion.

I have a feeling that these have to do with the minipage package, but I have so little experience with it, I have no idea how I'd do this.

Additional information:

  • I may want to include multiple examples (and multiple types of examples) under a single term.
  • The document is organized by section-subsection organization, including paragraphs and subparagraphs, so indentation might change for different terms.

Another example could be something like this: enter image description here where the term is on the left and all of the text is aligned on the right. But again, I have no idea how to make that kind of "outdented" and aligned text on one side, regardless of what is on the left.

By the way, these were all made in MS word because I can't figure out how to render like this in LaTeX.

  • What have you tried so far? Please add a minimal working example (MWE) of your current code.
    – epR8GaYuh
    Jul 27 '20 at 18:45
  • @epR8GaYuh I haven't, beyond the \paragraph{} tags. I don't know where to start with this, I've never done anything even remotely like this before, and I am not too experienced in LaTeX beyond basic math stuff.
    – Publius
    Jul 27 '20 at 18:50
  • There are multiple ways to achive the layouts you showed. Which one to use depends on the details. Do you need pagebreaks within such an enviornment. Do you need pagebreaks within one example?...
    – leandriis
    Jul 27 '20 at 18:57
  • @leandriis I will definitely be using pagebreaks in the document (\newpage). I may be using them inside a particular term. I probably will not be using them inside a specific example. I figured this has probably been solved, but I wasn't even sure what I should search.
    – Publius
    Jul 27 '20 at 19:42
  • @leandriis do you happen to have a link to a solution or some sample code that can make those two layouts?
    – Publius
    Aug 2 '20 at 17:43

The description environment fit my needs using an article doument class.

See this link, suggested by @leandriis above, which pointed me to the right package: the enumitem package. Documentation can be found here.

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.