我对长表有疑问,它们与表格的格式不同。我不完全理解它的工作原理。
代码如下:
\documentclass[
12pt, % tamanho da fonte
a4paper, % tamanho do papel.
english, % idioma adicional para hifenização
brazil % o último idioma é o principal do documento
]{abntex2}
\usepackage{float}
\usepackage{listings}
\usepackage{longtable}
\begin{document}
\selectlanguage{brazil}
\frenchspacing
\OnehalfSpacing
%%% Longtable
\begin{center}
\ABNTEXfontereduzida
\begin{longtable}{ p{.05\textwidth} p{.15\textwidth} p{.70\textwidth} }
\caption{I want this to go up and have a space from the table and to change this font size}\\
\toprule
\textbf{Bit} &
\textbf{Nome} &
\textbf{Descrição} \\
\endfirsthead
\toprule
\textbf{Bit} &
\textbf{Nome} &
\textbf{Descrição}
\\
\endhead
\hline
\multicolumn{3}{l}{Continua...}\\
\endfoot
\multicolumn{3}{c}{I want this to go down and have a space from the table}\\
\endlastfoot
\\
15 &
NACKMOD &
The text seems to be different as well. I think the font size is bigger
\\
14 &
FREE &
Welcome to the website. If you're here, you're likely looking to find random words. Random Word Generator is the perfect tool to help you do this. While this tool isn't a word creator, it is a word generator that will generate random words for a variety of activities or uses.
\\
\\
\bottomrule
\end{longtable}
\end{center}
This is format I wanted the longtable to be.
%%%table
\begin{table}[H]
\ABNTEXfontereduzida
\caption{This is the font style and size I wanted}
\begin{center}
\begin{tabular}{@{}p{1cm}p{2cm}p{12cm}@{}}
\toprule
\textbf{Bit} &
\textbf{Nome} &
\textbf{Descrição}
\\
15 &
NACKMOD &
The text seems to be different as well. I think the font size is smaller.
\\
14 &
FREE &
Welcome to the website. If you're here, you're likely looking to find random words. Random Word Generator is the perfect tool to help you do this. While this tool isn't a word creator, it is a word generator that will generate random words for a variety of activities or uses.
\\
\\
\bottomrule
\end{tabular}
\end{center}
\fonte{This is the distance I wanted}
\end{table}
\end{document}
结果是:
我没有找到表格后有这种间距的任何示例,而且我不知道在 \ABNTEXfontereduzida(这是我正在寻找的格式)中寻找什么。
答案1
使用类abntex2
abntex2.cls (基于memoir
)
(\ABNTEXfontereduzida
定义为 \footnotesize
)
\documentclass[
12pt, % tamanho da fonte
a4paper, % tamanho do papel.
english, % idioma adicional para hifenização
brazil % o último idioma é o principal do documento
]{abntex2}
\usepackage{float}
\usepackage{listings}
\usepackage{longtable}
\begin{document}
\selectlanguage{brazil}
\frenchspacing
\OnehalfSpacing
%%% Longtable
\begin{center}
\captionnamefont{\normalfont\normalsize} % added <<<<<<<<<<<<<<<<<<
\captiontitlefont{\normalfont\normalsize} % added <<<<<<<<<<<<<<<<<<
\setlength{\belowcaptionskip}{20pt}% added <<<<<<<<<<<<<<<<<<
\renewcommand{\baselinestretch}{1}\selectfont% added <<<<<<<<<<<<<<<<<<
\ABNTEXfontereduzida
\begin{longtable}{@{} p{.05\textwidth} p{.15\textwidth} p{.70\textwidth}@{} }
\caption{I want this to go up and have a space from the table}\\
\toprule
\textbf{Bit} &
\textbf{Nome} &
\textbf{Descrição} \\
\endfirsthead
\toprule
\textbf{Bit} &
\textbf{Nome} &
\textbf{Descrição}
\\
\endhead
\hline
\multicolumn{3}{l}{Continua...}\\
\endfoot%
\multicolumn{3}{c}{I want this to go down and have a space from the table \rule{0pt}{6ex}}\\% rule added <<<<<<<<<<<<<<<<<<
\endlastfoot
15 &
NACKMOD &
The text seems to be different as well. I think the font size is bigger
\\
14 &
FREE &
Welcome to the website. If you're here, you're likely looking to find random words. Random Word Generator is the perfect tool to help you do this. While this tool isn't a word creator, it is a word generator that will generate random words for a variety of activities or uses.
\\ \\
\bottomrule
\end{longtable}
\end{center}
This is format I wanted the longtable to be.
%%%table
\begin{table}[H]
\ABNTEXfontereduzida
\caption{This is the font style and size I wanted}
\begin{center}
\begin{tabular}{@{}p{1cm}p{2cm}p{12cm}@{}}
\toprule
\textbf{Bit} &
\textbf{Nome} &
\textbf{Descrição}
\\
15 &
NACKMOD &
The text seems to be different as well. I think the font size is smaller.
\\
14 &
FREE &
Welcome to the website. If you're here, you're likely looking to find random words. Random Word Generator is the perfect tool to help you do this. While this tool isn't a word creator, it is a word generator that will generate random words for a variety of activities or uses.
\\
\\
\bottomrule
\end{tabular}
\end{center}
\fonte{This is the distance I wanted}
\end{table}
\end{document}
在 \rule{0pt}{6ex}
\endfoot
垂直空间。