![如何修复超出边距的表格?](https://linux22.com/image/264457/%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%E8%B6%85%E5%87%BA%E8%BE%B9%E8%B7%9D%E7%9A%84%E8%A1%A8%E6%A0%BC%EF%BC%9F.png)
我创建了一个表格,但表格对于边距来说太宽了。我尝试实现\hspace*{-50pt}
before\begin{tabular}
和\hspace{-50pt}
after \end{tabluar}
。这样可以消除overfull \hbox
消息,但表格正好位于纸张边缘。有没有办法缩小表格,使其居中而不位于纸张边缘?以下是 MWE:
\documentclass[11pt,twoside,openright]{memoir}
\usepackage[size=pocket,trim,bleed]{createspace}
%\usepackage[paperwidth=4.25in, paperheight=6.875in,bindingoffset=.75in]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{tgtermes}
\usepackage{mathpazo}
\usepackage[protrusion=true,expansion=true]{microtype}
\usepackage{lipsum}
%\usepackage{type1cm}
%\usepackage{lettrine}
%\checkandfixthelayout
% See the ``Memoir customise'' template for some common customisations
% Don't forget to read the Memoir manual: memman.pdf
%\title{TITLE OF BOOK}
%\author{NAME OF AUTHOR}
%\date{} % Delete this line to display the current date
%% BEGIN TITLE
\makeatletter
\def\maketitle{%
\null
\thispagestyle{empty}%
\vfill
\begin{center}\leavevmode
\normalfont
{\LARGE\raggedleft \@author\par}%
\hrulefill\par
{\huge\raggedright \@title\par}%
\vskip 1cm
% {\Large \@date\par}%
\end{center}%
\vfill
\null
\cleardoublepage
}
\makeatother
\author{AUTHOR}
%\author{NAME OF AUTHOR}
\title{TITLE}
%\date{}
%%% BEGIN DOCUMENT
\begin{document}
\pdftitle{TITLE}
\pdfauthor{AUTHOR}
\pdfsubject{SUBJECT}
\chapterstyle{bianchi}
\let\cleardoublepage\clearpage
\maketitle
\frontmatter
\null\vfill
\begin{flushleft}
Copyright \copyright
%\textit{TITLE}
All rights reserved.
ISBN:
ISBN--13:
\bigskip
\end{flushleft}
\let\cleardoublepage\clearpage
\clearpage
\tableofcontents
\chapter{[Chapter name]}
\begin{figure}
\hspace*{-50pt}
\begin{tabular}{l l l l }
Open & $512$ & P/E & $21.0$ \\
Range & $500-598$ & Mkt.Cap & $100.5$B\\
52 Week high/low & $456-612$ & \# of shares & $256$m\\
VOL/Avg. & 355458760/2914515 & Beta & $1.02$ \\
Ask & $510.25$ & Inst. Own & $45$\% \\
Div/Yield & - & Bid & $511.25$ \\
& & EPS & 25.07
\end{tabular}
\hspace{-50pt}
\caption{TEXT}
\end{figure}
\mainmatter
\sloppy
%Input all of the chapter here
\backmatter
\end{document}
答案1
什么是createspace
?如果我使用geometry
设置,则可行:
\documentclass[11pt,twoside,openright]{memoir}
%\usepackage[size=pocket,trim,bleed]{createspace}
\usepackage[paperwidth=4.25in, paperheight=6.875in,%bindingoffset=.75in
showframe]{geometry}
% the 'bindingoffset' seems huge for such narrow margins
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
% \usepackage{tgtermes}% ..?
\usepackage{mathpazo}
\usepackage[protrusion=true,expansion=true]{microtype}
\setlength{\tabcolsep}{2pt}
\begin{document}
Here is the table:
\begin{table}[!hb]
\footnotesize
\begin{tabular}{@{}l l l l}
Open & $512$ & P/E & $21.0$ \\
Range & $500-598$ & Mkt.Cap & $100.5$B\\
52 Week hi./lo. & $456-612$ & \# of shares & $256$m\\
VOL/Avg. & {\scriptsize 355458760/2914515} & Beta & $1.02$ \\
Ask & $510.25$ & Inst. Own & $45$\% \\
Div/Yield & - & Bid & $511.25$ \\
& & EPS & 25.07
\end{tabular}
\caption{TEXT}
\end{table}
\end{document}