Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I need to eliminate the dots that appear in \listoffigures and \listoftables results - is there an easy way to do that?

EDIT:

I think I need to actually eliminate the dots. Modifying @dotsep via

\begin{document}
\renewcommand{\@dotsep}{10000}
...

does not appear to rectify the problem with revtex - I still get

! Illegal unit of measure (mu inserted)

for each figure, which ends up placing a whole bunch of ptmu's where the dots would normally appear.

sample:

\documentclass[aps,amsmath,amssymb,11pt,nofootinbib]{revtex4-1}
\usepackage{tikz,graphicx,hyperref,slashed,stmaryrd,bbold,eepic,pst-all,pstricks-add,multirow,listings}
\begin{document}
% with or without % \renewcommand{\@dotsep}{10000} % doesn't work
\tableofcontents
\newpage
\listoffigures
\newpage
\listoftables
\newpage
%...later, some figures and tables ala:
\section{a section}
\subsection{another section}
\begin{table}[t]
 \caption[ShortCaption]{BlahBlahBlahCaption}
 \begin{center}
 \begin{tabular}{|c|c|c|}\hline
 some & data & here \\ \hline
 \end{tabular}
 \end{center}
 \label{tab_A}
\end{table}
\newpage
\section{yet another section}
\begin{figure}[t]
 \begin{center}
 \includegraphics[width=\textwidth]{a_png.png}
 \caption[Short]{Longer.}
 \label{fig_A}
 \end{center}
\end{figure}
\end{document}
share|improve this question
1  
The information about revtex was crutial. You should always clarify in your questions, at least, the document class used. –  Gonzalo Medina Dec 6 '11 at 21:59
1  
The revtex4 class doesn't seem to support \listoftables or \listoffigures. Please post a complete minimal version of your code (simply add to the snippet you just posted \begin{document}, \end{document} and how you are producing the lists). –  Gonzalo Medina Dec 6 '11 at 22:13
add comment

2 Answers 2

up vote 12 down vote accepted

To suppress the leading dots from the LoF and LoT, you can redefine \@dotsep:

\documentclass[aps,amsmath,amssymb,11pt,nofootinbib]{revtex4-1}
\usepackage{tikz,graphicx,slashed,stmaryrd,bbold,eepic,pst-all,pstricks-add,multirow,listings}
\usepackage{hyperref}

\begin{document}

\makeatletter
\renewcommand\@dotsep{10000}
\makeatother

\listoffigures
\listoftables
\tableofcontents

\section{Test Section}

\subsection{Test Subsection}
\begin{table}[!ht]
   \caption[Caption in LoT]{Caption in document}
   \centering
   \begin{tabular}{ccc}
    \hline
     some & data & here \\ 
    \hline
   \end{tabular}
   \label{tab_A}
\end{table}

\section{Another Test Section}

\begin{figure}[t]
  \centering
   \includegraphics[width=\textwidth]{a}
   \caption[Short]{Long}
   \label{fig_A}
 \end{figure}

\end{document}

enter image description here

Some remarks:

  1. As my example shows, the redefinition of \@dotsep produces the expected result. However, changing the order of the lists (using for example \tableofcontents before the other two lists) breaks the ToC; this strange behaviour could be the subject of a new question.

  2. You are loading pstricks, which means that if you use pstricks code you can't compile your document directly with pdflatex; this implies that if you are actually going to use pstricks code, you will have to be really careful with the format of your figures (they will have to be in EPS format).

  3. The class revtex4 seems not to implement \listoffigures or \listoftables, so it makes no much sense to use those command with this class. Using revtex4-1, the lists are supported and the solution redefining \@dotsep works as expected.

The strange behaviour of \tableofcontents was, in fact, a bug; I opened a question: Problem with \tableofcontents in revtex4-1 and mforbes provided a quick fix; here's the fix incorporated to your code:

\documentclass[aps,amsmath,amssymb,11pt,nofootinbib]{revtex4-1}
\usepackage{tikz,graphicx,slashed,stmaryrd,bbold,eepic,pst-all,pstricks-add,multirow,listings}
\usepackage{hyperref}

\begin{document}

\makeatletter
\renewcommand\@dotsep{10000}
\makeatother

\tableofcontents

\makeatletter
\let\toc@pre\relax
\let\toc@post\relax
\makeatother 

\listoffigures
\listoftables

\section{Test Section}

\subsection{Test Subsection}
\begin{table}[!ht]
   \caption[Caption in LoT]{Caption in document}
   \centering
   \begin{tabular}{ccc}
    \hline
     some & data & here \\ 
    \hline
   \end{tabular}
   \label{tab_A}
\end{table}

\section{Another Test Section}

\begin{figure}[t]
  \centering
   \includegraphics[width=\textwidth]{a}
   \caption[Short]{Long}
   \label{fig_A}
 \end{figure}

\end{document}
share|improve this answer
    
changing @dotsep does not seem to resolve the problem, and tocloft seems to not play nice with other packages - adding those to Q –  Carl Dec 6 '11 at 21:59
1  
@Carl: Please be a bit more specific as to why changing \@dotsep (note the presence of the backslash character, ``) "does not seem to resolve the problem". E.g., do you get an error message? If so, what's the message? –  Mico Dec 6 '11 at 22:04
1  
@Carl: see my updated answer (the last paragraph). –  Gonzalo Medina Dec 6 '11 at 22:20
    
messes up the ToC - section title collide with formatting; updating minimal example momentarily –  Carl Dec 6 '11 at 22:54
1  
Actually, you can compile pstricks with pdflatex. However, you need to include \usepackage[pdf]{pstricks}, and is also good to use \usepackage{auto-pst-pdf}. Also you will need to compile with the --shell-escape option (note that you should use only trusted packages with this option). Hence you should execute pdflatex --shell-escape file.tex (In windows you just need one hyphen -shel-escape). –  adn Dec 7 '11 at 5:29
show 7 more comments

This is a similar question to Remove dots & Page numbers from TOC.

The "clean" solution is to use the package tocloft and

\renewcommand{\cftdot}{}

to finally remove the dots. In case you are using KOMA-Script, be aware that tocloft does not obey \chapterheadstartvskip.

Minium example: (does not work with revtex4-1 documentclass)

\documentclass{article} 
\usepackage[ngerman]{babel}
\usepackage{tocloft}
\renewcommand{\cftdot}{} 
\begin{document} 
\listoffigures
\listoftables 
\tableofcontents 
\begin{table}
My table
\caption{My table}
\end{table}
\end{document}

(see also http://tex.stackexchange.com/a/55466/9075)

share|improve this answer
    
I really overlooked that the question was intented for revtex4-1 only. I updated my answer accordingly to support others falling in the same trap. –  koppor May 15 '12 at 1:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.