1

Consider the code

\documentclass{article}
\usepackage{xcolor,graphicx}
\usepackage{transparent}
\usepackage{tocloft}

% To change the LOF layout
\renewcommand{\listfigurename}{LIST OF FIGURES}
%% The next two command centers the title, sets its font, adds vertical space afterwards and typesets 'Page' above the page numbers.
\renewcommand{\cftloftitlefont}{\hfill\Large\bfseries}
\renewcommand{\cftafterloftitle}{%
  \hfill \vspace*\baselineskip\par \mbox{}\hfill{\normalfont {\bf Page}}}
\setlength{\cftbeforefigskip}{1em} % more space between entries

\begin{document}
\thispagestyle{empty}

\begin{figure}[!htb]
\centering
\includegraphics[width=10em,height=10em]{example-image}\llap{\texttransparent{0.5}{\color{blue}\rule{10em}{10em}}}
\caption{Blue image}
\end{figure}

\newpage
\listoffigures
\end{document}

which produces the output

enter image description here

enter image description here

QUESTION: I would like to adjust (reduce in this case) the vertical space between the label "Page" and the 1st (only) item in the actual list. How may I do this?

Thank you.

Remark: I have tried inserting \vspace*{-10pt} in various places to no avail. I have checked the documentation but I didn't discover the answer.

5
  • 1
    I answered your original question, noting that it was not clear to me. You have now edited the question which makes my answer look a little foolish. If you make an edit please indicate in the text what the edit is. You have now asked 167 questions and never tried to answer anybody else's question. Surely by now you must be able to try and do that. Jan 30, 2022 at 19:00
  • @Peter Wilson Dear Sir, why do you express yourself so rudely to other people? This, I respectfully say, is not the first time.
    – DDS
    Jan 30, 2022 at 21:21
  • @Peter Wilson And for your information---take it the way you wish---I edited my question to make it more clear, as it was misinterpreted by the first person to answer it, who revised his answer in accordance with the request I was trying to convey. I then edited the post to eliminate confusion. Your post came in around that time.
    – DDS
    Jan 30, 2022 at 21:24
  • @Peter Wilson Finally, in response to your last comment---I have no interest in answering questions, only in posing them. In the future, please feel free not to answer my questions if they cause you grief. I do, however, thank you for all the help you have given me in the past.
    – DDS
    Jan 30, 2022 at 21:30
  • 1
    I do not think that I was rude. I asked you note where in a question you had edited it and gave a reason why I asked. I always felt that this is a site where folk helped each other. It takes time and effort to try and help someone with a problem. As you are not prepared to do that for anybody else I don't see why anyone should waste their time trying to help you. One interpretation of you only asking questions is that you are posing challenges with no interest in the answers, just doing it to amuse yourself. Goodbye. Feb 1, 2022 at 18:02

2 Answers 2

2

I'm not sure what you are after. Do you want the "Page" to be nearer to the "LIST OF FIGURES" or nearer to the first entry in the list, or perhaps both?

% lofprob2.tex  SE 631937
\documentclass{article}
\usepackage{xcolor,graphicx}
\usepackage{transparent}
\usepackage{tocloft}

\usepackage{comment}

%%% YOUR CODE FROM A PREVIOUS ANSWER
% To change the LOF layout
\renewcommand{\listfigurename}{LIST OF FIGURES}
%% The next two command centers the title, sets its font, adds vertical space afterwards and typesets 'Page' above the page numbers.
\renewcommand{\cftloftitlefont}{\hfill\Large\bfseries}
\renewcommand{\cftafterloftitle}{%
  \hfill \vspace*\baselineskip\par \mbox{}\hfill{\normalfont \textbf{Page}}}
\setlength{\cftbeforefigskip}{1em} % more space between entries

%%% MY REVISED CODE

%% move Page upwards nearer LIST OF FIGURES
\renewcommand{\cftafterloftitle}{%
  \hfill \vspace*{0.5\baselineskip}\par \mbox{}\hfill{\normalfont \textbf{Page}}}
%% Move Page upwards and reduce space before figure entries 
\renewcommand{\cftafterloftitle}{%
  \hfill \vspace*{0.5\baselineskip}\par \mbox{}\hfill{\normalfont \textbf{Page}}\vspace*{-1.5\baselineskip}}
