LaTeX forum ⇒ Text Formattingmemoir | Number selected Paragraphs Topic is solved

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

memoir | Number selected Paragraphs

Postby Kant » Wed Apr 25, 2012 12:24 pm

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!

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

Postby Kant » Thu Apr 26, 2012 6:56 pm

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 1541 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 9557
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Thu Apr 26, 2012 7:43 pm

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:

  1. \documentclass{memoir}
  2. \usepackage[english]{babel}
  3. \usepackage{blindtext}
  4. \setcounter{secnumdepth}{4}
  5. \usepackage{chngcntr}
  6. \counterwithout{paragraph}{subsubsection}
  7. \renewcommand*{\theparagraph}{\arabic{paragraph}.}
  8. \begin{document}
  9. \setcounter{paragraph}{452}% simulate that some came before
  10. \paragraph{} \blindtext
  11. \paragraph{} Another paragraph with text. \blindtext
  12. \end{document}


paragraphs.png
Numbered paragraphs
paragraphs.png (26.94 KiB) Viewed 1538 times


Stefan
LaTeX.org admin

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

Postby Kant » Thu Apr 26, 2012 8:08 pm

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


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 2 guests