0

My target is to recreate some pages from the polish Algebra book, as close to original, as it is possible. I don't really know how to reduce that free space between paragraph caption and text. This is the target text. What do I have.

First picture is what I need to achieve and the second one what do I have.

P.S. I am a beginer in Latex and this is my first question, so sorry if something is wrong.

\documentclass[leqno,fontsize=12pt]{article}
\renewcommand{\theparagraph}{\S\arabic{paragraph}.}
\begin{document}


\paragraph{\textbf{Liczby pierwsze i ich ważniejsze własności. Liczby zlożone i ich rozkład na czynniki pierwsze.}}


\end{document}
2
  • 1
    Welcome to TEX.SE! This spacing can be easily adjusted but the answer critically depends on what class you are using. Please provide a full minimal working example which reproduces the issue, starting with \documentclass{...} and ending with \end{document}.
    – campa
    Dec 9 '19 at 10:09
  • @campa I added the information about document and paragraphs. Dec 9 '19 at 10:26
1

mwe

\documentclass{article}
\begin{document}
\paragraph{foo} bah
\makeatletter
\renewcommand\paragraph{%
  \@startsection{paragraph}% 
                {4}%                        
                {\z@}%               
                {1ex \@plus1ex \@minus.2ex}%
                {-.3em}% <----------- skip after header (yes, negative)
                {\normalfont\normalsize\bfseries}}%
\makeatother
\paragraph{foo} bah\par
\bigskip\noindent But simpler:\par
{\parskip 1ex plus 1ex minus .2ex     
\noindent\textbf{foo} bah}
\end{document}

Of course, "simpler" assuming that paragraphs will be not numbered, otherwise use the first method.

11
  • I have a question. Why did you use \makeatletter and \makeatother inside the document? (I thought we use it only when the \renewcommand locates in preambl.) Dec 9 '19 at 11:40
  • 1
    @WashingtonD Easy: try to remove that commands. Still work? I used \make-at-letter because I need make "at" (@) a normal letter. It does no matter if you need that in the preamble or in the document. In this case was used in the document body to show first the default paragraph behavior, although that will be not the usual in real documents.
    – Fran
    Dec 9 '19 at 11:53
  • When I try to create a paragraph with your code I get "undefined control sequence \paragraph{1} ". What should I do? Dec 9 '19 at 12:05
  • The MWE works, and you can move the \makeatletter ... \makeatother chunk to the preamble, your are some thing else wrongly. Be careful of how you modify the code.
    – Fran
    Dec 9 '19 at 12:17
  • I've tried all possible options and I have always received errors. Dec 9 '19 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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