0

I write an article in Latex and the spacing between equations and text for some equations is uneven for every equation. Hence, I would like to investigate about it, but I am already out of options. Any help is appreciated.

https://www.overleaf.com/9934195924ybngqqrmrvdk

Best regards.

3
  • 1
    Welcome to TeX.SE! Can you show us a short TeX code resulting in your issue in your question, your given links needs an login I do not have ...
    – Mensch
    Commented Aug 16, 2021 at 19:47
  • 2
    please don't use external links. Your question here is archived forever and will make no sense to future readers if you edit the overleaf project. That said never leave a blank like before \begin{equation} or other display math it produces bad spacing, as you see. Commented Aug 16, 2021 at 19:47
  • Neither the caption nor the subcaption is compatible with ifacconf Commented Aug 17, 2021 at 23:09

1 Answer 1

1

I took a quick look at your article for the IFAC meeting. I found some problems, some of them can be easily corrected.

(1) Remove duplicate or tripled packages from your preamble. Also those that are not necessary. Cleans up your code and can avoid conflicts.

(2) Remove blank lines before \begin{equation} (14 instances). Leads to better and more consistent spacing.

(3) Packages subcaption and caption are not compatible with the ifacconf class. Do not use them.

They can be replaced by subfig (and some additional code in the preamble). See ifacconf class is not compatible with caption

(4) The tables were labeled as figures. Use the table environment instead to correct the issue. Their captions should be at the top of the table.

z

(5) Figures 3 and 4 of the paper were labeled as being subfigures but they should be figures.

I include an MWE using your figures to show the proposed changes.

a

c

% !TeX TS-program = pdflatex

\pdfminorversion=7% added <<<<<
\documentclass[a4paper]{ifacconf}

%%**************** from  https://tex.stackexchange.com/a/291563/161015  
\usepackage{subfig}
\AtBeginEnvironment{figure}{\setlength{\captionwidth}{0.8\linewidth}}
\AtBeginEnvironment{table}{\setlength{\captionwidth}{0.8\linewidth}}
\captionsetup[subfloat]{labelformat=parens,width=.7\captionwidth}
\renewcommand{\figurename}{Figure}
%%***************************************************************************
\usepackage{graphicx,amsmath}     
\usepackage[round]{natbib}       

\usepackage{amssymb, mathtools, amsfonts}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{siunitx}

\usepackage{kantlipsum} % dummy text

\begin{document}
\section{Measurements}  
    
1.  \kant[1-4]

\begin{figure*}[!ht]% figure 1
    \centering
    \subfloat[Robot path]{%
    \includegraphics[width=0.45\textwidth]{imgs/source/line/cartesian.eps}
    \label{fig:path_line}}
\hfill
\subfloat[Reading signal]{%
    \includegraphics[width=0.45\textwidth]{imgs/source/line/function.eps}
    \label{fig:reading_line}}
    \caption{Robot path and scalar signal along it. The blue circle designates the extremum; The blue line corresponds to the robot trajectory; the trajectory in black represent the extremum estimation; finally, the green star and red square denotes respectively the initial and final robot positions; finally, the concentric circular lines correspond to level curves of function $f(x) = x^2 + y^2$.}
\end{figure*}

2.  \kant[3-4]

\newpage

\begin{figure*}[!htb]% figure 2
        \centering
        \includegraphics[trim=0.25cm 0cm 0cm 0cm, clip, width=0.9\textwidth]{imgs/source/line/states.eps}
        \caption{Omnidirectional robot states.}  \vspace*{15pt}
        \label{fig:states_line} 
\end{figure*}   
\begin{figure*}[!ht]% figure 3 upper
        \centering
        \includegraphics[width=0.9\textwidth]{imgs/source/line/speeds.eps}
        \label{fig:speeds_line}
\end{figure*}   
\begin{figure*}[!ht]% figure 3 
        \centering
        \includegraphics[width=0.9\textwidth]{imgs/source/line/input.eps}
        \caption{Speeds and torque applied to each wheel of the omnidirectional robot.}
        \label{fig:input_line}
\end{figure*}

\newpage

\section{Analysis}

4.  \kant[11]

\renewcommand{\arraystretch}{1.3}% expand the cells <<<<
\begin{table}[!ht]
    \centering
    \caption{Time-related parameters}\label{tab:sim_time}
    \begin{tabular}{l|c|c|c}
        \hline
        Description & Symbol & Unit & Value \\ \hline \hline
        Simulation interval &  $\Delta t$ & \si{\milli \second} & 1 \\ 
        Exploration interval & $T_s$ & \si{\milli \second} & 100 \\ 
        Planning interval & $T_e$ & \si{\milli \second} & 500 \\
        Poles & $\lambda$ & - & -10 \\ \hline 
    \end{tabular}   
\end{table}

\begin{table}[!ht]
    \centering
    \caption{Barycenter-related parameters}\label{tab:sim_BM}           
    \begin{tabular}{l|c|c|c}
        \hline
        Description & Symbol & Unit & Value \\ \hline \hline
        Speed enhancer & $\nu$ & - & 5 \\
        Average value & $\bar{z}_n$ & - & $\begin{bsmallmatrix} 0 & 0 \end{bsmallmatrix}^{\intercal}$ \\% changed <<<
        Standard deviation & $\sigma$ & \si{m} & 0.5 \\ \hline 
    \end{tabular}   
\end{table}

\begin{table}[!ht]  
    \caption{Torque-related parameters}\label{tab:sim_torque}
    \centering
    \begin{tabular}{l|c|c|c}
        \hline
        Description & Symbol & Unit & Value \\ \hline \hline 
        Average value & $\bar{z}_\tau$ & - & $\begin{bsmallmatrix} 0 & 0 & 0 \end{bsmallmatrix}^{\intercal}$ \\% changed
        Standard deviation & $\sigma_{\tau}$ & \si{\newton \meter} & 1 \\ \hline 
    \end{tabular} 
\end{table} 

5.  \kant[4]

\end{document}
3
  • I thank you @Simon. I hope you have and outstanding day. Commented Aug 17, 2021 at 21:41
  • The table environment is not compatible with ifacconf document class Commented Aug 17, 2021 at 22:47
  • @Bruno Peixoto (1) Test my code with a new name as it is. Use your working directory (for the figures). (2) If everything is alright start deleting packages from your preamble. Start with caption and subcaption. Commented Aug 17, 2021 at 22:55

You must log in to answer this question.

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