1

Below is the code I am using, I wish for the paragraph text to be above the table. However everything I have tried hasn't worked including adding a float barrier and using [x] after \begin{table}. The code:

\paragraph{\normalfont The international system of units or SI units are a set of standard units agreed upon in 1971. The base units are shown in the table:}
\FloatBarrier
    \begin{table}[h]
        \centering
        \scalebox{1.0}{
        \begin{tabular}{| c | c | c |}
            \hline
            Sr. No. & C1 & C2\\
            \hline
            \hline
            1 & Row1Col1 & Row1Col2 \\
            \hline
            2 & Row2Col1 & Row2Col2 \\
            \hline
            3 & Row3Col1 & Row3Col2 \\
            \hline
        \end{tabular}}
        \caption{SI Base Units}
        \label{SI Units}
    \end{table}
\FloatBarrier

The paragraph is positioned below the text when I need it above. Any advice would be appreciated.

3
  • Welcome to TeX.SE.
    – Mico
    Jun 20, 2021 at 11:18
  • 1
    It's not necessary, and certainly not recommended, to use \paragraph instructions for the purposes of creating (typographic) paragraphs. Please feel free to augment your posting to explain how you're creating (typographic) paragraphs at present.
    – Mico
    Jun 20, 2021 at 11:35
  • 2
    \paragraph{ is a section heading like \section it is the 4th level so should only be used below \subsubsection and only have the title not the full text. putting \FloatBarrier either side of an [h] float just force a page break. Finally don't apply \scalebox to tables, especially \scalebox{1.0}{ which is not scaling at all, just forcing a spurious space afer the { Jun 20, 2021 at 11:45

1 Answer 1

1

What's the purpose of the \paragraph{\normalfont ...} "wrapper"? If I remove this wrapper, the [h] placement specifier manages to place the table below the paragraph in question just fine.

If, for some reason, you really must use the \paragraph wrapper, I suggest you insert an invisible object, say, \vphantom{.}, right after it:

\paragraph{\normalfont The international system of units or 
SI units are a set of standard units agreed upon in 1971. 
The base units are shown in the table:}\vphantom{.}
7
  • I have been using paragraph{\normalfont... throughout my whole document where writing information. Otherwise the text is in a bold and looks to similar to my \sections and \subsections in terms of thickness. I have tried your code and it has fixed my problem by using [H] . Im not to sure why my way wasn't working? But thank you.
    – Horton
    Jun 20, 2021 at 11:28
  • @Horton - I've updated my answer to address your follow-up comment. I still don't understand why you use \paragraph instructions "throughout your whole document". Note that \paragraph is a LaTeX sectioning command, which can create sectioning numbers if you execute \setcounter{secnumdepth}{4} in the preamble. Using \paragraph is neither necessary nor recommended for creating ordinary paragraphs.
    – Mico
    Jun 20, 2021 at 11:32
  • 1
    Ok thanks for your help, I will look further into this and make changes.
    – Horton
    Jun 20, 2021 at 11:42
  • 1
    If you don't want to remove ALL those \paragraph commands, one can use \renewcommand{\paragraph}[1]{\par #1\par} Jun 20, 2021 at 14:01
  • 3
    @JohnKormylo theoretically you could, but removing the \paragraph would be far better. Jun 20, 2021 at 16:47

You must log in to answer this question.

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