1

In addition to numbered and unnumbered paragraphs (section, subsection, subsubsection) I would like to have in my thesis some indented and titled paragraphs, but as paragraph command doesn't meet my needs, I'm searching for another solution. Indeed, paragraph command doesn't put enough in light the part of the text I want to emphasize. That paragraph would begin by a title such as : "Observation 1" as in the following picture : enter image description here in which the paragraph that follows its title ("Observation 20") begins with an indentation different from the identation of the main body of the text.

Does anybody have a suggestion ? In the following mwe, I use an unnumbered description list in order to have an indented paragraph.

\documentclass[12pt,a4paper,footinclude=true,twoside,headinclude=true]{scrbook}
\usepackage[parts,pdfspacing,dottedtoc]{classicthesis}
\usepackage{fontspec}
\usepackage[applemac]{inputenc}    
\usepackage[frenchb]{babel}
\setmainfont{Minion Pro}
    \usepackage[marginparsep=8pt,left=3.5cm,right=3.5cm,top=3cm,bottom=3cm]{geometry}


    \begin{document}

   \begin{description}
    This is my text
   \end{description}

    \end{document}
7
  • 3
    You've asked enough questions to know that you should include a minimal working example (MWE), and that you have not given anything like enough information to help you. We don't know anything really - what class you are using, whether you've modified the behaviour of the sectioning commands or, in fact, in what way \paragraph fails to meet your needs. How can I suggest what might suit your needs without your telling me what those needs are?!
    – cfr
    Dec 24, 2014 at 3:23
  • @ Down-voters Please don't vote down below -1. -1 is quite enough to show that the question needs improvement.
    – cfr
    Dec 24, 2014 at 3:55
  • I've just added some improvments to my question.
    – domi
    Dec 24, 2014 at 3:56
  • 1
    That is better but please read the link I posted. We want code which we can copy-paste-compile to see the problem. That code will not produce any output, let alone the output you want to change. Moreover, some of those packages are almost certainly of no relevance to your question. You want less preamble and more content! Like I said, please read the instructions provided at the link above as that explains exactly what you need to do to post an MWE which will enable people to help you. (For example, you surely need a \paragraph... somewhere and you surely don't need graphicx!
    – cfr
    Dec 24, 2014 at 3:59
  • 1
    @domi: Just an… observation: you're using xelatex or lualatex since you load …fontspec. They expect the source file to be utf8 encoded, not applemac. Anyway, for portability, one should not use applemac any more these days.
    – Bernard
    Dec 24, 2014 at 12:52

2 Answers 2

1

You also could do that with the ntheorem package: it has a \theoremindent length,and you can define an observ theorem structure in the break style. Here is a possibility; I had to redefine the break style in order to ensure indentation for the first paragraph. If you don't want such indentation, there's nothing to redefine.

\documentclass[12pt,a4paper,footinclude=true,twoside,headinclude=true]{scrbook}
\usepackage[parts,pdfspacing,dottedtoc]{classicthesis}
\usepackage{fontspec}
\usepackage[frenchb]{babel}
\setmainfont{Minion Pro}
\usepackage[marginparsep=8pt,left=3.5cm,right=3.5cm,top=3cm,bottom=3cm]{geometry}


\usepackage{ntheorem}
\theoremindent = 3em
\theorempreskip\medskipamount
\theorempostskip\medskipamount
\theoremstyle{break}
\theoremheaderfont{\itshape}
\theorembodyfont{\normalfont}
\makeatletter
\renewtheoremstyle{break}%
 {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
 ##1\ ##2\theorem@separator}\hbox{\strut}}}]\hskip\parindent}%
 {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
 ##1\ ##2\ (##3)\theorem@separator}\hbox{\strut}}}]\hskip\parindent}
\makeatother
\newtheorem{observ}{Observation}

    \begin{document}

A repetitive text a repetitive text a repetitive text a repetitive text a repetitive text a repetitive text a repetitive text a repetitive text a repetitive text.
   \begin{observ}
    This is my text. This my text This is my text. This my text This is my text. This my text This is my text. This my text This is my text. This my text. This my text This is my text. This my text This is my text. This my text.

    This is my text. This my text This is my text. This my text This is my text. This my text This is my text. This my text This is my text. This my text. This my text This is my text. This my text This is my text. This my text.
   \end{observ}
 Another no less repetitive text. Another no less repetitive text. Another no less repetitive text. Another no less repetitive text. Another no less repetitive text.

    \end{document} 

enter image description here

1
  • It's (nearly) perfect ! Could it be possible to insert a space just before the Observation paragraph begins ? In this case, I would have exactly what I'm looking for. But I don't want to do that by using \\. Is there a specific rule ?
    – domi
    Dec 24, 2014 at 13:48
2

Create your own environment to set things the way you want.

Below I've used adjustwidth (from changepage) to set a quotation-like environment called observation. The observation title follows a counter that you can reference using \label-\ref.

enter image description here

\documentclass{article}
\usepackage[margin=1in]{geometry}% Just for this example

\usepackage{changepage,lipsum}

\newcounter{observation}
\newenvironment{observation}
  {\par\medskip
   \begin{adjustwidth}{2em}{2em}
     \setlength{\parindent}{1.5em}% \parindent for Observations
     \small% Font changes (if any)
     \refstepcounter{observation}% Increment counter
     \hspace*{\parindent}% Indent Observation title
     Observation~\theobservation% Print Observation title
    \par\nobreak\smallskip}%
  {\end{adjustwidth}\medskip}
\begin{document}

\lipsum[1]

\begin{observation}
  \lipsum[2-3]
\end{observation}

\lipsum[4]

\begin{observation}
  \lipsum[5]
\end{observation}

\begin{observation}
  \lipsum[6]
\end{observation}

\lipsum[7]

\begin{observation}
  \lipsum[8-10]
\end{observation}

\lipsum[11]

\end{document}

You can adjust the \parindent (1.5em) and adjustwidth indents (2em) to suit your needs. The same goes for any font adjustments (\small in this case).

2
  • It works well ! In the case it could be possible, can I align on the right margin the paragraph called "observation" ?
    – domi
    Dec 24, 2014 at 9:22
  • @domi: If you want the right-margin of the observation environment to be flush with the remainder of the text, use \begin{adjustwidth}{2em}{0pt} in the definition.
    – Werner
    Dec 24, 2014 at 16:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .