TransWikia.com

Constant space label titleformat

TeX - LaTeX Asked by Im_Rhydon on January 27, 2021

I have trouble with titleformat.

I have modified the title format using titlesec package. I am using the Roman enum by obligation and increasing the number the space increases (see figure). Does anyone know how I can leave that separation constant and independent of the size of the label?

titleformat{section}[hang]{fontsize{10}{11}selectfontbfseries}{thesection.}{20mm}{fontsize{10}{11}selectfontbfseriesMakeUppercase}

Results

enter image description here

2 Answers

I have had this problem for a week approx, so I decided to ask about this forum. I was able to fix it with the makebox command. If anyone has a more elegant solution i would appreciate sharing with us.

Answered by Im_Rhydon on January 27, 2021

In order to use a minimal spacing, you might load eqparbox and use theeqmakebox[tag] command: all such boxes sharing the same tag have a width corresponding to the widest contents.

Unrelated: it's not necessary to specify the hang style – it's the default. Also, needless to repreat the font specifications: the first mandatory argument of titleformat is a global assignment (label + title).

titleformat{section}{fontsize{10}{11}selectfontbfseries}{eqmakebox[Sec][l]{thesection.}}{20mm}{MakeUppercase}

Answered by Bernard on January 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP