在论文包中,我必须更改\ref
格式\textnormal{\ref{tab8} \vspace{-3mm}}
限制。我试过了\renewcommand
,但没有用。下图解释了这个问题。任何帮助都将不胜感激。类文件将在此名称 Tez Yazım Şablonu(Latex) 下的链接下找到。
http://fbe.gsu.edu.tr/tr/belgeler/tez-yazimi
可以添加示例代码来显示额外的间距:
\documentclass[12pt,oneandhalf,chaparabic,ie,phd,eng,oneside,pntc]{gsufbe}
\usepackage{appendix}
\usepackage{graphicx}
\usepackage[fleqn]{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{enumitem}
\usepackage{amsthm}
\usepackage{rotating}
\usepackage{booktabs}
\usepackage{array}
\usepackage[round]{natbib}
\usepackage{har2nat}
\usepackage{algorithmic}
\usepackage[ruled,noline]{algorithm2e}
\usepackage{titlesec}
\usepackage{multirow}
\usepackage{footnote}
\usepackage[section]{placeins}
\usepackage{float}
\usepackage{letltxmacro}
\RequirePackage{tikz}
\usetikzlibrary{%
arrows, backgrounds, calc,%
patterns, positioning, shapes.geometric%
}
\RequirePackage{pgfcalendar}
\makesavenoteenv{tabular}
\makesavenoteenv{table}
% End of Latex Packages
%
% Any personal Latex definition, declaration, etc.
\makeatletter
\let\old@includegraphics\includegraphics
\renewcommand{\includegraphics}[2][,]{%
\setbox9=\hbox{\old@includegraphics[#1]{#2}}%
\ifdim\wd9>\textwidth
\old@includegraphics[#1,width=\textwidth]{#2}%
\else
\old@includegraphics[#1]{#2}%
\fi%
}
\makeatother
\renewcommand\ref[1]{\textnormal{#1\vspace{-10mm}}}
\makeatletter
\def\upcase{\expandafter\makeupcase}
\def\makeupcase#1{\uppercase{#1}}
\newcommand{\FOO}{\textsc{\upcase foo}}
\makeatother
\author{NAZMİ ŞENER}
\title{Stochastic Programming Formulations of Discrete Hub Covering Location Problem}
\trtitle{Kes\.{I}kl\.{I} Ana Dağıtım Üssü Yerleş\.{I}m Kapsama Problemler\.{I}n\.{I}n Stokast\.{I}k Programlama \.{I}le Formülasyonları}
\date{May 2017}
\supervisor[prof]{JOHN DOE}
\departmentofsupervisor{Industrial Engineering Department}
\cosupervisor[assocprof]{JANE DOE}
\departmentofcosupervisor{Management}
\committeememberi[assistprof]{JAMES DOE}
\affiliationi{Industrial Engineering Department}
\affiliationii{Industrial Engineering Department}
\committeememberiii[assocprof]{RICK DOE}
\affiliationiii{Computer Engineering Department}
\keywords{STEEVE}
\motscles{STEEVE}
\anahtarklm{STEEVE}
\abstract{In recent years, .}
\oz{Son }
\acknowledgments{ Write your personal acknowledgements here.
}
\setlength{\jot}{10pt}
%%% !!! This two should be last lines before \begin{document}, do no move them !!!
\usepackage[draft,pdftex]{hyperref}
%\usepackage[all]{hypcap}
\usepackage[labelsep=space,hypcap]{caption}
\usepackage{subcaption}
\begin{document}
\addtolength{\textheight}{1.5cm}
% Preliminaries
\newlength\myindent
\setlength\myindent{6em}
\newcommand\bindent{%
\begingroup
\setlength{\itemindent}{\myindent}
\addtolength{\algorithmicindent}{\myindent}
}
\newcommand\eindent{\endgroup}
\begin{preliminaries}
\end{preliminaries}
\newtheorem{thm}{Definition}[chapter]
\renewcommand{\thethm}{\arabic{chapter}.\arabic{thm}}
\newtheorem{prp}{Proposition}[chapter]
\renewcommand{\theprp}{\arabic{chapter}.\arabic{prp}}
\newenvironment{prf}{\noindent{\bf Proof}}{$\hfill \Box$ \vspace{10pt}}
\chapter{Results}
\thispagestyle{empty}
summarizes the model without taking care of inter-hub discount factor. It is obvious that
when the coverage radius becomes smaller, the performance measure also decreases. Another insight acquired from the table is there is no strong evidence to explain the relationship between hub opening cost and performance measure. On the other hand Table \ref{tab9} when standard deviation increases, the meaningfulness of stochastic modeling is also increasing. Solution times are generally higher when the radius is big. Same way, when the standard deviation increases, solution times is also significantly increased. This relationship also occurs between hub opening costs and the solution times. \\
\begin{table}[ht]
\caption{Comparison of the Mean Performance of the Model for Log-N Distribution with Different Levels of Variance and Mean Solution Times (sec.) (Inter-hub Discount Factor=1)}
\centering
\label{tab9}
\begin{tabular}{|c|c|r|r|r|r|r|r|}
\hline
\parbox[t]{2mm}{\multirow{2}{*}{\rotatebox[]{90}{HOC}}}& \multirow{2}{*}{$R$} &\multicolumn{2}{c|}{Log-N($\sigma=0.5c(i,k))$}&\multicolumn{2}{c|}{Log-N($\sigma=c(i,k))$}&\multicolumn{2}{c|}{Log-N($\sigma=2c(i,k))$}\\
\cline{3-8}
& & {\small \% VSS/EEV} & Time & {\small \% VSS/EEV} & Time & {\small \% VSS/EEV} & Time \\
\hline
\parbox[t]{2mm}{\multirow{5}{*}{\rotatebox[]{90}{10,000}}} & 0.7 $\Delta$ & 5.273 & 12154.3 & 13.967 & 26614.2 & 18.899 & 62474.8 \\
& 0.6 $\Delta$ & 5.178 & 9648.4 & 12.034 & 31224.9 & 15.988 & 58075.4 \\
& 0.5 $\Delta$ & 5.223 & 6802.9 & 10.176 & 16327.2 & 12.279 & 48422.3 \\
& 0.4 $\Delta$ & 3.865 & 5007.8 & 10.905 & 12250.5 & 13.025 & 39201.2 \\
& 0.3 $\Delta$ & 3.403 & 2404.2 & 7.107 & 6617.9 & 13.009 & 17396.5 \\ \hline
\parbox[t]{2mm}{\multirow{5}{*}{\rotatebox[]{90}{20,000}}} & 0.7 $\Delta$ & 6.647 & 5561.3 & 13.689 & 16166.6 & 18.584 & 26126.5 \\
& 0.6 $\Delta$ & 6.004 & 4569.7 & 11.363 & 17305.8 & 15.363 & 31249.1 \\
& 0.5 $\Delta$ & 5.731 & 3721.2 & 12.065 & 12084.9 & 13.452 & 24147.5 \\
& 0.4 $\Delta$ & 5.129 & 2805.6 & 9.424 & 7313.3 & 11.441 & 19086.6 \\
& 0.3 $\Delta$ & 2.532 & 1938.1 & 4.933 & 4965.2 & 10.328 & 7444.4 \\ \hline
\hline
\end{tabular}
\end{table}
\bibliography{thesis_references}
\bibliographystyle{dcu}
\appendix
\thispagestyle{empty}
\end{document}
答案1
类文件和 zip 文件中的示例文档显示了多处错误使用\vspace
。图像中显示的额外空间来自其中之一,而不是来自\ref
。
如果没有发布示例,很难猜测究竟是什么产生了图像,但这显示了类似的效果,使用thesis.tex
示例文件中的定义。
\documentclass{article}
\usepackage{amssymb}
\newenvironment{prf}{\noindent{\bf Proof}}{$\hfill \Box$ \vspace{10pt}}
\begin{document}
\begin{prf}
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
\end{prf}
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
One two three four five six seven eight nine ten.
\end{document}
请注意,10pt 垂直空间不是紧接在后面,\Box
而是在下一段的第一行之后。图像中显示的额外空间同样位于段落的第一行之后,与 无关\ref
。
自从将示例添加到问题中以来,它就产生了错误
! LaTeX Error: There's no line here to end.
作为一个快速紧急修复,我在类文件中进行了\\
更改\mbox{}\\
然后它产生
! Undefined control sequence.
\showresume ...ndhalfspacing \fi \fi \@resumetext
所以我补充说
\def\@resumetext{}
到类文件的顶部
然后它运行没有错误,但发出警告
Underfull \hbox (badness 10000) in paragraph at lines 106--108
这是因为\\
文档中那一行被误用了
所以我改变了
nd the solution times. \\
到
nd the solution times.
然后,正如 egreg 所评论的那样,由于段落中间存在虚假空格,因此会出现很大的空格\thechapter
所以改变
\if@rmnchp \def\thechapter{\Roman{chapter}}
\else \def\thechapter{\vspace*{10pt} \arabic{chapter}} \fi
到
\if@rmnchp \def\thechapter{\Roman{chapter}}
\else \def\thechapter{\arabic{chapter}} \fi
然后页面看起来像
这修复了空间
但你仍然会收到其他严重警告
尤其
(\end occurred inside a group at level 1)
### simple group (level 1) entered at line 1061 ({)
### bottom level
(\end occurred when \iftrue on line 96 was incomplete)
这意味着该类实际上不应该用于当前状态下的任何实际文档。
答案2
该班级有
\if@rmnchp \def\thechapter{\Roman{chapter}}
\else \def\thechapter{\vspace*{10pt} \arabic{chapter}} \fi
这意味着每一个在使用时\thechapter
,除了伪水平空间外,还会在章节号出现的行后添加 10pt 的垂直空间。\ref{<label>}
当要引用的数字基于时\thechapter
,例如图号,此类用法是隐含的。
更好的代码:
\if@rmnchp
\def\thechapter{\Roman{chapter}}
\else
\def\thechapter{\arabic{chapter}}
\fi