2

Good Morning. I would like to build a code to get what you see in the picture, creating a single command for "Lorem" and one for "Ipsum". Is this possible? Thank you. enter image description here

6
  • Out of curiosity: Why do you need separate commands for something that looks exactly the same?
    – Plergux
    Commented Dec 10, 2020 at 13:34
  • Is there a constraint on the overall width of the desired layout? E.g., should the overall width be equal to \textwidth? Please advise.
    – Mico
    Commented Dec 10, 2020 at 13:37
  • 2
    you can use a latex description environment customise the layout with enumitem Commented Dec 10, 2020 at 13:41
  • @Plergux Ok ok a single command is fine too. Thank you.
    – Andy Toff
    Commented Dec 10, 2020 at 14:13
  • 1
    @ Mico No constraint!
    – Andy Toff
    Commented Dec 10, 2020 at 14:13

3 Answers 3

1

Without LaTeX packages:

\def\loremis{Loerm Ipsum is simply dummy text of the printing and typesetting
  industry. Lorem Ipsum has been the industry's starndard dummy text ever
  since 1500s, when an unknown printer took a gallery of type and scrambed it
  to make a type specimen book.}

\def\p #1 {\noindent\hbox to5em{#1\hfil}\hangindent=5em \hangafter=1 }

\p Lorem \loremis
\bigskip
\p Ipsum \loremis

\bye
2

Here's a tabularx-based solution. A "degree of freedom" in this setup is the width of the first column. In the code below, the width is set to 0.75in; obviously, you're free to choose whatever length you like best.

enter image description here

\documentclass{article}
\usepackage{tabularx,ragged2e,booktabs,lipsum}
\newcommand\mydesc[2]{#1 & #2 \\ \addlinespace}
\begin{document}

\noindent % <-- may be omitted if `\parindent` is equal to 0pt
\begin{tabularx}{\textwidth}{@{} w{l}{0.75in} >{\RaggedRight}X @{}}
\mydesc{Lorem}{\lipsum[1][1-4]}
\mydesc{Ipsum}{\lipsum[2][1-3]}
\end{tabularx}
\end{document} 
2

enter image description here

\documentclass[12pt, a4paper, ]{report}
\usepackage[showframe,]{geometry}

\usepackage{enumitem}
\usepackage{lipsum}
\begin{document}

\chapter*{Using package enumitem}

\begin{description}[labelindent=0pt,labelwidth=2.1cm,labelsep*=1em,leftmargin=!]
    \item[Lorem] \lipsum[2][1-4]
    \item[Ipsum] \lipsum[1][1-3]
    \end{description}

\end{document}

You must log in to answer this question.

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