Text Formattingminitoc and section header

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ynchoir
Posts: 6
Joined: Sat Aug 28, 2010 2:50 am

minitoc and section header

Post by ynchoir »

Hi all,

I need to use minitoc package for my article. However, when I include it in the preamble, then it overrides the section format I need. In the example below, I need a section header to look like "I. Data" while the sentence should read "Section I is about our data set." However, when I include \usepackage{minitoc} option, then the header changes to "I Data", ignoring the period after I.

I would appreciate if anyone can bring my missing dot back while still using the minitoc package. Thanks a lot!
Yosh

Code: Select all

\documentclass[11pt]{article}
\usepackage[doublespacing]{setspace}

% for partial TOC
\usepackage{minitoc}

\makeatletter
\renewcommand{\@seccntformat}[1]{\@nameuse{the#1}.~{}}
\renewcommand{\thesection}{\Roman{section}}
\makeatother

\begin{document}

\clearpage
test 

\section{Data}\label{sec:data}

Section \ref{sec:data} is about our data set.

\end{document}
Last edited by Stefan Kottwitz on Thu May 18, 2023 3:39 pm, edited 1 time in total.
Reason: code marked

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply