删除长表边距数字

删除长表边距数字

我正在处理我的简历,并使用表格,longtable以便表格可以在需要时流动到下一页,但当我使用它时,左边距数字会不断弹出。有办法删除它吗?它似乎在计算我页面上的条目数。包括示例。我longtable使表格跨越多页,但是当我复制并粘贴它时,数字不存在——假设我使用的代码有问题?

在此处输入图片描述 在此处输入图片描述

\documentclass[a4paper,10.5pt]{article}
\usepackage[english]{babel}\usepackage[utf8]{inputenc}
\usepackage{garamondx}
\usepackage{ragged2e}
\usepackage{blindtext}

% Header
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[headsep=65pt]{geometry}
\geometry{
  top=1.2in,            % <-- you want to adjust this
  inner=0.75in,
  outer=0.75in,
  bottom=1in,
  headheight=17ex,       % <-- and this
  headsep=2ex,          % <-- and this
}
\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{fancy}     
\fancyhead{Text} % clear all header fields
\fancyhead[R]{}
\fancyhead[L]{}

%tabular
\usepackage{longtable}
\usepackage{adjustbox}
\newcounter{rowcount}
\setcounter{rowcount}{0}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{array}
\usepackage{refcount}

\makeatletter
\newcommand{\fakelabel}[1]{%
  \protected@xdef\@currentlabel{#1}%
}
\makeatother


\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\newcolumntype{N}[2]{>{\raggedleft\refstepcounter{rowcount}\fakelabel{\therowcount}\makebox[3em][r]{\color{black}\the\numexpr\getrefnumber{#1}+1 - \value{rowcount}.)}\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#2}}

\begin{document}


\subsubsection*{Conferences}


%Table

\begin{tabular}{ N{presentations}{1cm} L{12.5cm} R{3cm}}

&National Conference on Undergraduate Research (NCUR). Memphis, TN.& April 2017.
\tabularnewline
&McNair National Research Conference. Delavan, WI. October &2016.
\end{tabular}\label{presentations}
%
\subsubsection*{test}
\begin{tabular}{ N{conferences}{1cm} L{15.5cm}}
&National Conference on Undergraduate Research (NCUR). Memphis, TN. April 2017.
\tabularnewline
&McNair National Research Conference. Delavan, WI. October 2016.
\end{tabular}\label{conferences}
%
\subsubsection*{Compendium}
{\setlength{\extrarowheight}{5pt}%
\begin{longtable}{ N{compendium}{1cm} L{15.5cm}}
& \justifying Microwave Microbes – A Study of Food Industry Microwaves, Original Research, UW-Stout, Menomonie, WI. Microbiological research into the cleanliness of microwaves at a local area restaurant and heartiness of microbes to withstand multiple prolonged discharges of microwaves within a commercial microwave oven. Advisor: Dr. Jim Burrit. Co-Researchers: Abigail Broderdorf and Craig Warminski. Research Spring, 2014.
\tabularnewline
& \justifying An Introduction to GMOs, Original Work, UW-Stout, Menomonie, WI. Introductory literature investigating the practices of introducing genetically modified food products into agricultural systems and the claimed effects on personal health and economic downfalls with supportive literature on how to curtail possible devastating side effects of improper introduction to ecology. (Recovered media file). Literature Review Spring 2013.
%\caption{Academics Table} % needs to go inside longtable environment
\label{tab:myfirstlongtable}
\end{longtable}
\ref{tab:myfirstlongtable}
\label{compendium}}

\end{document}

答案1

6截图中的标记来自以下行

\ref{tab:myfirstlongtable}

在您的代码中。只需将其注释掉或删除即可……

因此,以下代码略有改动

\documentclass[a4paper,10.5pt]{article}
\usepackage[english]{babel}\usepackage[utf8]{inputenc}
\usepackage{garamondx}
\usepackage{ragged2e}
\usepackage{blindtext}

% Header
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[headsep=65pt]{geometry}
\geometry{
  top=1.2in,            % <-- you want to adjust this
  inner=0.75in,
  outer=0.75in,
  bottom=1in,
  headheight=17ex,       % <-- and this
  headsep=2ex,          % <-- and this
}
\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{fancy}     
\fancyhead{Text} % clear all header fields
\fancyhead[R]{}
\fancyhead[L]{}

%tabular
\usepackage{longtable}
\usepackage{adjustbox}
\newcounter{rowcount}
\setcounter{rowcount}{0}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{array}
\usepackage{refcount}

\makeatletter
\newcommand{\fakelabel}[1]{%
  \protected@xdef\@currentlabel{#1}%
}
\makeatother


\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\newcolumntype{N}[2]{>{\raggedleft\refstepcounter{rowcount}\fakelabel{\therowcount}\makebox[3em][r]{\color{black}\the\numexpr\getrefnumber{#1}+1 - \value{rowcount}.)}\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#2}}

\begin{document}


\subsubsection*{Conferences}


%Table

\begin{tabular}{ N{presentations}{1cm} L{12.5cm} R{3cm}}

&National Conference on Undergraduate Research (NCUR). Memphis, TN.& April 2017.
\tabularnewline
&McNair National Research Conference. Delavan, WI. October &2016.
\end{tabular}\label{presentations}
%
\subsubsection*{test}
\begin{tabular}{ N{conferences}{1cm} L{15.5cm}}
&National Conference on Undergraduate Research (NCUR). Memphis, TN. April 2017.
\tabularnewline
&McNair National Research Conference. Delavan, WI. October 2016.
\end{tabular}\label{conferences}
%
\subsubsection*{Compendium}
{\setlength{\extrarowheight}{5pt}%
\begin{longtable}{ N{compendium}{1cm} L{15.5cm}}
& \justifying Microwave Microbes – A Study of Food Industry Microwaves, Original Research, UW-Stout, Menomonie, WI. Microbiological research into the cleanliness of microwaves at a local area restaurant and heartiness of microbes to withstand multiple prolonged discharges of microwaves within a commercial microwave oven. Advisor: Dr. Jim Burrit. Co-Researchers: Abigail Broderdorf and Craig Warminski. Research Spring, 2014.
\tabularnewline
& \justifying An Introduction to GMOs, Original Work, UW-Stout, Menomonie, WI. Introductory literature investigating the practices of introducing genetically modified food products into agricultural systems and the claimed effects on personal health and economic downfalls with supportive literature on how to curtail possible devastating side effects of improper introduction to ecology. (Recovered media file). Literature Review Spring 2013.
%\caption{Academics Table} % needs to go inside longtable environment
\label{tab:myfirstlongtable}
\end{longtable}
%\ref{tab:myfirstlongtable} % <=================================================
\label{compendium}}

\end{document}

结果是:

在此处输入图片描述

不需要的6已经消失了(它是对标签的引用,\label{tab:myfirstlongtable}结果是6

相关内容