In HTML5, the <hr> tag defines a thematic break. How can I do this in Latex? I would prefer a semantic solution.
Asked
Active
Viewed 484 times
1
Nova
- 791
-
Thematic break? It is Horizontal Rule. – Sigur Apr 10 '17 at 16:28
-
Not in HTML 5. Of course, most browsers display it as a horizontal rule anyway. – Nova Apr 10 '17 at 16:30
-
Not a duplicate, I'm looking for something semantic. – Nova Apr 10 '17 at 16:30
-
3See http://tex.stackexchange.com/q/32711/15925 – Andrew Swann Apr 10 '17 at 16:33
-
1This question is still not clear. What does "semantic" mean? – Werner Apr 10 '17 at 18:43
2 Answers
2
You can write your own command:
\newcommand{\thematicbreak}{\par\bigskip}
If you want a horizontal rule, decoration, asterism, etc., you can do that, too (as explained in Totally sweet horizontal rules in LaTeX). Here's a simple version:
\newcommand{\thematicbreak}{\begin{center}* * *\end{center}}
Or, following the default display of <hr> (which, let's be real, originated as an abbreviation for "horizontal rule"):
\newcommand{\thematicbreak}{\par\bigskip\noindent\hrulefill\par\bigskip}
<thematic break>
Full example:
\documentclass{article}
\usepackage{lipsum}
\newcommand{\thematicbreak}{\par\bigskip\noindent\hrulefill\par\bigskip}
\begin{document}
\lipsum[1]
\thematicbreak
\lipsum[2]
\end{document}
musarithmia
- 12,463
2
Here's a small code for an asterism I use from time to time:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\newcommand{\asterism}{%
\vspace{2.5ex}\par\noindent%
\parbox{\textwidth}{\centering{*}\\[-4pt]{*}\enspace{*}\vspace{2ex}}\par%
}
\begin{document}
\lipsum[2]
\asterism
\lipsum[3]
\end{document}
Bernard
- 271,350

