创建表列表未按预期格式化

创建表列表未按预期格式化

尝试了解某些​​ latex 包与listoftables命令之间是否存在冲突。当我尝试在文档中插入 listoftable 时,表格列表的输出格式不符合预期。这是我的 MWE:

  \documentclass[oneside,a4paper  , 12 pt, titlepage]{book}

\usepackage{amsmath}
\usepackage{hyphenat}
%\usepackage{indentfirst}
%\usepackage{multicol}
%\usepackage{blindtext}
%\usepackage{mathrsfs}
%\usepackage{amssymb}
%\usepackage{mathtools}
\usepackage{hyperref}
%\DisemulatePackage{setspace}
\usepackage{setspace}
\usepackage{graphicx}
\usepackage{float}
\usepackage{caption}
\usepackage{algorithmicx}
\usepackage{algorithm}
\usepackage{listings}
\usepackage{algcompatible}
\usepackage{algpseudocode}
\usepackage{float}
%\usepackage[compact]{titlesec}
\usepackage{parskip}
\usepackage{subcaption}
%\usepackage[pdf]{pstricks}
\usepackage{titlesec}

\usepackage{comment}
%\usepackage[crop=off]{auto-pst-pdf}
%\usepackage{pst-node,graphicx}
%\SpecialCoor
\usepackage[top=4cm, bottom=3cm, left=4cm, right=3cm]{geometry}

\usepackage{arabtex}
%\titlespacing{\chapter}{0pt}{50pt}{<after-sep>}

\usepackage[space]{grffile}

\makeatletter
\setlength{\@fptop}{0pt}
\makeatother

% untuk meletakkan float di daerah tertentu
\usepackage{float}
%\usepackage{pstrick}
%\usepackage{pst-all}
%\usepackage{pstricks-add}
\setlength{\parindent}{0cm}
%\usepackage[pdflatex]{pstricks}
%\usepackage{pstricks}
%\usepackage{auto-pst-pdf}




%\setlength{\textfloatsep}{10pt plus 1.0pt minus 2.0pt}

\hyphenation{be-be-ra-pa}
\hyphenation{per-hi-tu-ngan}
\hyphenation{su-a-tu}
\hyphenation{se-te-ngah}
\hyphenation{hy-dro-di-na-mics}
%
%\renewcommand{\listalgorithmname}{Liste des }

\renewcommand{\figurename}{Gambar}
\renewcommand{\chaptername}{Bab}
\renewcommand{\tablename}{Tabel}
\renewcommand{\bibname}{Referensi}

\captionsetup[figure]{labelsep=period}

\setlength{\abovecaptionskip}{0pt}
\setlength{\belowcaptionskip}{0pt}

\onehalfspacing



%\setlength{\abovedisplayskip}{10pt}
%\setlength{\belowdisplayskip}{10pt}
\setlength{\belowdisplayskip}{0pt} \setlength{\belowdisplayshortskip}{0pt}
\setlength{\abovedisplayskip}{0pt} \setlength{\abovedisplayshortskip}{0pt}

%\titleformat{\chapter}[hang]
%{\normalfont\Large \bfseries\centering}{\centering \chaptertitlename\ \thechapter}{20pt}{\Large}
%
%\titlespacing*{\chapter}{0pt}{-50pt}{40pt}

\hyphenation{e-ner-gi}
\hyphenation{de-ngan}
\hyphenation{di-nya-ta-kan}
\hyphenation{Newton}
\hyphenation{se-lan-jut-nya}
\hyphenation{di-re-pre-sen-ta-si-kan}
\hyphenation{di-li-hat}
\hyphenation{se-pe-rang-kat}

\newcommand*{\justifyheading}{\centering}
\titleformat{\chapter}[display]
  {\normalfont\bfseries\justifyheading\Large}{\chaptertitlename \  \thechapter}
  {14pt}{}
\titleformat{\section}[hang]
  {\normalfont \bfseries \raggedright \large}{\thesection}{1em}{}
