doc: add pandoc-tablenos header

This commit is contained in:
Matthias Ringwald 2021-04-07 22:14:24 +02:00
parent 369e4864f3
commit 318dcc17c6

View File

@ -135,6 +135,31 @@ morekeywords={*, btstack_timer_source_t, btstack_data_source_t, uint32_t, uint16
\newcommand{\MSYS}{\urlfoot{www.mingw.org/wiki/msys}{MSYS}}
\newcommand{\MINGW}{\urlfoot{www.mingw.org}{MINGW32}}
%% pandoc-tablenos: required package
\usepackage{caption}
%% pandoc-tablenos: environment to disable table caption prefixes
\makeatletter
\newcounter{tableno}
\newenvironment{tablenos:no-prefix-table-caption}{
\caption@ifcompatibility{}{
\let\oldthetable\thetable
\let\oldtheHtable\theHtable
\renewcommand{\thetable}{tableno:\thetableno}
\renewcommand{\theHtable}{tableno:\thetableno}
\stepcounter{tableno}
\captionsetup{labelformat=empty}
}
}{
\caption@ifcompatibility{}{
\captionsetup{labelformat=default}
\let\thetable\oldthetable
\let\theHtable\oldtheHtable
\addtocounter{table}{-1}
}
}
\makeatother
%level -1: part, 0: chapter, 1: section, etc.
\setcounter{tocdepth}{3}