I'm having some issues with modifying the vertical skip between each entry in my List of Listings. Everything else in the list works perfectly, but I need to increase the vertical skip to 2pt (similar to what’s done for tables and figures, as shown below):
\setlength{\cftbeforefigskip}{2pt} Here's all the code I'm currently using to define the List of Listings:
\renewcommand\lstlistlistingname{List of Listings} \addtocontents{lol}{\protect\addvspace{-1.5cm}} \makeatletter \renewcommand{\l@lstlisting}{\@dottedtocline{1}{0.25in}{0.5in}} % lstlisting format \renewcommand{\l@listing}{\@dottedtocline{1}{0.25in}{0.5in} \vspace{1\baselineskip}} % listing format \makeatother \addtocontents{lol}{\protect\vspace{15pt}} % Defined on each chapter to create space between entries %% List of Listings %% \titlespacing*{\chapter}{0pt}{-0.5cm}{*4} % Adjusts section spacing \phantomsection \label{Listings} \lstlistoflistings \addcontentsline{toc}{chapter}{List of Listings} \addtocontents{toc}{\vspace{2ex}~\hfill\textbf{Page}\par} \label{LastMainPage-roman} Here is an example:
\documentclass{article} \usepackage{graphicx} % Required for inserting images \usepackage{listings} \usepackage{titlesec} \usepackage{minted} \usepackage{tocloft} % For customizing table of contents \usepackage[colorlinks=true, linkcolor=black, citecolor=blue, urlcolor=blue]{hyperref} \usepackage{newfloat} \usepackage{caption} \begin{document} \setcounter{secnumdepth}{2} % 3 for subsubsections \setcounter{tocdepth}{2} \tableofcontents \newpage \renewcommand\lstlistlistingname{List of Listings} % Define the dotline for the List of Listings \makeatletter \renewcommand{\l@listing}{\@dottedtocline{1}{0.25in}{0.5in}} % Customize dotline format \makeatother %% List of Listings %% \phantomsection \addcontentsline{toc}{section}{List of Listings} \lstlistoflistings \newpage \begin{listing}[!ht] \begin{minted}[bgcolor=white, linenos, framesep=2mm, breaklines, fontsize=\small]{python} import sympy as sm import sympy.physics.mechanics as me # this is to get nice looking output sm.init_printing() # h: cross-section depth [m] # b: cross-section width [m] # g: gravity [m/s^2] # l: length of pendulum [m] # rho: density of pendulum [kg/m^3] # constant parameters that define our problem (simple pendulum) h, b, g, l, rho, tau1, tau2 = sm.symbols('h, b, g, l, rho, tau_1, tau_2') m = b * h * l * rho # mass of the pendulum Izz = m * l**2 / 12 # moment of inertia of the pendulum around the z-axis (both N and A) # generalized coordinates (time dependent) q1, q2 = me.dynamicsymbols('q1, q2') # time variable (used for derivatives) t = me.dynamicsymbols._t \end{minted} \caption{Test 1} \label{listing:1} \end{listing} \begin{listing}[!ht] \begin{minted}[bgcolor=white, linenos, framesep=2mm, breaklines, fontsize=\small]{python} import sympy as sm import sympy.physics.mechanics as me # this is to get nice looking output sm.init_printing() # h: cross-section depth [m] # b: cross-section width [m] # g: gravity [m/s^2] # l: length of pendulum [m] # rho: density of pendulum [kg/m^3] # constant parameters that define our problem (simple pendulum) h, b, g, l, rho, tau1, tau2 = sm.symbols('h, b, g, l, rho, tau_1, tau_2') m = b * h * l * rho # mass of the pendulum Izz = m * l**2 / 12 # moment of inertia of the pendulum around the z-axis (both N and A) # generalized coordinates (time dependent) q1, q2 = me.dynamicsymbols('q1, q2') # time variable (used for derivatives) t = me.dynamicsymbols._t \end{minted} \caption{Test 2} \label{listing:2} \end{listing} \end{document} 
