Text FormattingSection Headings without Titles in Body of Text

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
vincentalpha
Posts: 3
Joined: Wed Mar 07, 2012 8:28 am

Section Headings without Titles in Body of Text

Post by vincentalpha »

So I have a somewhat different sort of problem I am thinking. Basically I have several pages which are nothing but figures and ideally I would like to have them in subsections as they relate to different datasets and such, however the way that the floats fit onto the page the moment I try to put them into a subsection I wind up with a page with the subsection title and numbering and nothing else, then the page with the data on it which clearly is rather wasteful and looks quite bad I think. Given the nature of the data I do not need the titles to be printed out at any point other then the TOC except perhaps in the headers.

So essentially what I am looking for is, whether it is possible to create subsections with titles but suppress having the titles printed out anywhere but in the TOC and headers?

Thanks in advance for any replies

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

Section Headings without Titles in Body of Text

Post by Frits »

Since you didn't provide a MWE, I'm not sure if I can help you. However, here's an idea:

LaTeX has certain rules about the amount of text and floats (figures) on one page. I wrote about that in this post. In short, add the following to your preamble:

Code: Select all

\renewcommand{\textfraction}{0.05}
Note that this does not answer your question, but it might be an elegant workaround.
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
vincentalpha
Posts: 3
Joined: Wed Mar 07, 2012 8:28 am

Section Headings without Titles in Body of Text

Post by vincentalpha »

Hello,

Thanks for the reply, unfortunately space is rather at a premium on my pages so even with that cranked down to a minimum and reducing the size of my floats by 10% it still pushed the floats to a new page with the text on preceding page. I would reduce the size further but any more and I risk my figures being unreadable.

Also here is the MWE you asked for, hopefully it helps.

Code: Select all

\documentclass[letterpaper]{proc}
\usepackage{morefloats}
\usepackage{graphicx}
\usepackage[caption=false]{subfig}
\usepackage{fancyhdr}
\begin{document}
\pagestyle{fancy}
\begin{section}{mySection}
\begin{figure*}[hp]
\subfloat[Myfloat]{\includegraphics[width=0.45\textwidth]{./myfloat}}
\subfloat[Myfloat]{\includegraphics[width=0.45\textwidth]{./myfloat}}\\
\subfloat[Myfloat]{\includegraphics[width=0.45\textwidth]{./myfloat}}
\subfloat[Myfloat]{\includegraphics[width=0.45\textwidth]{./myfloat}}\\
\subfloat[Myfloat]{\includegraphics[width=0.45\textwidth]{./myfloat}}
\subfloat[Myfloat]{\includegraphics[width=0.45\textwidth]{./myfloat}}\\
\caption{myCaption}
\end{figure*}
\end{section}
\end{document}
Here ./myfloat.pdf is a 11 by 8.5 inch pdf.
User avatar
justdeath
Posts: 69
Joined: Mon Sep 05, 2011 10:27 am

Section Headings without Titles in Body of Text

Post by justdeath »

Hi to the forum.

But your best center of knowledge for LaTeX is Wikibooks, specifically:
http://en.wikibooks.org/wiki/LaTeX/Floa ... d_Captions

You should add \usepackage{float} in the preamble and use:

Code: Select all

\begin{figure}{Ht}
Also you should split your graphics into separate figures, you'll have more control this way. I can show you, but you must send your sample graphic (upload as attachment).

Nikolay
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Section Headings without Titles in Body of Text

Post by localghost »

justdeath wrote:[…] But your best center of knowledge for LaTeX is Wikibooks, specifically:
http://en.wikibooks.org/wiki/LaTeX/Floa ... d_Captions

You should add \usepackage{float} in the preamble and use:

Code: Select all

\begin{figure}{Ht}
[…]
There is absolutely no sense in putting some stuff into a floating environment and then keep this environment from floating by this sledgehammer method. A simple use of the appropriate placement parameters will do as long as there is enough space left to place the float.

Code: Select all

\begin{figure}[!htb]
% figure content
\end{figure}
If it's about placing a figure (or table) absolutely, the caption package provides with the \captionof command a much smarter way of doing this. Perhaps this wiki should be updated in this regard.


Thorsten
CJFugate
Posts: 12
Joined: Thu Aug 23, 2012 11:47 pm

Re: Section Headings without Titles in Body of Text

Post by CJFugate »

I'm having the same problem. Did you ever get this to work?
vincentalpha
Posts: 3
Joined: Wed Mar 07, 2012 8:28 am

Re: Section Headings without Titles in Body of Text

Post by vincentalpha »

Unfortunately no, I decided that after this much aggravation that the TOC and fancy headers would work well enough for my purposes.
Post Reply