0

I want to get figures to be placed on the bottom of the page, but Overleaf isn't recognizing the [b] for any figures. Here is the figure's code:


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[b]  % order of priority: h here, t top, b bottom, p page
  \centering
  \includegraphics[width=\textwidth]{Images/Image.png}
  \caption{CaptionText}
  \label{fig:label}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Using the above, the figure will not show up until the next \cleardoublepage command. If there is no \cleardoublepage command then it will not display in the pdf at all. If followed by another placement command, like [bthp]then it follows the next command. So for [bthp] the figure will go to the top of the page.

I am using the template found here: link doesn't seem to work...info below but I have added a couple of packages including wrapfig.

This may or may not be related, but there are other random commands not being executed, like \newpage will not create a new page and I have to separate paragraphs with an empty line. I didn't have to do that before. I think there may be something in the style, but I don't know what it is. All packages and styles are in the packages.sty file.

The document is set up to import (using the import package) .tex files saved in the project into the main.tex file. That might be the problem as well, maybe, I don't know.

I am hoping someone would help me find out why these things are happening and, more importantly, tell me how to fix it, so I can place the figure at the bottom of the page using the [b] placement command. [bh] is tricky and will be a last resort.

I have looked at: https://www.overleaf.com/learn/how-to/Including_images_on_Overleaf and https://www.overleaf.com/learn/latex/Positioning_of_Figures Thanks in advance!

Info about setup from main.tex

% Author - Jon Arnt Kårstad, NTNU IMT
\documentclass{article} %Change to report?

% Importing document settings from our file "packages.sty"
\usepackage{packages}

% Beginning of document
\begin{document}

% Inserting title page
\import{./}{title}

% Defining front matter settings (Norsk: innstillinger for forord m.m.)
\frontmatter

\import{./Sections}{0-Proposal}
\newpage

\import{./Sections/}{0a-abstract}

\newpage

% Inserting table of contents
\tableofcontents

% Inserting list of figures & list of tables
\newpage 
\listoffigures
\listoftables

% Defining main matter settings (Norsk: innstillinger for hoveddelen av teksten)
\mainmatter

%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%Paper%%%%%

\import{./Sections/}{1-Introduction}

\cleardoublepage

\import{./Sections/}{2a-AquacultureInNorway}

\cleardoublepage

\import{./Sections/}{2b-HydrodynamicTheory}

\cleardoublepage

\import{./Sections/}{3-Methodology}
\newpage

\import{./Sections/}{4-Model}
\newpage

\import{./Sections/}{5-Results}
\newpage

\import{./Sections/}{6-Analysis}
\newpage

\import{./Sections/}{7-Conclusion}
\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%
%%TemplateHelp%%%%%%%%%%%

% Example section added from an external tex-file, here located in ./Sections/
\import{./Sections/}{Example_section}


% Printing bibliography
\newpage
\printbibliography[heading = bibintoc, title = Bibliography]  
%'bibintoc' inserts our bibliography into the table of contents

% Inserting appendix with separate settings
\addappendix

\import{./Sections}{Example_section}
\import{./Appendices}{example_appendix}


% End of document
\end{document}

From packages.sty

% Author - Jon Arnt Kårstad, NTNU IV-IMT

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{packages}[2021/04/20 Packages]
\usepackage[utf8]{inputenc} % Character encoding

% ------ Contents -------
% Appendices
% Bibliography & References
% Code input
% Flow charts
% Front matter
% General
% Image
% Language
% Main matter
% Mathematics
% Page setup
% -----------------------

% --- Appendices ---
\usepackage{appendix}
\newcommand{\addappendix}{   % Self-created command to insert appendix with predefined settings
    \newpage
    \appendix
    \section*{Appendix}   % Name of appendix
    \addcontentsline{toc}{section}{Appendix}  % Add appendix name to table of contents
    \renewcommand{\thesubsection}{\Alph{subsection}}    % Change numbering of section to upper-case letters.
}

% --- Bibliography & References---  
\usepackage[backend = biber,    % Recommended backend for sorting bibliography
            %style = authoryear-comp,    % Close to the 'Harvard' referencing style
            style = ieee,    % Close to the 'Harvard' referencing style
            urldate = long,     % Long: 24th Mar. 1997 | Short: 24/03/1997
           %maxcitenames = 2,   % Number of authors in cite before replaced with 'Author#1 et al.'
            ]{biblatex}