\titleformat{\subsection}[hang]
  {\normalfont \bfseries\justifyheading \raggedright
%   \setlength\leftskip{0pt} \setlength\parfillskip{-\rightskip}
  }{\thesubsection}{1em}{}

  \titlespacing*{\chapter}{0pt}{0pt}{20pt}
  \titlespacing{\section}{0pt}{0pt}{0pt}
  \titlespacing{\subsection}{0pt}{0pt}{0pt}


 \newcommand{\xxb}{\boldsymbol{x} - \boldsymbol{x}'}
 \newcommand{\xb}{\boldsymbol{x}}
 \newcommand{\xab}{\boldsymbol{x}'}
 \newcommand{\xijb}{\boldsymbol{x}_i - \boldsymbol{x}_j}

% \setlength{\intextsep}{5pt} % Vertical space above & below [h] floats


% untuk spasi antar paragrapah 
% http://www.tomdesair.com/blog/2013/04/latex-paragraph-spacing-and-indentation/
%The first command sets the indentation to 0 and thus cancels paragraph indentation. The second command sets the height of the trailing blank line. This is done using the LaTeX measure ex. One ex corresponds to the height of a lowercase ‘x’ in the current font style. I use 1.3 because I want the height of a capital letter. The “plus 0.5ex minus 0.3ex” part tells LaTeX that it can increase the height with at most 0.5ex and decrease it with maximum 0.3ex to make a decent layout. This means that the minimal height of the blank line is 1ex and the maximum 1.8ex.
%\setlength{\parskip}{1.3ex plus 0.5ex minus 0.3ex}


%\usepackage{pgfplots}


% Untuk menggambar fungsi gaussian
%\pgfmathdeclarefunction{gauss}{2}{%
%  \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
%}


% untuk menempatkan algoritma outside float
%\DeclareCaptionFormat{algor}{%
%  \hrulefill\par\offinterlineskip\vskip1pt%
%    \textbf{#1#2}#3\offinterlineskip\hrulefill}
%\DeclareCaptionStyle{algori}{singlelinecheck=off,format=algor,labelsep=space}
%\captionsetup[algorithm]{style=algori}

\setlength\parskip{10pt}


\hyphenation{meng-im-ple-men-ta-si-kan}
\hyphenation{me-nya-ta-kan}

\setlength{\belowcaptionskip}{-5pt}
\setlength{\abovecaptionskip}{-5pt}

\setlength{\textfloatsep}{10pt} 
\setlength{\floatsep}{20pt} 
\setlength{\abovecaptionskip}{10pt}
\setlength{\belowcaptionskip}{5pt}



\newcommand{\Scale}[2]{\raisebox{0.ex}{\scalebox{1.0}{$\displaystyle #1_{#2}\;$}}}

\hyphenation{pre-dic-tor}
\hyphenation{me-nyim-pan}
\hyphenation{in-ter-ak-si}

\allowdisplaybreaks

\hyphenation{MATLAB}
\hyphenation{peng-ak-ses-an}
\hyphenation{na-mun}

\hyphenation{predictor-corrector}
\hyphenation{array}
\hyphenation{e-va-lu-a-si}

\hyphenation{re-fe-ren-si}

\hyphenation{prog-ram}

\hyphenation{vo-lu-me}


% Rubah penamaan  daftar gambar dan daftar isi pada table of contents
\renewcommand*\listfigurename{Daftar Gambar}
\renewcommand*\contentsname{Daftar Isi}
\renewcommand{\listoftables}{Daftar Tabel}
% juga penamaan daftar algorithm
\renewcommand{\listalgorithmname}{Daftar Algoritma}

\hyphenation{eks-ter-nal}

\hyphenation{in-fi-ni-te-si-mal}

\hyphenation{i-ni-sia-li-sa-si}

\hyphenation{di-de-fi-ni-si-kan}

\hyphenation{institut}
%\setcounter{secnumdepth}{2}
%\setsecnumdepth{subsection}

\hyphenation{per-sya-ra-tan}

\hyphenation{program}

\hyphenation{meng-ap-li-ka-si-kan}

\hyphenation{difference}

\hyphenation{si-mu-la-si}

\hyphenation{lag-ra-ngi-an}

% \renewcommand{\rmdefault}{pnc}
%\renewcommand{\sfdefault}{pag}
%\renewcommand{\ttdefault}{pcr}

%\renewcommand{\rmdefault}{pbk}

%\renewcommand{\rmdefault}{pzc}


\hyphenation{di-bang-kit-kan}
\renewcommand{\rmdefault}{bch}

\hyphenation{ber-ka-i-tan}

\hyphenation{programming}
\hyphenation{con-vex}
\hyphenation{hull}

\hyphenation{product}
\usepackage{listing}

\hyphenation{ge-ne-ra-tion}

\hyphenation{pe-nga-tu-ran}

\hyphenation{sa-ling}
\hyphenation{doub-le}

\hyphenation{diffe-ren-si-al}

\hyphenation{ber-a-da}


\hyphenation{pe-nga-ruh}
\hyphenation{se-ba-gai}

\hyphenation{boun-da-ry}

\hyphenation{re-gu-ler}

\hyphenation{i-te-ra-si}

\hyphenation{meng-a-ki-bat-kan}

\hyphenation{ge-ra-kan}

\hyphenation{se-di-kit-pun}

\hyphenation{lag-ra-ngian}


% set roman letter for section and sub-section
\renewcommand{\thesection}{\Roman{chapter}.\arabic{section}} 
\renewcommand{\thesubsection}{\Roman{chapter}.\arabic{section}.\arabic{subsection}}
\renewcommand{\thechapter}{\Roman{chapter}}

% Use "Times News Roman" aka  nestxtext letter because  mathpmtx not very likely with Times News Roman 
\usepackage{newtxtext}


% hilangkan  subsection dari table of content
\setcounter{tocdepth}{1}

% ganti penamaan algorithm
\makeatletter
\renewcommand*{\ALG@name}{Algoritma}
\makeatother

% ubah penomoran algoritma dengan menambah nomor dari bab 
\renewcommand{\thealgorithm}{\Roman{chapter}.\arabic{algorithm}}

\hyphenation{per-ban-di-ngan}

%\usepackage{fancyhdr}
%\pagestyle{fancy}
%\chead{\thepage}
%%\fancyhf{}
%\thispagestyle{fancy}


% menghilangkan header dan membuat nomor halaman pada bawah tengah 
\pagestyle{plain}

\hyphenation{di-sa-ji-kan}

\hyphenation{ke-ting-gi-an}

\usepackage{multirow}

\usepackage{multirow,array,booktabs}

%\tablename{Tabel}



\begin{document}
\tableofcontents
\pagebreak
\listoftables

\chapter{Test}
\begin{table}[H]
\begin{tabular}{|c|*{7}{c|}}
\hline
\multirow{2}*{Iterasi} & \multicolumn{3}{c|}{ Ketinggian rata-rata (\%)}& \multicolumn{3}{c|}{Luas Sebaran (\%)} \\ \cline{2-7} 
&  $ \displaystyle \frac{k_1}{k_2} = 0.5$ &  $ \displaystyle \frac{k_1}{k_2}  = 1.5$ &  $ \displaystyle \frac{k_1}{k_2}  = 2.0$ &  $ \displaystyle \frac{k_1}{k_2}   = 2.0$ &  $ \displaystyle \frac{k_1}{k_2} = 2.0$ &  $ \displaystyle \frac{k_1}{k_2} = 2.0$ \\
\hline 
90 & 34.71 & 60.19  & 56.6 &  37.41 &  53.86 & 54.74  \\ 
\hline 
190 & 38.04 & 53.54 & 50.09   & 27.31 & 47.47 & 46.83 \\ 
\hline 
330 & 81.23 & 74.6 & 89.13 & 54.03 & 67.49 & 67.89 \\ 
\hline 
\end{tabular}
\caption{Nilai presentasi ketinggian  dan luas cakupan fluida kedua terhadap ketinggian dan luas cakupan keseluruhan fluida}
\label{tabel  stiffness}
\end{table}
\end{document} 

答案1

不,没有冲突,问题是你正在重新定义\listoftables;你的代码有

\renewcommand{\listoftables}{Daftar Tabel}

这使得\listoftables只产生字符串“Daftar Tabel”; 你想重新定义姓名表格列表,因此您需要将上面的行替换为

\renewcommand{\listtablename}{Daftar Tabel}

相关内容