3

How can I avoid this extra dot in caption that appears without removing \renewcommand{\thesection}{\arabic{section}.}

\documentclass[12pt,a4paper]{article}
\usepackage[croatian]{babel}
\usepackage{float} 

\renewcommand{\thesection}{\arabic{section}.}

\floatstyle{plain}
\newfloat{graphic}{thp}{lop}[section] 
\floatname{graphic}{Grafikon}

\begin{document}

\begin{graphic}
\caption{some fancy \texttt{caption} }
\label{fig:flowchart}
\end{graphic}

\end{document}
  • With a KOMA-class, you could use numbers=enddot as global option, giving you the desired dot. – Johannes_B Dec 4 '13 at 9:21
1

You don't want to add the period to \thesection, but rather to modify how the section titles are typeset, adding a period after the number; unfortunately there's no “official” user interface for this, but it's not difficult either.

\documentclass[12pt,a4paper]{article}
\usepackage[croatian]{babel}
\usepackage{float}

\makeatletter
\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname.\quad}
\makeatother

\floatstyle{plain}
\newfloat{graphic}{thp}{lop}[section]
\floatname{graphic}{Grafikon}

\begin{document}
\section{Grafikon}
\begin{graphic}
\caption{some fancy \texttt{caption}}
\label{fig:flowchart}
\end{graphic}

\end{document}

enter image description here

  • Ty, I forgot to mention one more thing. Which is that my current default figures have one more dot after number and before colon. Like this: Figure 1.1.: fancy caption – msvalina Dec 4 '13 at 14:28
  • @msvalina Have you redefined also \thefigure? – egreg Dec 4 '13 at 16:41
  • Yes I redefined it in same way: \renewcommand{\thefigure}{\arabic{section}.\arabic{figure}.} – msvalina Dec 4 '13 at 20:51
  • @msvalina Don't. – egreg Dec 4 '13 at 20:51
  • Yeah but that is desired style, but I don't know how to get that extra dot on graphic float? – msvalina Dec 4 '13 at 21:05

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.