Text Formatting ⇒ Placing text with tabs, aligning or with tables without numbering
Placing text with tabs, aligning or with tables without numbering
Does someone knows how to get the text like the picture using tabs and aligning the text? Or is there a way I can use the tables without making them count in the table list and the numbering of the rest of the tables?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
Placing text with tabs, aligning or with tables without numbering
tabular without a table environment and without a \caption. Using caption would provide also captions without numbers. But I would not use a tabular for something like this but a list. Lists support page breaks inside the items. This is mostly better than using, e.g., a longtable that supports page breaks only between table rows and therefore between items.Such a thing can be done very easily using the
labeing environment of KOMA-Script, e.g., provided by package scrextend or every KOMA-Script class:
\documentclass{article}
\usepackage{scrextend}
\usepackage{lipsum}
\begin{document}
\begin{labeling}[~--]{Second}
\item[First] \lipsum[1]
\item[Second] \lipsum[2]
\item[Third] \lipsum[3]
\end{labeling}
\end{document}\documentclass{article}
\usepackage{enumitem}
\usepackage{lipsum}
%\usepackage{showframe}% If you need to visualise the text area.
\begin{document}
\begin{enumerate}[label={Hypothesis~\arabic{*}:},labelsep=1em,leftmargin=*]
\item \lipsum[1]
\item \lipsum[2]
\item \lipsum[3]
\end{enumerate}
\end{document}\documentclass{article}
\usepackage{enumitem}
\usepackage{lipsum}
\newlist{hypothesis}{enumerate}{1}
\setlist[hypothesis]{label={Hypothesis~\arabic{*}:},labelsep=1em,leftmargin=*}
\begin{document}
\begin{hypothesis}
\item \lipsum[1]
\item \lipsum[2]
\item \lipsum[3]
\end{hypothesis}
\end{document}Placing text with tabs, aligning or with tables without numbering
labeling environment a second time.In the third example, the enumeration towers over the left margin. This should be fixed by adding the
leftmargin=* option to \setlist.- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
Placing text with tabs, aligning or with tables without numbering
Placing text with tabs, aligning or with tables without numbering
How can I change the numbers to 1a 1b 2a 3a 3b 3c, something like that? Is that also possible?
Placing text with tabs, aligning or with tables without numbering
\item[1b)]Thank you for your help, very kind!
Placing text with tabs, aligning or with tables without numbering
The enumeration is still slightly outside the margin. I put leftmargin=* in the setlist, however this does not seems to work.Bartman wrote:You announce a solution with enumitem before the second example, but insert the first example with thelabelingenvironment a second time.
In the third example, the enumeration towers over the left margin. This should be fixed by adding theleftmargin=*option to\setlist.
Placing text with tabs, aligning or with tables without numbering
- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
Placing text with tabs, aligning or with tables without numbering
Currently it seem, you are searching for something like:
Code: Select all
\documentclass{article}
\usepackage{lipsum}
\begin{document}
\begin{enumerate}
\item \lipsum[1]
\begin{enumerate}
\item \lipsum[2]
\item \lipsum[2]
\end{enumerate}
\item \lipsum[3]
\begin{enumerate}
\item \lipsum[2]
\item \lipsum[2]
\end{enumerate}
\end{enumerate}
\end{document}Code: Select all
\documentclass{article}
\usepackage{enumitem}
\setlist[enumerate,2]{label=\arabic{enumi}\alph{enumii})}
\usepackage{lipsum}
\begin{document}
\begin{enumerate}
\item \lipsum[1]
\begin{enumerate}
\item \lipsum[2]
\item \lipsum[2]
\end{enumerate}
\item \lipsum[3]
\begin{enumerate}
\item \lipsum[2]
\item \lipsum[2]
\end{enumerate}
\end{enumerate}
\end{document}Placing text with tabs, aligning or with tables without numbering
The first picture I posted was how I want it in one chapter. In a following chapter I will split the hypotheses by multiple ones, so 1a, 1b, 1c (without stating the old ones again). Your last example only works when there is an item 1 and thereafter an item 1a 1b. When you delete item one the following items will be 0a 0b etc.
The way I specify it, the listing goes beyond the left margin as you can see in the example.
\documentclass{article}
\usepackage{lipsum}
\usepackage{enumitem}
\newlist{hypothesis}{enumerate}{2}
\setlist[hypothesis]{label={Hypothesis~\arabic{*}:},labelsep=1em,leftmargin=*}
\setlist[enumerate,2]{label=\arabic{enumi}\alph{enumii})}
\begin{document}
\lipsum[1]
\begin{hypothesis}
\item[Hypothesis 3a:] \lipsum[1]
\item[Hypothesis 3b:] \lipsum[2]
\item[Hypothesis 3c:] \lipsum[3]
\end{hypothesis}
\begin{enumerate}
\item \lipsum[1]
\begin{enumerate}
\item \lipsum[2]
\item \lipsum[2]
\end{enumerate}
\item \lipsum[3]
\begin{enumerate}
\item \lipsum[2]
\item \lipsum[2]
\end{enumerate}
\end{enumerate}
\end{document}