0

so I know I should be able to change the spacing with this command:

\titlespacing*{\subsubsection}{0pt}{\parskip}{-\parksip}

But no matter how I change the values the spacing doesn't change at all. Could it be that it has something to do with the fact that I use explicit:

\usepackage[explicit]{titlesec}

Or that my documentclass is report?

\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[explicit]{titlesec}
\usepackage{lmodern}
\usepackage{lipsum}

\newlength\chapnumb
\setlength\chapnumb{2cm} 

\titleformat{\chapter}[block]
{\normalfont\sffamily}{}{0pt}
{\parbox[b]{\chapnumb}{%
   \fontsize{70}{110}\selectfont\thechapter}%
  \parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{%
    \raggedleft%
    \hfill{\Huge#1}\\
    \rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}}}
\titleformat{name=\chapter,numberless}[block]
{\normalfont\sffamily}{}{0pt}
{\parbox[b]{\chapnumb}{%
   \mbox{}}%
  \parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{%
    \raggedleft%
    \hfill{\LARGE#1}\\
    \rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}}}


\titlespacing*{\chapter}{0pt}{0cm}{20pt}
\titlespacing*{\section}{0pt}{0pt}{0pt}
\titlespacing*{\subsection}{0pt}{0pt}{0pt}
\titlespacing*{\subsubsection}{0pt}{\vspace{\parskip}}{\vspace{-\parskip}}

Then in the text I've used it like this:

This shows that there aren't many mutations.

\subsubsection*{YME1L1}
This gene had the following mutation:\\
  • Welcome to TeX.SX! \parskip is not a command for issuing space, but a container for the value used. You perhaps want \vspace{\parskip} and \vspace{-\parskip}. Can you please show a minimal example of code? – egreg May 14 '18 at 12:34
  • Please add the code to your question, but what's necessary are the titlesec related settings, not how you call a subsubsection. – egreg May 14 '18 at 12:46
  • I think i have added all the relevant things – Weronika May 14 '18 at 12:50
  • The value of \parskip is 0pt plus 0.1pt; if you don't change it, there's nothing \vspace{\parskip} can do. – egreg May 14 '18 at 13:09
  • yeah okay, but even if I'd change it to \titlespacing{\subsubsection}{0pt}{-20cm}{-20cm} nothing happens – Weronika May 14 '18 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.