File: floatnames.tex

package info (click to toggle)
latexml 0.8.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,920 kB
  • sloc: xml: 109,048; perl: 30,224; sh: 179; javascript: 28; makefile: 13
file content (46 lines) | stat: -rw-r--r-- 973 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{float}
\usepackage{newfloat}

\newtheorem{thm}{\theoremname}
\newtheorem{example}[thm]{\protect\examplename}
\providecommand{\examplename}{Example}

\DeclareFloatingEnvironment{floppy}
\begin{document}
\begin{example}
	test
\end{example}

\providecommand{\algorithmname}{Algorithm}
\floatstyle{ruled}
\newfloat{algorithm}{thp}{lop}
\floatname{algorithm}{\protect\algorithmname}

\begin{algorithm}
 test
\caption{A test algorithm}
\end{algorithm}

\newfloat{flippy}{thp}{lop}
\begin{flippy}
A Flippy!
\caption{Something that turns\label{flp}}
\end{flippy}
See the \ref{flp}.
\makeatletter
  Check: Macro flippyname \@ifundefined{flippyname}{is NOT}{IS} defined.
\makeatother  

\begin{floppy}
A Floppy!
\caption{Something that flops\label{flp2}}
\end{floppy}
See the \ref{flp2}.
\makeatletter
  Check: Macro floppyname \@ifundefined{floppyname}{is NOT}{IS} defined.
\makeatother  

\end{document}