Text Formattingmemoir | Number selected Paragraphs

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Kant
Posts: 3
Joined: Wed Apr 25, 2012 12:18 pm

memoir | Number selected Paragraphs

Post by Kant »

Hi,

I'm new in this forum, and quite new at using latex.

I'm currently writing my PhD thesis, with the help of lyx 2.0.3, using the class "Memoir".

I would like to be able to number some of my paragraphs (basically, one out of three or four) throughout the whole dissertation.

I spent a lot of time trying to find the answer on various websites. I didn't find anything.

I don't know whether it is simple to do. If, by any chance, one of you happen to know how to proceed, I would be extremely grateful.

Thanks a lot!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Kant
Posts: 3
Joined: Wed Apr 25, 2012 12:18 pm

Re: memoir | Number selected Paragraphs

Post by Kant »

The idea would be to find something like this (attached file).
Thanks a lot!
[
Attachments
Exemple numérotation paragraphe.jpg
Exemple numérotation paragraphe.jpg (194.21 KiB) Viewed 3235 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

memoir | Number selected Paragraphs

Post by Stefan Kottwitz »

Hi Kant,

welcome to the board!

You could use the standard \paragraph command, because this is directly supported by LyX. Just modify the command and its counter as desired, such as
  • being numbered (raise \secnumdepth)
  • number throughout instead of by within subsubsection (using chngcntr)
  • add a dot by redefining \theparagraph
All settings can be done in your document preamble. Here are the settings, embedded in a normal LaTeX document as example:

Code: Select all

\documentclass{memoir}
\usepackage[english]{babel}
\usepackage{blindtext}
\setcounter{secnumdepth}{4}
\usepackage{chngcntr}
\counterwithout{paragraph}{subsubsection}
\renewcommand*{\theparagraph}{\arabic{paragraph}.}
\begin{document}
\setcounter{paragraph}{452}% simulate that some came before
\paragraph{} \blindtext
\paragraph{} Another paragraph with text. \blindtext
\end{document}
Numbered paragraphs
Numbered paragraphs
paragraphs.png (26.94 KiB) Viewed 3232 times
Stefan
LaTeX.org admin
Kant
Posts: 3
Joined: Wed Apr 25, 2012 12:18 pm

Re: memoir | Number selected Paragraphs

Post by Kant »

Ok, this is exactly what I wanted! You're great. Thanks a lot.
Post Reply