1

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.

Publius
  • 87
  • 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 02 '20 at 17:43
  • There are still quite some details that are uncelar to me. Which of the two different layouts so you actually want to achive? Do you need both or just one of them? Some background information about youe documentclass might also be helpful. For a start, you could have a look at the description environment. The enumitem package can help vustomize it to suit your needs. See for example here: https://tex.stackexchange.com/a/184783/134144. Regarding the alignment of "John" and "Joe" in teh first screenshot: either a nested description could work or alternatively a tabular. – leandriis Aug 02 '20 at 17:50
  • Regarding the second screenshot: Probably you could increase the margin of the document and place "anaphora" into the margin. If this is a useful approach or not depends on the other contents of your document. How would you like section and subsection titles to align with respect to the examples and their contents? – leandriis Aug 02 '20 at 17:53
  • @leandriis just tried the \description{ } environment; works great! Thanks for the tip. – Publius Aug 02 '20 at 18:36

1 Answers1

0

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.

Publius
  • 87