Graphics, Figures & Tableslontable shifts or "indents" into the margin

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
amoz
Posts: 14
Joined: Mon Mar 16, 2009 1:42 pm

lontable shifts or "indents" into the margin

Post by amoz »

This has me puzzled... Who knows why this is happening (and what can be done to prevent the table being indented)?

[Nevermind the missing references, I left the \citep commands for completeness. The fancyheader commands help in illustrating the actual indent.]

Many thanks!

Code: Select all

\documentclass[11pt]{book} 
\usepackage{tabularx,fancyhdr,longtable,setspace,float,booktabs} 

\floatplacement{figure}{H}
\usepackage[round,sectionbib,sort]{natbib}
\usepackage[font=footnotesize,labelfont=bf]{caption}
\setlongtables
\usepackage[british]{babel}

\usepackage{fancyhdr} 
\pagestyle{fancy} 
\newcommand{\tocetcmark}[1]{% 
\@mkboth{\nouppercase{#1}}{\nouppercase{#1}}}
%\renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ #1}{}} 
\renewcommand{\tocetcmark}[1]{\markboth{#1}{}}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}} 
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} 
% Code for creating empty pages:
% No headers on empty pages before new chapter
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
    \hbox{}
    \thispagestyle{empty}
    \newpage
    \if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother \clearpage{\pagestyle{empty}\cleardoublepage}
\fancyhf{} % delete current setting for header and footer
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\fancyfoot{} % clear all footer fields 
\fancyfoot[LE,RO]{\bfseries\thepage}
\fancypagestyle{plain}{% 
\fancyhead{} % get rid of headers on plain pages
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\begin{longtable}{>{\raggedright}p{0.2\textwidth}cp{0.6\textwidth}}
\caption[Overview of selected fragmentation metrics.]{Selected fragmentation indices. Symbols follow authors' convention or \citet{mcg02}. Interior area is defined as the area whose boundary is a specified distance inwards from the patch perimeter, with the specified distance varying with the process or species of interest. The seminal reference of each metric is provided.}\label{table:metrics_introduction}\\
\toprule
Metric name& Symbol& Description \& Reference\\
\midrule
Number of patches& NP (DEN) & Number of patches (patch density) of a particular class (or classes pooled) \citep{tur89}\\
Mean patch size& MPS& Average area of a patch of a particular class (or classes pooled) \citep{mcg02}\\
Modified Euler number& $\varepsilon\ast$& Spatial integrity, based on the number of fragments and perforations \citep{bog02.2}\\
Largest patch index& LPI& Percentage of landscape area occupied by the largest patch (of a class) \citep{mcg95}\\
Nearest neighbor distance& $d_{ij}$& Distance from patch \textit{i} to the nearest occupied patch \textit{j}, measure of patch isolation \citep{har98}\\
Proximity index&  PX& Sum of area of all patches within a fixed distance of the focal patch \citep{gus92}\\
Patch coherence index&  C& Tendency of pixels to aggregate, quantifies patch size evenness \citep{jae00}\\
Monmonier index&  F& Aggregation of pixels into patches, measure of image complexity \citep{mon74}\\
Contagion index& D$_{2}$& ``Clumpiness'' of a map based on pixel adjacency \citep{one88}\\
Interspersion/\-Juxtaposition index&  IJI&  ``Clumpiness'' of a map based on patch adjacency \citep{mcg95}\\
Patch cohesion index&  PC& Area weighted perimeter-to-area ratio divided by area weighted mean shape index \citep{sch96}\\
Contiguity of cells&  G$_{1}$& Spatial connectedness of pixels, uses sliding window \citep{lag91}\\
Clustering of pixels& G$_{2}$& Spatial clustering of pixels, uses sliding window \citep{lag91}\\
Adjacency probability& p$_{c}$& Probability that the nearest neighbor of a pixel of class \textit{a} is also a pixel of class \textit{a}, alternative measure of contiguity \citep{rii00}\\
Lacunarity index&  L& Number of cells of a particular class inside a sliding window \citep{plo93}\\
Interior-to-edge ratio& I/E& Presence of interior area relative to edge area, dependent on centripetal perturbation \citep{for81}\\
Fractal dimension&  FDI& Complexity of patch geometry, uses perimeter-to-area relationship \citep{kru87}\\
Composite metric& $\Phi_{f}$& Comprehensive measure incorporating patch size, perimeter, isolation, and number of patches  \citep{bog00.2}\\
\bottomrule
\end{longtable}

\end{document}

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

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

lontable shifts or "indents" into the margin

Post by localghost »

An adjustment of the last column might help. Perhaps one of the packages ltablex or ltxtable is worth a look.


Best regards
Thorsten¹
amoz
Posts: 14
Joined: Mon Mar 16, 2009 1:42 pm

lontable shifts or "indents" into the margin

Post by amoz »

OK, I made a sort of compromise by changing

Code: Select all

\begin{longtable}{>{\raggedright}p{0.2\textwidth}cp{0.6\textwidth}}
to

Code: Select all

\begin{longtable}{>{\raggedright}p{0.2\textwidth}cp{0.55\textwidth}}
(smaller last column)

Thanks
Post Reply