\begin{document}
\thispagestyle{empty}
%\listoffigures
%\newpage
\begin{figure}[!htb]
\centering
\includegraphics[width=10em,height=10em]{example-image}\llap{\texttransparent{0.5}{\color{blue}\rule{10em}{10em}}}
\caption{Blue image}
\end{figure}

\begin{figure}
  \centering
  A FIGURE
  \caption{An illustration}
\end{figure}

\listoffigures
\end{document}

The above MWE deals with both of these.

enter image description here

Do not use {\bf text}, it was denigrated years ago, use \textbf{text}.

2
  • In response to your question: I am looking only for "Page" to be nearer to the first entry. From practicing with the code before posting my question, I am able to adjust the vertical space between the entries themselves, as well as the vertical space between the title and where the actual list begins. I had not been able to adjust the space between "Page" and the list though.
    – DDS
    Jan 29, 2022 at 19:44
  • Thank you for your very helpful annotated answer. It seems that the code \textbf{Page}}\vspace*{-1.5\baselineskip} affects only the spacing between "Page" and the start of the list---which is what I was looking for. Thanks again.
    – DDS
    Jan 29, 2022 at 20:29
1

UPDATE Add some negative space at the end of \renewcommand{\cftafterloftitle}

e

Using \setlength{\cftbeforefigskip}{4em} % more space between entries

f

\documentclass{article}
\usepackage{xcolor,graphicx}
\usepackage{transparent}
\usepackage{tocloft}

% To change the LOF layout
\renewcommand{\listfigurename}{LIST OF FIGURES}
%% The next two command centers the title, sets its font, adds vertical space afterwards and typesets 'Page' above the page numbers.
\renewcommand{\cftloftitlefont}{\hfill\Large\bfseries}
\renewcommand{\cftafterloftitle}{%
    \hfill \vspace*\baselineskip\par
     \mbox{}\hfill{\normalfont \textbf{Page}}
     \vspace*{\dimexpr -1em -\cftbeforefigskip}% added <<<<<<<<<<<<<<<<
 }

\setlength{\cftbeforefigskip}{1em} % more space between entries


    \begin{document}
        \thispagestyle{empty}
        
        \begin{figure}[!htb]
            \centering
            \includegraphics[width=10em,height=10em]{example-image}\llap{\texttransparent{0.5}{\color{blue}\rule{10em}{10em}}}
            \caption{Blue image}
        \end{figure}
    
            \begin{figure}[!htb]
        \centering
        \includegraphics[width=10em,height=10em]{example-image}\llap{\texttransparent{0.5}{\color{red}\rule{10em}{10em}}}
        \caption{Red image}
    \end{figure}
        \begin{figure}[!htb]
    \centering
    \includegraphics[width=10em,height=10em]{example-image}\llap{\texttransparent{0.5}{\color{green}\rule{10em}{10em}}}
    \caption{Green image}
\end{figure}

    
    \newpage
    \listoffigures
\end{document}
6
  • I'm sorry for the confusion, but when I said "list of figures" in the MWE, I meant the actual list, not the title. I expect to edit the post to make this more clear. (I am trying to reduce the space between the label Page and the 1st (only) item in the list).
    – DDS
    Jan 29, 2022 at 18:26
  • I just edited the post to make this more clear.
    – DDS
    Jan 29, 2022 at 18:29
  • @mlchristians Everything its fine. I update the answer. Jan 29, 2022 at 19:03
  • Thank you for the update. I want to make sure I am interpreting your answer correctly: Is it \vspace*{-12pt}% added <<<<<<<<<<<<<<<< that affects only what I am asking for? i.e., the vertical space between the word "Page" and the first (and only) item? And, that you inserted \setlength{\cftbeforefigskip}{1em} % more space between entries as extra information to adjust the vertical space between the entries (in the event of multiple entries)? I ask, because the last command also affects the spacing between "Page" and the actual list as well.
    – DDS
    Jan 29, 2022 at 19:50
  • @mlchristians I updated the answer to take care of the inter relationship. (And several figures). Try \setlength{\cftbeforefigskip}{4em} Jan 29, 2022 at 20:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .