How to specify numbers in LaTeX?

I have a LaTeX document where I would like the numerical processing of numbers (tables and numbers) to be in the same numerical sequence from 1 to x, and not two sequences according to their type. I do not use lists of numbers or tables and do not need.

My document class is a report, and usually my floats have these captions:

\caption{Breakdown of visualisations created.}
\label{tab:Visualisation_By_Types}
+3
source share
4 answers

The differences between the drawing and table environments are very slight - a bit more than they use different counters and are supported in separate sequences.

, {tabular} {figure}, {table}, , . ( ) , \caption, .

:

\makeatletter
\newcounter{unisequence}
\def\ucaption{%
   \ifx\@captype\@undefined
     \@latex@error{\noexpand\ucaption outside float}\@ehd
     \expandafter\@gobble
   \else
     \refstepcounter{unisequence}% <-- the only change from default \caption
     \expandafter\@firstofone
   \fi
   {\@dblarg{\@caption\@captype}}%
}
\def\thetable{\@arabic\c@unisequence}
\def\thefigure{\@arabic\c@unisequence}
\makeatother

\ucaption \caption ( ad lib). (, ?), \the<foo> .

, : , , , (ho, hum).

( afficionados - , \advance TeX, .lof,.lot .aux TeX mouth , , , \@tempcnta \caption, \advance, , . Doh: , !?)

( , ):

: :

\makeatletter
\def\tableandfigurenum{\@tempcnta=0
    \advance\@tempcnta\c@figure
    \advance\@tempcnta\c@table
    \@arabic\@tempcnta}
\let\thetable\tableandfigurenum
\let\thefigure\tableandfigurenum
\makeatother

... {table} {figure} . "/", .

, listoffigures/listoftables, () , , (b) , , , , (c) !a >

+2

- \addtocounter{table}{1} \addtocounter{figure}{1} .

, , , , , cristobalito, .

+3

, . , . , , .

+1

I would use only one type of float (let it be a number), then use the caption package to remove the automatically added text from the header and process it manually.

0
source

Source: https://habr.com/ru/post/1751919/


All Articles