\addbibresource{references.bib}     % Adding our file containing the references
% \addbibresource{zotero.bib} %zotero index

\usepackage[labelfont={it, bf},textfont={it}]{caption}        % Enables controlling the look and feel of captions, see package documentation
\usepackage[labelfont={bf, it},textfont={it}]{subcaption}     % Recommended when making sub-figures
\usepackage[nottoc]{tocbibind}  % Includes Bibliography, Index, list of Listing etc. to table of contents
\newcommand{\source}[1]{\vspace{-4pt} \caption*{\hfill \footnotesize{Source: {#1}} } }   % Easily insert sources in images

% --- Code ---
\usepackage{minted} % Includes several programming languages and styles, visit --https://www.ntnu.no/wiki/display/imtsoftware/Code+in+LaTeX-- for more information and examples

% --- Flow Charts ---
% Keep in mind that you may customize these flow chart settings to fit your own preferences.
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,mindmap, trees, arrows.meta, decorations.pathmorphing, backgrounds, positioning, fit, petri}
\tikzstyle{decision} = [diamond, draw, fill=blue!20, 
    text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]
\tikzstyle{block} = [rectangle, draw, fill=blue!20, 
    text width=5em, text centered, rounded corners, minimum height=4em, anchor=north]
\tikzstyle{block2} = [rectangle, draw, fill=blue!20, 
    text width=15em, text centered, rounded corners, minimum height=4em, inner sep=0pt]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
    minimum height=2em,]

%--- Tables ---
% Example in example_appendix:
% https://www.overleaf.com/learn/latex/Tables

\usepackage{array}
\usepackage{multirow}
\usepackage{multicol}


% --- Front matter ---
% Front matter is located before the table of contents, e.g. preface (Norsk: forord) and often has separate settings
\newcommand{\frontmatter}{
    \pagenumbering{roman}   % Setting page numbering to lower-case roman
}

% --- General ---
\usepackage{import}     % Enable importing of sections
\usepackage{csquotes}   % Provides international handling of quote marks. Especially useful for bibliography management using BibLaTeX
\usepackage{hyperref}   % Hyper-references, possible to change color
\hypersetup{    % Color of hyper-references
    colorlinks,
    citecolor = black,
    filecolor = black,
    linkcolor = black,
    urlcolor = black
}
\usepackage{comment}    % Comment blocks of text using \begin{comment} ... \end{comment}
\usepackage{pdfpages}   % Enables import of pdf-pages using e.g. \includepdf[pages=-]{./my_pdf.pdf}

% --- Image ---
\usepackage{graphicx}   % Handle images
\usepackage{wrapfig}    % Wrap text around images
\usepackage{float}      % Force image location using "H"
\usepackage{url}        % Insert urls
\urlstyle{sf}           % Set url-style as "sans-serif". Other options are e.g. "same" or "rm"
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}   % Ruler


% --- Language ---
\usepackage{siunitx}    % Enable SI units
\usepackage[british]{babel}     % Defining UK English as language. This will among other things ensure that dates are displayed as 24/03/1997 rather than 03/24/1997 in the bibliography.
\addto\extrasbritish{   % Change naming of different functions, e.g. figure references.
    \renewcommand*\contentsname{Table of Contents}  % Rename table of contents
    \renewcommand{\listfigurename}{List of Figures} % Rename list of figures
    \renewcommand{\listtablename}{List of Tables}   % Rename list of tables
    \def\equationautorefname{Equation}              % Autoref-name for equations
    \def\figureautorefname{Figure}                  % Autoref-name for figures
    \def\tableautorefname{Table}                    % Autoref-name for tables
    \def\sectionautorefname{Section}                % Autoref-name for sections
    \def\subsectionautorefname{\sectionautorefname} % Autoref-name for subsections
    \def\subsubsectionautorefname{\sectionautorefname} % Autoref-name for subsubsections
}

% --- Main matter ---
% This is the main part of the paper.
\newcommand{\mainmatter}{
    \newpage
    \pagenumbering{arabic}  % Setting page numbering to normal integers
}

% --- Mathematics ---
\usepackage{bm}         % Bold text in math mode
\usepackage{amsmath}    % Math formulas and improved typographical quality of their output
\usepackage{amssymb}    % Extended symbol collection
\usepackage{amsthm}     % Helps define theorem-like structures
\usepackage{textcomp}   % Used in the package "gensymb" (below), which will give warnings if "textcomp" is not imported in advance
\usepackage{gensymb}    % Adds extra generic symbols for math and text mode, e.g. \degree

% --- Page setup ---
\usepackage[a4paper, total={150mm, 245mm,footskip = 14mm}]{geometry}
\setlength{\parindent}{0em}
\setlength{\parskip}{0.8em}

% Customized header and footer
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0.1ex}
\renewcommand{\footrulewidth}{0.1ex}
\fancyfoot[C]{\thepage}

