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.
3 Answers
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
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.
\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}
\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}
\textwidth
? Please advise.