Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I know, the question doesn't explain too much. That's why I'm going to do that here.

I'm writing a technical paper and I have a few sections. Within each section, there are a few paragraphs. Some of them are titled with \paragraph but some of them not. The thing is: when I have an untitled one below a titled one, the untitled one looks odd. Graphically seems that it is contained in the other, even using indentations.

My question is: When I use \paragraph, should I use it in each paragraph of the section? Written in another way: Can untitled paragraphs be between titled ones? Is that correct? Anyway, the paragraph titles are more seen in other kinds of documents, not essentially Technic. So, feel free to recommend me how to organize better the document structure.

P.S.: Making a \subsection would be too much. I mean, the info in each section is not enough to do that.

share|improve this question
    
A minimal working example would help. –  Kit Nov 6 '10 at 0:21
    
You're right: pastebin.com/BRYMNbwF where the second paragraph looks like a child of the first just because it doesn't have a title. Am I crazy? –  Tomas Nov 6 '10 at 0:44
1  
It is good that you provided an example. But as a side remark, put more emphasis on "minimal" next time: packages like amsmath, esint, graphicx and pstricks are surely not necessary for one to reproduce your problem. –  Willie Wong Nov 6 '10 at 2:04
    
Sorry, that's just because I've copied the preamble from my original document and forgot to change it to suit the minimal example. –  Tomas Nov 6 '10 at 2:16
3  
@Tomas: Not exactly. Think of \paragraph as a low-level \subsection, in which the text of the "section name" is set on the same line as the text of the content of the section. A "normal" paragraph (not marked with \paragraph) is just content, which "belongs" in the division/level started by the last division mark, in this case \paragraph. Just like the case where unmarked paragraphs are part of a \chapter or \section –  Brent.Longborough Nov 6 '10 at 17:11

4 Answers 4

up vote 6 down vote accepted

How about doing something like

\newcommand*\uparagraph{%
        \par
        \nopagebreak
        \vskip3.25ex plus1ex minus.2ex
        \noindent
 }