@DavidCarlisle: This is the beginning of the literature review section:

\section{Literature Review}
\label{Litrev}
This section describes the current state of  art solutions relevant to this project. 

\subsection{Aquaculture in Norway}
\subsubsection{Governmental perspective}

In December 2020, The Ocean Panel, a group of 14 heads of state from countries representing 40\% of the world's coastlines and of which Norway's Erna Solberg was a member, launched the “New Ocean Action Agenda”. This was a call to action for all coastlines to be sustainably managed by 2030. This was a two-year effort that resulted in a comprehensive report detailing how to support a growing human population while protecting the oceans from increased impact of said growth. Aquaculture features predominantly in both solutions. In it, they commit to increasing the “productivity of fisheries and aquaculture production” in order to “enhance food security, improve nutrition, human health and well-being, create sustainable economic growth and jobs and prevent the widening
of current inequities” \cite{Transformations_2020}.  

This was followed by the July 2021 release of the Norwegian government's strategy for utilization of ocean resources, with a picture of an aquaculture site in the cover. It reiterated the Panel's commitment to sustainable, but increased, production of farmed fish \cite{havbruksstrategien_2021}. 

One initiative is a call for simplifying the new-site licensing review of the current  process through various oversight divisions, illustrated in Figure \ref{fig:applications}. The desire is to make the application process streamlined by digitalizing publicizing data. 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[!bht]  % order of priority: h here, t top, b bottom, p page
  \centering
  \includegraphics[width=\textwidth]{Images/applications.png}
  \caption{Approval process for new aquaculture licenses.  \citefield [Translated from][]{havbruksstrategien_2021}{title} \cite{havbruksstrategien_2021}.}
  \label{fig:applications}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

It also calls for the aquaculture law, or NYTEK, to be updated to reflect the twin goals of a more transparent application process that uniformly ensures stricter control over negative environmental effects. Another objective is to ensure innovation by making the law as technology neutral as possible. The paper outlines the directives for NYTEK22, which was in hearing when the government published the strategy plan, increasing the probability for the law passing next year \cite{havbruksstrategien_2021}.  

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[bht]  % order of priority: h here, t top, b bottom, p page
  \centering
  \includegraphics[width=\textwidth]{Images/costs.png}
  \caption{Cost layout in aquaculture by research areas from 2009-2019 \cite{havbruksstrategien_2021}}
  \label{fig:costs}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\lipsum[1-10]

Continue text if needed.

15
  • 1
    \newpage will force a page break if you place it where a page break is possible (eg not inside a box) using an empty line in the source is the standard way to mark a paragraph so I do npot understand your comment "I have to separate paragraphs with an empty line" Oct 18 '21 at 14:01
  • 2
    no I can't see anything in the template link (really you should make an example here) but [!bp] probably works (! to ignore the constraints and p so if it doesn't fit b it will try a float page not drift to th eend of the document). Oct 18 '21 at 14:38
  • 2
    @MadyYuvi stdfloats will make no difference unless it is a two column document (in which case b is not supported at all without such a package) Oct 18 '21 at 14:39
  • 1
    report and article are almost identical (generated from the same source) except report has \chapter headings above \section Oct 18 '21 at 14:54
  • 1
    ! will cause the 30% rule to be ignored. If you want help with a specific placement make an example and add it to your question (you can use example-image as the image as it is available for tests, but remove the input of all the files that we don't have. Oct 18 '21 at 16:17
1

From comments:

Figure placement depends on the whole document so you have not given enough information although in article class a bottom figure is not allowed to be more than 30% of the page and by using [b] you are preventing every other position so a figure more than that size will not be allowed anywhere so will go to the end of the document.

@DavidCarlisle: I think that may be the reason; the 30% of the page thing. I am using article document class. That can be seen in the link to the template. Most images that are text width will use more than 30% of the page. Can I change that aspect of the rule without having to change the document class? I don't even know what search string would work to look that question up.

! will cause the 30% rule to be ignored.

[!b]

0

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.