This provides the same spacing as the default \paragraph but doesn't title it. It also doesn't indent the new paragraph which is the reason for the \nopagebreak. (You don't want a nonindented paragraph to start a new page, especially if the previous line of the last paragraph is full.

share|improve this answer
    
Your solution is great! I'd only trim the \noindent because I want indented paragraphs. Just one thing: If I use it after a \section how can I avoid the extra space added? I mean, I only want the \vskip if there is another paragraph (titled or untitled) before. –  Tomas Nov 6 '10 at 5:27
    
Here is an example of the unwanted \vskip after the \section pastebin.com/DZbg70y0 –  Tomas Nov 6 '10 at 5:38
    
Maybe replacing \vskip with \addvspace{3.25ex plus1ex minus.2ex} could help. Otherwise, just omit the \uparagraph at the beginning of sections. –  mpg Nov 6 '10 at 6:08
    
@Tomas: I wouldn't use this at the beginning of sections since they don't need any visual clues that its the start of something new. It's the same reason you don't need to indent paragraphs at the beginning of sections. I suspect that if you indent the paragraph but provide no other indication that the titled paragraph before it has ended, it'll just look like you have an underfull page. –  TH. Nov 6 '10 at 9:35
    
I understand. But for some weird reason my paragraphs are getting indented after sections and subsections. –  Tomas Nov 6 '10 at 12:26

In the light of Tomas' comments to the question:

\paragraph{Lump} is a way to mark up a document division called Lump, not simply a way to say "this is a paragraph and its title is Lump which also happens to be part of the text.

The full hierarchy (as implemented in memoir) is:

\book
\part
\chapter
\section
\subsection
\subsubsection
\paragraph
\subparagraph

The content of unmarked paragraphs normally belongs logically to the document division defined by the last division markup item, in this case \paragraph.

Thus, in this example:

\paragraph{Al-Si junction.} 

It refers to the high-speed (aluminum-silicon) ...

The density of mobile carriers ...

\paragraph{B-Si junction.} 

It refers to the high-speed (boron-silicon) ...

The two paragraphs "It refers" and "The density" belong to the "paragraph-level section" called "Al-Si", and the single paragraph "It refers" belongs to the "paragraph-level section" called "B-Si". Despite the final rendered text's appearance, what we have here are two section headings and three paragraphs.

The end result is that "seems that it is contained in the other" is true, because that is how it is marked up. To achieve a uniform structure, you will need either to give each paragraph its own \paragraph division, or none of them.

share|improve this answer
    
Thanks, your answer have clarified things a lot! –  Tomas Nov 6 '10 at 17:44

Since sectioning units don't have an end marker, the following unit should be started by a heading. Transfer your paragraph problem to sections or chapters: if you let just some text follow without a heading, it seems to belong to the preceding section or chapter.

That's why I would try to find a suitable run-in heading for each paragraph.

Another approach would be to format the paragraph text in a way that makes clear where that paragraph ends. For example, indent the paragraph body. This may be done by a description environment:

\section{Construction}
\begin{description}
\item[Al-Si junction.] It refers to the high-speed (aluminum-silicon)
    semiconductor-metal barrier diode, commonly known as a Schottky diode.
    This is included in the table because some silicon power IGFETs have a
    parasitic reverse Schottky diode formed between the source and drain as
    part of the fabrication process. This diode can be a nuisance, but
    sometimes it is used in the circuit.
\end{description}
The density of mobile carriers in the channel of a MOSFET is a function
of the electric field forming the channel and of various other phenomena
such as the impurity level in the channel. Some impurities, called dopants,
are introduced deliberately in making a MOSFET, to control the MOSFET
electrical behavior.

Output:

alt text

share|improve this answer
    
That's a good solution tough. The only trouble is that I'd have to create a new environment in order to modify each paragraph. –  Tomas Nov 6 '10 at 1:52
    
Or use one description environment for all paragraphs and begin each paragraph with \item[heading] or just \item without the optional argument. –  Stefan Kottwitz Nov 6 '10 at 1:59
    
I thought of that but it's like a big change from the normal writing. I mean, it'd go from indented start and normal body to normal start and indented body. –  Tomas Nov 6 '10 at 2:47

article.cls defines \paragraph like this:

\renewcommand\paragraph{
  \@startsection{paragraph}           % name
  {4}                                 % sectioning level
  {\z@}                               % indent (\z@ is a synonym for 0pt)
  {3.25ex \@plus1ex \@minus.2ex}      % before skip
  {-1em}                              % after skip (the '-' has a special meaning)
  {\normalfont\normalsize\bfseries}}  % format

So, you can see that article class based documents have around 3.25ex worth of skip before each \paragraph'd paragraph, hence the "unbalanced" look and feel across the page.

You can either \renewcommand{\paragraph} (can be quite tricky) or you can employ a helper package to take care of everything for you. The easiest way out is to use the titlesec package:

\usepackage{titlesec}
\titlespacing{\paragraph}{0pt}{0pt}{0pt}

EDIT:

Oddly enough, \titlespacing gobbles the \quad (or whatever) that is normally appended after the paragraph heading. In which case you'll need to manually append some space each time you use \paragraph:

\paragraph{Al-Si junction.}\quad It refers to the...

or,

\paragraph{Al-Si junction.}\ It refers to the...

In any case, I guess appending a quad or space makes this solution somewhat less desirable than if titlesec didn't have this "side-effect". In which case, I guess it'd be best to redefine the \paragraph command directly, e.g., like this:

\makeatletter
\renewcommand\paragraph{
  \@startsection{paragraph}           % name
  {4}                                 % sectioning level
  {\z@}                               % indent (\z@ is a synonym for 0pt)
  {0pt}                               % before skip
  {-1em}                              % after skip (the '-' has a special meaning)
  {\normalfont\normalsize\bfseries}}  % format
\makeatother
share|improve this answer
    
I'm not sure you completely understood my query. I want to make that untitled paragraphs doesn't look like they belong to the previous (titled) paragraph. Your solution only cuts the vertical spacing between each \paragraph. –  Tomas Nov 6 '10 at 3:42
    
How easy would be to \newcommand a "uparag". It would be the same as \paragraph but without arguments, so when I start an untitled paragraph, it will have vertical separation frome the titled one. –  Tomas Nov 6 '10 at 3:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.