-
Notifications
You must be signed in to change notification settings - Fork 6
/
figureSeries.dtx
1107 lines (1107 loc) · 47.1 KB
/
figureSeries.dtx
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% \iffalse meta-comment
%
% Copyright (C) 2014, 2015 by Thomas Weise <http://www.it-weise.de>
%
% This file may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, either version 1.3 of this license
% or (at your option) any later version. The latest version of this
% license is in:
%
% http://www.latex-project.org/lppl.txt
%
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{figureSeries.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{figureSeries}
%<*package>
[2015/07/13 v0.9.4 Provides a floating, figure*-like construct that can break over multiple pages]
%</package>
%
%<*driver>
\documentclass{ltxdoc}
\usepackage{figureSeries}[2014/06/17]
\usepackage[%
breaklinks=true,%
colorlinks=true,%
urlcolor=black,%
menucolor=black,%
linkcolor=black,%
bookmarks=true,%
bookmarksopen=false,%
hyperfootnotes=true,%
citecolor=black,%
filecolor=black,%
pdfkeywords={LaTeX, package, figureSeries}
]{hyperref}%
\usepackage{breakurl}%
\usepackage[square,numbers,comma,sort&compress]{natbib}%
%
\usepackage{float}%
\floatstyle{ruled}%
\newfloat{example}{thp}{lop}%
\floatname{example}{Example}%
\usepackage{verbatim}%
%
%
\usepackage{graphicx}%
\usepackage{subcaption}%
%
\EnableCrossrefs
\CodelineIndex
\RecordChanges
%
%
\begin{document}
\DocInput{figureSeries.dtx}
\PrintChanges
\PrintIndex
\end{document}
%</driver>
% \fi
%
% \CheckSum{145}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
% Digits \0\1\2\3\4\5\6\7\8\9
% Exclamation \! Double quote \" Hash (number) \#
% Dollar \$ Percent \% Ampersand \&
% Acute accent \' Left paren \( Right paren \)
% Asterisk \* Plus \+ Comma \,
% Minus \- Point \. Solidus \/
% Colon \: Semicolon \; Less than \<
% Equals \= Greater than \> Question mark \?
% Commercial at \@ Left bracket \[ Backslash \\
% Right bracket \] Circumflex \^ Underscore \_
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
%
% \changes{v0.9.0}{2014/06/17}{Initial Draft Version}
% \changes{v0.9.1}{2014/06/18}{Better examples showing the shortcomings of the package (in particular in two-column mode).}
% \changes{v0.9.2}{2015/02/13}{Shortcomings in two-column mode fixed: vertical column starts are now aligned well.}
% \changes{v0.9.3}{2015/07/07}{Failed attempt to fix ``! LaTeX Error: Float(s) lost.'' errors.}
% \changes{v0.9.4}{2015/07/13}{Hopefully a working fix for ``! LaTeX Error: Float(s) lost.'' errors by using the package ``cuted.``}
%
% \GetFileInfo{figureSeries.dtx}
%
% \DoNotIndex{\def,\if,\fi}
%
%
% \title{The \textsf{figureSeries} package\thanks{This document
% corresponds to \textsf{figureSeries}~\fileversion, dated \filedate.}}
% \author{Thomas Weise\\%
% \resizebox{0.95\textwidth}{!}{\parbox{1.5\textwidth}{\centering%
% {Nature Inspired Computation and Applications Laboratory}\\%
% {USTC-Birmingham Joint Research Institute in Intelligent Computation and Its Applications}\\%
% {School of Computer Science and Technology (SCST)}\\%
% {University of Science and Technology of China (USTC)}\\%
% {West Campus, Science and Technology Building, West Wing, Room 601}\\
% {Huangshan Road/Feixi Road, Hefei 230027, Anhui, China}\\%
% {\texttt{[email protected]} $\cdot$ \texttt{[email protected]}} $\cdot$ \texttt{http://www.it-weise.de/}\\%
% }}}%
% \date{\today}
%
% \maketitle
%
% \begin{abstract}
% This package provides a first working version of a figure*-like construct, which
% can contain arbitrarily many sub-figures, (somewhat) float, and automatically break
% over multiple pages if necessary. The most current source code of this package
% can be found online at \url{http://github.com/thomasWeise/figureSeries}. Some
% discussions and additional information may be found at \url{http://www.it-weise.de}.
% \end{abstract}
%
% \setcounter{tocdepth}{2}
% \tableofcontents
%
% \section{Introduction}%
%
% \subsection{Addressed Problem and Use Case}%
% \LaTeX\ documents can contain floating objects such as figures
% or tables. ``floating'' here means that you insert a figure somewhere
% in your text and \LaTeX\ will find the best place where to put it for
% you, a place where it fits nicely into the overall layout of the
% document. Sometimes it is desirable that a figure contains several
% sub-figures. Let's say you want to group several diagrams which show
% related information and which all have the same structure.
%
% In \LaTeX, a floating object (composed of its contents and potentially
% a caption) can occupy at most one full page, meaning that it cannot
% contain any page break. This, in turn, means that the number of (or
% better the space for) sub-figures that can be hosted inside a figure
% is limited as well. But what if we have too many sub-figures?
% What it the sub-figures do not fit on one page, into one
% floating object, into one |\begin{figure}...\end{figure}|? (Again: The
% required space includes the space for the sub-figures themselves, their
% captions, the vertical space between rows of sub-figures, and the caption
% of the hosting figure.)
%
% We can somewhat solve this issue by splitting the hosting figure
% into several separate figures, each containing a feasible amount of sub-figures.
% This needs to be done by hand, because we need to compile the document
% and fix and compile and fix and so on, since we usually not know beforehand
% how many sub-figures fit into one figure. This is not nice.
%
% Problems may occur when our \LaTeX\ document is created automatically and
% has an \emph{a priori} unknown number of sub-figures in a figure. There is
% no way to automatically determine how many sub-figures we can place into a
% figure. Even if we would know the sub-figure sizes, we cannot compute the
% space occupied by their captions beforehand (well, without replicating \LaTeX, that is\dots).
% Trust me, I have tried this (in the software project \emph{TSPSuite}~\cite{WCTLTCMY2014BOAAOSFFTTSP}).
% Similar use cases have been reported in~\cite{K2009SOAFOMP,AV2011SSAMPBP}.
%
% Also, \LaTeX\ is limited in terms of the number of floating objects
% it can handle, I believe the limit is 18 and can be increased
% using the package |morefloats|~\cite{MH2012TMP}, but this is a true problem when creating
% many sub-figures automatically. You may have so many sub-figures that
% splitting them into multiple (hosting) figures leads to too many (hosting)
% figures. Or you just end up with too many floating objects which are all
% laid out at once at the end of a chapter or something or which otherwise make
% your text layout look odd and unbalanced.
%
% \subsection{Provided Functionality}%
% This package provides%
% \begin{enumerate}%
% \item a facility to include an arbitrary number of (potentially differently-sized) sub-figures into a figure*-like construct,%
% \item the ability to make this figure*-like construct look as if it was a floating object, which%
% \item works well in both one-column and two-column documents.%
% \end{enumerate}%
%
% \section{Usage}%
%
% \subsection{Loading the Package}
% Load this package using
% \begin{quote}
% |\RequirePackage{figureSeries}|
% \end{quote}
% This will automatically load the packages |caption|~\cite{S2011TCPCCIFE}, |subcaption|~\cite{S2013TSPSFSC}, |afterpage|~\cite{C1995TAPECATPB}, and |cuted|~\cite{T2012TCP}.
%
% \subsection{Provided Macros}\label{sec:providedMacros}%
%
% Here we discuss the macros that can directly be accessed by the user to make use of the package's
% functionality. The implementation of these macros is given in Section~\ref{sec:userInterfaceMacros}
% and several examples can be found in Section~\ref{sec:examples}.
%
% \DescribeMacro{\figureSeriesElement}
% The macro |\figureSeriesElement|\marg{caption}\marg{contents} inserts an element of the figure series, i.e., one sub-figure.
% Its first argument is the caption of the element and may contain a |\label|.
% The second argument is the graphic to print. It could, e.g., be a call to |\includegraphic|
% from the |graphicx| package~\cite{CR2014PITGB}.
%
% \DescribeMacro{\figureSeriesRow}
% |\figureSeriesElement|\marg{contents} inserts a new row of elements (sub-figures) into
% the figure series. Its single argument should thus contain a sequence of |\figureSeriesElement|s.
% As a consequence of this architecture, each sub-figure belongs to one row and no sub-figure can
% span multiple rows.
%
% \DescribeMacro{\figureSeriesHere}
% The macro |\figureSeriesHere|\marg{caption}\marg{contents} tries to insert a (non-floating) figure
% series at the current position in the document. This means that it may begin wherever, well, it
% is used, e.g., in the middle of the page.
%
% The macro has two mandatory parameters, the caption and the contents. The caption will be
% be put at the beginning of the figure series, which is different from the normal behavior of
% captions in |\begin{figure*}...\end{figure*}| or |\begin{figure}...\end{figure}|. The reason
% is that a figure series may span over multiple pages and having the caption at the end may
% be awkward and confusing. The caption text may contain a |\label|.
%
% The contents of a figure series should be a sequence of |\figureSeriesRow| calls.
%
% Since figure series are page-wide elements, starting them in the middle of the page only works
% in one-column documents. In two-column documents, any figure series will behave as specified in
% macro |\figureSeriesFloat| below.
%
% \DescribeMacro{\figureSeriesFloat}
% The macro |\figureSeriesFloat|\marg{caption}\marg{contents} macro takes the same parameters
% as |\figureSeriesHere|, but has a float-like behavior. By using the |\afterpage| command of
% |afterpage| package~\cite{C1995TAPECATPB}, we let it start at the following page. This is different from \LaTeX'
% normal floating behavior, but as good as we can get with page-breaking objects, I think.
%
% \subsection{Examples}\label{sec:examples}%
%
% Here we provide a set of examples for the use of the package. Each example demonstrates another
% facet of the package and, at the same time, serves as test case. Instead of using |\includegraphic|,
% we simply stretch single letters via |\resizebox| and use them ``sub-figures''. This is good enough
% to see how the layout works and allows us to generate arbitrarily-sized placeholders for figures.
%
% In order to create some placeholder text in the examples, we use the |lipsum| command from package
% |lipsum|~\cite{H2914LAT1POLIDT}, which prints pseudo-Latin text known
% as ``Lorem Ipsum'' (see \url{http://en.wikipedia.org/wiki/Lorem_ipsum}).
%
% \subsubsection{Non-Floating Figure Series in Single-Column Document}%
% In Example~\ref{ex:llncs} we place a non-floating figure series consisting of two rows of
% figures into a one-column document using Springer's document class |llncs|~\cite{SPRINGERLNCS}.
% The result can be seen in Figure~\ref{ex:llncs:res} and compared with a floating version in Figure~\ref{ex:llncs2:res},
% which represents the floating version of this example (given in Example~\ref{ex:llncs2}).
%
% \begin{example}%
% \begin{small}\verbatiminput{examples/example_1_LNCS.tex}\end{small}%
% \caption{An example using the one-column \texttt{llncs} class, rendered as Figure~\ref{ex:llncs:res}.}%
% \label{ex:llncs}%
% \end{example}%
%
% \begin{figure}%
% \begin{center}%
% \strut\hfill\strut%
% \subcaptionbox{Page 1 of the pdf compiled from Example~\ref{ex:llncs}.
% }{%
% \fbox{\includegraphics[page=1,width=0.412225\textwidth,trim=1.75in 1.65in 1.75in 1.5in,clip]{examples/example_1_LNCS.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 2 of the pdf compiled from Example~\ref{ex:llncs}.
% }{%
% \fbox{\includegraphics[page=2,width=0.412225\textwidth,trim=1.75in 1.65in 1.75in 1.5in,clip]{examples/example_1_LNCS.pdf}}%
% }%
% \strut\hfill\strut%
% \\%
% \strut\hfill\strut%
% \subcaptionbox{Page 3 of the pdf compiled from Example~\ref{ex:llncs}.
% }{%
% \fbox{\includegraphics[page=3,width=0.412225\textwidth,trim=1.75in 1.65in 1.75in 1.5in,clip]{examples/example_1_LNCS.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 4 of the pdf compiled from Example~\ref{ex:llncs}.
% }{%
% \fbox{\includegraphics[page=4,width=0.412225\textwidth,trim=1.75in 1.65in 1.75in 1.5in,clip]{examples/example_1_LNCS.pdf}}%
% }%
% \strut\hfill\strut%
% \caption{The rendered result of Example~\ref{ex:llncs} (with trimmed page margins): %
% A \texttt{figureSeries} starts at the bottom of a page and extends to the top of the next page.}%
% \label{ex:llncs:res}%
% \end{center}%
% \end{figure}%
%
% \afterpage{\clearpage}%
%
% \subsubsection{Floating Figure Series in Two-Column Document}
% We now put a floating figure series into a two-column document using the
% |IEEEtran|~\cite{IEEETRAN} class in Example~\ref{ex:ieeetran1}.
% This new figure series has five rows of sub-figures and
% should span over multiple pages. The two-column text continues directly
% after the figure series. The rendered results of this example are given
% in Figure~\ref{ex:ieeetran1:res}.
%
% \begin{example}%
% \begin{small}\verbatiminput{examples/example_2_IEEEtran.tex}\end{small}%
% \caption{An example using the two-column \texttt{IEEEtrans} class, rendered as Figure~\ref{ex:ieeetran1:res}.}%
% \label{ex:ieeetran1}%
% \end{example}%
%
% \begin{figure}%
% \begin{center}%
% \strut\hfill\strut%
% \subcaptionbox{Page 1 of the pdf compiled from Example~\ref{ex:ieeetran1}.
% }{%
% \fbox{\includegraphics[page=1,width=0.45\textwidth,trim=0.65in 0.35in 0.65in 0.75in,clip]{examples/example_2_IEEEtran.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 2 of the pdf compiled from Example~\ref{ex:ieeetran1}.
% }{%
% \fbox{\includegraphics[page=2,width=0.45\textwidth,trim=0.65in 0.35in 0.65in 0.75in,clip]{examples/example_2_IEEEtran.pdf}}%
% }%
% \strut\hfill\strut%
% \\%
% \strut\hfill\strut%
% \subcaptionbox{Page 3 of the pdf compiled from Example~\ref{ex:ieeetran1}.
% }{%
% \fbox{\includegraphics[page=3,width=0.45\textwidth,trim=0.65in 0.35in 0.65in 0.75in,clip]{examples/example_2_IEEEtran.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 4 of the pdf compiled from Example~\ref{ex:ieeetran1}.
% }{%
% \fbox{\includegraphics[page=4,width=0.45\textwidth,trim=0.65in 0.35in 0.65in 0.75in,clip]{examples/example_2_IEEEtran.pdf}}%
% }%
% \strut\hfill\strut%
% \caption{The rendered result of Example~\ref{ex:ieeetran1} (with trimmed page margins): %
% A floating \texttt{figureSeries} in two-column mode.}%
% \label{ex:ieeetran1:res}%
% \end{center}%
% \end{figure}%
%
% \afterpage{\clearpage}%
%
% \subsubsection{Coalescing Figure Series in Two-Column Document}
% In Example~\ref{ex:ieeetran2}, we put several floating figure series close to
% each other into a two-column document, again using the |IEEEtran| class~\cite{IEEETRAN}.
% The bodies of the figure series should coalesce without losing their captions, figure
% numbers, or identities. Since they coalesce, no empty pages are produced in between.
% The result is rendered as Figure~\ref{ex:ieeetran2:res}.
%
% \begin{example}%
% \begin{small}\verbatiminput{examples/example_3_IEEEtran.tex}\end{small}%
% \caption{An example using the two-column \texttt{IEEEtrans} class and two
% coalescing figure series, rendered as Figure~\ref{ex:ieeetran2:res}.}%
% \label{ex:ieeetran2}%
% \end{example}%
%
% \begin{figure}%
% \begin{center}%
% \strut\hfill\strut%
% \subcaptionbox{Page 1 of the pdf compiled from Example~\ref{ex:ieeetran2}.
% }{%
% \fbox{\includegraphics[page=1,width=0.45\textwidth,trim=0.65in 0.35in 0.65in 0.75in,clip]{examples/example_3_IEEEtran.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 2 of the pdf compiled from Example~\ref{ex:ieeetran2}.
% }{%
% \fbox{\includegraphics[page=2,width=0.45\textwidth,trim=0.65in 0.35in 0.65in 0.75in,clip]{examples/example_3_IEEEtran.pdf}}%
% }%
% \strut\hfill\strut%
% \\%
% \strut\hfill\strut%
% \subcaptionbox{Page 3 of the pdf compiled from Example~\ref{ex:ieeetran2}.
% }{%
% \fbox{\includegraphics[page=3,width=0.45\textwidth,trim=0.65in 0.35in 0.65in 0.75in,clip]{examples/example_3_IEEEtran.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 4 of the pdf compiled from Example~\ref{ex:ieeetran2}.
% }{%
% \fbox{\includegraphics[page=4,width=0.45\textwidth,trim=0.65in 0.35in 0.65in 0.75in,clip]{examples/example_3_IEEEtran.pdf}}%
% }%
% \strut\hfill\strut%
% \caption{The rendered result of Example~\ref{ex:ieeetran2} (with trimmed page margins): %
% Two floating \texttt{figureSeries} in two-column mode are coalesced, without using their caption and identies.}%
% \label{ex:ieeetran2:res}%
% \end{center}%
% \end{figure}%
%
% {\clearpage}%
%
% \subsubsection{Two-Column Document with \texttt{sig-alternate}}
% In the following Example~\ref{ex:acm}, we test the |figureSeries| together for documents
% using ACM's |sig-alternate|~\cite{ACMSIGALTERNATE} document class.
%
% \begin{example}%
% \begin{small}\verbatiminput{examples/example_4_sigAlternate.tex}\end{small}%
% \caption{An example featuring the two-column \texttt{sig-alternate} class. %
% The results are rendered as Figure~\ref{ex:acm:res}.}%
% \label{ex:acm}%
% \end{example}%
%
% \begin{figure}%
% \begin{center}%
% \strut\hfill\strut%
% \subcaptionbox{Page 1 of the pdf compiled from Example~\ref{ex:acm}.
% }{%
% \fbox{\includegraphics[page=1,width=0.45\textwidth,trim=0.5in 0.5in 0.5in 0.5in,clip]{examples/example_4_sigAlternate.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 2 of the pdf compiled from Example~\ref{ex:acm}.
% }{%
% \fbox{\includegraphics[page=2,width=0.45\textwidth,trim=0.5in 0.5in 0.5in 0.5in,clip]{examples/example_4_sigAlternate.pdf}}%
% }%
% \strut\hfill\strut%
% \\%
% \strut\hfill\strut%
% \subcaptionbox{Page 3 of the pdf compiled from Example~\ref{ex:acm}.
% }{%
% \fbox{\includegraphics[page=3,width=0.45\textwidth,trim=0.5in 0.5in 0.5in 0.5in,clip]{examples/example_4_sigAlternate.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 4 of the pdf compiled from Example~\ref{ex:acm}.
% }{%
% \fbox{\includegraphics[page=4,width=0.45\textwidth,trim=0.5in 0.5in 0.5in 0.5in,clip]{examples/example_4_sigAlternate.pdf}}%
% }%
% \strut\hfill\strut%
% \caption{The rendered result of Example~\ref{ex:acm} (with trimmed page margins): %
% It works for \texttt{sig-alternate} too.}%
% \label{ex:acm:res}%
% \end{center}%
% \end{figure}%
%
%
% \afterpage{\clearpage}%
%
% \subsubsection{Many Small Sub-Figures in Two-Column Document}
% In the following Example~\ref{ex:acm2} (again based on ACM's |sig-alternate|~\cite{ACMSIGALTERNATE}
% document class), we put many small sub-figures into a figure. Also, the last paragraph of the text
% in the example is a reference to one of the sub-figures. The results are rendered as Figure~\ref{ex:acm2:res}.
%
% \begin{example}%
% \begin{small}\verbatiminput{examples/example_5_sigAlternate.tex}\end{small}%
% \caption{An example featuring the two-column \texttt{sig-alternate} class with a reference to sub-figure. %
% The results are rendered as Figure~\ref{ex:acm2:res}.}%
% \label{ex:acm2}%
% \end{example}%
%
% \begin{figure}%
% \begin{center}%
% \strut\hfill\strut%
% \subcaptionbox{Page 1 of the pdf compiled from Example~\ref{ex:acm2}.
% }{%
% \fbox{\includegraphics[page=1,width=0.45\textwidth,trim=0.5in 0.5in 0.5in 0.5in,clip]{examples/example_5_sigAlternate.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 2 of the pdf compiled from Example~\ref{ex:acm2}.
% }{%
% \fbox{\includegraphics[page=2,width=0.45\textwidth,trim=0.5in 0.5in 0.5in 0.5in,clip]{examples/example_5_sigAlternate.pdf}}%
% }%
% \strut\hfill\strut%
% \\%
% \strut\hfill\strut%
% \subcaptionbox{Page 3 of the pdf compiled from Example~\ref{ex:acm2}.
% }{%
% \fbox{\includegraphics[page=3,width=0.45\textwidth,trim=0.5in 0.5in 0.5in 0.5in,clip]{examples/example_5_sigAlternate.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 4 of the pdf compiled from Example~\ref{ex:acm2}.
% }{%
% \fbox{\includegraphics[page=4,width=0.45\textwidth,trim=0.5in 0.5in 0.5in 0.5in,clip]{examples/example_5_sigAlternate.pdf}}%
% }%
% \strut\hfill\strut%
% \caption{The rendered result of Example~\ref{ex:acm2} (with trimmed page margins): %
% Many small sub-figures nicely fill a page.}%
% \label{ex:acm2:res}%
% \end{center}%
% \end{figure}%
%
%
% \afterpage{\clearpage}%
%
% \subsubsection{Two \texttt{figureSeries} Separated by Text in Two-Column Document}
% In the following Example~\ref{ex:acm3} (again based on ACM's |sig-alternate|~\cite{ACMSIGALTERNATE}
% document class), we put two |figureSeries| which are separated by text.
% The results are rendered as Figure~\ref{ex:acm3:res}.
%
% \begin{example}%
% \begin{small}\verbatiminput{examples/example_6_sigAlternate.tex}\end{small}%
% \caption{An example featuring two figure series separated by text. %
% The results are rendered as Figure~\ref{ex:acm3:res}.}%
% \label{ex:acm3}%
% \end{example}%
%
% \begin{figure}%
% \begin{center}%
% \strut\hfill\strut%
% \subcaptionbox{Page 2 of the pdf compiled from Example~\ref{ex:acm3}.
% }{%
% \fbox{\includegraphics[page=2,width=0.45\textwidth,trim=0.5in 0.5in 0.5in 0.5in,clip]{examples/example_6_sigAlternate.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 3 of the pdf compiled from Example~\ref{ex:acm3}.
% }{%
% \fbox{\includegraphics[page=3,width=0.45\textwidth,trim=0.5in 0.5in 0.5in 0.5in,clip]{examples/example_6_sigAlternate.pdf}}%
% }%
% \strut\hfill\strut%
% \\%
% \strut\hfill\strut%
% \subcaptionbox{Page 6 of the pdf compiled from Example~\ref{ex:acm3}.
% }{%
% \fbox{\includegraphics[page=6,width=0.45\textwidth,trim=0.5in 0.5in 0.5in 0.5in,clip]{examples/example_6_sigAlternate.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 8 of the pdf compiled from Example~\ref{ex:acm3}.
% }{%
% \fbox{\includegraphics[page=8,width=0.45\textwidth,trim=0.5in 0.5in 0.5in 0.5in,clip]{examples/example_6_sigAlternate.pdf}}%
% }%
% \strut\hfill\strut%
% \caption{The rendered result of Example~\ref{ex:acm3} (with trimmed page margins): %
% Two \texttt{figureSeries} are separated by text.}%
% \label{ex:acm3:res}%
% \end{center}%
% \end{figure}%
%
% \afterpage{\clearpage}%
%
% \subsubsection{One Floating \texttt{figureSeries} in a Single-Column Document}
% In the following Example~\ref{ex:llncs2} (based on Springer's |llncs|~\cite{SPRINGERLNCS}
% document class), we let the figure series from Example~\ref{ex:llncs} float.
% You can compare the rendered in Figure~\ref{ex:llncs2:res} with those in Figure~\ref{ex:llncs:res}.
%
% \begin{example}%
% \begin{small}\verbatiminput{examples/example_7_LNCS.tex}\end{small}%
% \caption{An example using the one-column \texttt{llncs} class, rendered as Figure~\ref{ex:llncs2:res}.}%
% \label{ex:llncs2}%
% \end{example}%
%
% \begin{figure}%
% \begin{center}%
% \strut\hfill\strut%
% \subcaptionbox{Page 1 of the pdf compiled from Example~\ref{ex:llncs2}.
% }{%
% \fbox{\includegraphics[page=1,width=0.412225\textwidth,trim=1.75in 1.65in 1.75in 1.5in,clip]{examples/example_7_LNCS.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 2 of the pdf compiled from Example~\ref{ex:llncs2}.
% }{%
% \fbox{\includegraphics[page=2,width=0.412225\textwidth,trim=1.75in 1.65in 1.75in 1.5in,clip]{examples/example_7_LNCS.pdf}}%
% }%
% \strut\hfill\strut%
% \\%
% \strut\hfill\strut%
% \subcaptionbox{Page 3 of the pdf compiled from Example~\ref{ex:llncs2}.
% }{%
% \fbox{\includegraphics[page=3,width=0.412225\textwidth,trim=1.75in 1.65in 1.75in 1.5in,clip]{examples/example_7_LNCS.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 4 of the pdf compiled from Example~\ref{ex:llncs2}.
% }{%
% \fbox{\includegraphics[page=4,width=0.412225\textwidth,trim=1.75in 1.65in 1.75in 1.5in,clip]{examples/example_7_LNCS.pdf}}%
% }%
% \strut\hfill\strut%
% \caption{The rendered result of Example~\ref{ex:llncs2} (with trimmed page margins): %
% A \texttt{figureSeries} floating in one-column mode (see Example~\ref{ex:llncs} for the non-floating version).}%
% \label{ex:llncs2:res}%
% \end{center}%
% \end{figure}%
%
% \afterpage{\clearpage}%
%
% \subsubsection{Mixed \texttt{figureSeries}, \texttt{figure}, and \texttt{figure*}}
% \begin{sloppypar}%
% In Example~\ref{ex:mixed}, we mix |figureSeries| with |figure| and |figure*|
% environments. Something like this would cause |! LaTeX Error: Float(s) lost.| errors
% in version |0.9.2| of our package. Due to some modifications, this particular document
% now compiles, but the errors still appear in other documents.
% \end{sloppypar}%
% We again use the |IEEEtran| class~\cite{IEEETRAN}.
% The result is rendered as Figure~\ref{ex:mixed:res}. As you can see, the ordering
% of the figures in the current version of our package (|0.9.4|) is far from perfect,
% but at least the document compiles. In a productive environment, you would have more
% text between your figures, so hopefully, such layout problems would not occur.
%
% \begin{example}%
% \begin{small}\verbatiminput{examples/example_8_IEEEtran.tex}\end{small}%
% \caption{An example for a mixture of \texttt{figureSeries}, \texttt{figure}, and \texttt{figure*},
% Figure~\ref{ex:mixed:res}.}%
% \label{ex:mixed}%
% \end{example}%
%
% \begin{figure}%
% \begin{center}%
% \strut\hfill\strut%
% \subcaptionbox{Page 1 of the pdf compiled from Example~\ref{ex:mixed}.
% }{%
% \fbox{\includegraphics[page=1,width=0.45\textwidth,trim=0.65in 0.35in 0.65in 0.75in,clip]{examples/example_8_IEEEtran.pdf}}%
% }%
% \strut\hfill\strut\hfill\strut%
% \subcaptionbox{Page 2 of the pdf compiled from Example~\ref{ex:mixed}.
% }{%
% \fbox{\includegraphics[page=2,width=0.45\textwidth,trim=0.65in 0.35in 0.65in 0.75in,clip]{examples/example_8_IEEEtran.pdf}}%
% }%
% \strut\hfill\strut%
% \\%
% \strut\hfill\strut%
% \subcaptionbox{Page 3 of the pdf compiled from Example~\ref{ex:mixed}.
% }{%
% \fbox{\includegraphics[page=3,width=0.45\textwidth,trim=0.65in 0.35in 0.65in 0.75in,clip]{examples/example_8_IEEEtran.pdf}}%
% }%
% \strut\hfill\strut%
% \caption{The rendered result of Example~\ref{ex:mixed} (with trimmed page margins): %
% a mixture of \texttt{figureSeries}, \texttt{figure}, and \texttt{figure*}.}%
% \label{ex:mixed:res}%
% \end{center}%
% \end{figure}%
%
% \clearpage%
%
%
%
% \StopEventually{}
%
% \section{Implementation}%
%
% The names of all macros for public use are prefixed with |figureSeries|.
% The names of all internal elements of the package are prefixed with |@figSer@|.
% This naming convention should prevent any name clashes with other packages.
%
% \subsection{Loading of Required Packages}%
%
% Our |figureSeries| package requires three other packages:%
% \begin{enumerate}%
% \item The package |caption|~\cite{S2011TCPCCIFE} for the caption of the |figureSeries|.%
% \item The package |subcaption|~\cite{S2013TSPSFSC} for sub-figure layout and captions.%
% \item The package |afterpage|~\cite{C1995TAPECATPB} for creating the impression that our |figureSeries| can float.%
% \item The package |cuted|~\cite{T2012TCP} for laying out the figure series in two-column mode.
% \end{enumerate}%
% \begin{macrocode}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Preamble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
% \end{macrocode}
%
% \subsubsection{Loading \texttt{caption} and \texttt{subcaption}}%
%
% We rely on the packages |caption| and |subcaption| to render the |figureSeries|'
% and sub-figure's captions. However, Springer's |llncs.cls|~\cite{SPRINGERLNCS} seems %
% to be incompatible with the |subcaption| package~\cite{S2013TSPSFSC}\footnote{According to %
% \url{http://www.michaelshell.org/tex/ieeetran/}, IEEE's |IEEEtrans.cls|~\cite{IEEETRAN}
% may also be incompatible, but it seems to works here.}.%
% Yet, we need that package for giving nice captions to the sub-figures.
% Therefore, we load the |caption| package~\cite{S2011TCPCCIFE} with option
% |compatibility=false| (which can solve this issue) if necessary.
% This is behavior governed by the Boolean flag \linebreak[3]|@figSer@captionCompatibilityFalse|, initialized to |false|.
%
% \begin{macrocode}
\newif\if@figSer@captionCompatibilityFalse%
\@figSer@captionCompatibilityFalsefalse%
%
% \end{macrocode}
%
% After the flag has been allocated and set to |false|, we check for Springer's |llncs.cls| (in a crude way).
% In case of |llncs.cls|, if we do not set the option |compatibility| of the |caption| package to |false|,
% we will get the error \emph{! Package caption Error: The `subcaption' package does not work correctly %
% in compatibility mode.}%
%
% \begin{macrocode}
\ifx\spnewtheorem\@undefined%
\else%
\@figSer@captionCompatibilityFalsetrue%
\fi%
%
% \end{macrocode}
%
% Now we can load the |caption|~\cite{S2011TCPCCIFE} package with the right ``|compatibility|'' setting.
%
% \begin{macrocode}
\if@figSer@captionCompatibilityFalse%
\RequirePackage[compatibility=false]{caption}%
\else%
\RequirePackage{caption}%
\fi%
% \end{macrocode}
%
% We now load the |subcaption| package~\cite{S2013TSPSFSC} and set the caption style for sub-figures to arabic.
% The reason is that we may have many sub-figures, too many for indexes ranging only from
% \emph{a)} to \emph{z)}. By using arabic numbers, we are on the safe side.
%
% \begin{macrocode}
\RequirePackage{subcaption}%
\DeclareCaptionSubType*[arabic]{figure}%
% \end{macrocode}
%
% \subsubsection{Loading the \texttt{afterpage} Package}%
%
% Floating objects cannot break across pages, so we cannot really make our figure series
% float. However, by using the |afterpage|~\cite{C1995TAPECATPB} package, we can make it look as if
% it was floating by rendering it on the next page.
%
% \begin{macrocode}
\RequirePackage{afterpage}%
% \end{macrocode}
%
% \subsubsection{Loading the \texttt{cuted} Package}%
%
% In two-column mode, we need to temporarily switch to one-column mode to lay out the
% figure series. Therefore, we use the |strip| environment from package |cuted|~\cite{T2012TCP}.
%
% \begin{macrocode}
\RequirePackage{cuted}%
% \end{macrocode}
%
% \subsection{User Interface Macros}\label{sec:userInterfaceMacros}%
% This section contains the macros which the package user can/should access, i.e., those
% macros which have been shortly discussed in Section~\ref{sec:providedMacros}.%
%
% \begin{macrocode}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%% User Interface %%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
% \end{macrocode}
%
% \begin{macro}{\figureSeriesElement}
% The macro |\figureSeriesElement|\marg{caption}\marg{contents} inserts an element of the figure series, i.e., one sub-figure.
% Its first argument is the caption of the element. This argument also may contain a |\label|.
% The second argument is the graphic to print. It could, e.g., be a call to |\includegraphic|
% from the |graphicx| package~\cite{CR2014PITGB}.
%
% Spacing between sub-figures is handled dynamically via |\hfill|.
% We make sure to tell the |subcaption| that the sub-figures are sub-figures by
% setting |@captype| appropriately.
% \begin{macrocode}
%%
%% Insert an element of the figure series, i.e., a sub-figure.
%% #1 the caption of the sub-figure, potentially including a |\label|
%% #2 the contents of the sub-figure, likely a call to |\includegraphicx|
\long\gdef\figureSeriesElement#1#2{%
\strut\hfill\strut%
\edef\@captype{figure}%
\subcaptionbox{#1}{#2}%
\strut\hfill\strut%
}%
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\figureSeriesRow}\phantomsection\label{sec:figureSeriesRow}
% |\figureSeriesRow|\marg{contents} inserts a new row of elements (sub-figures) into
% the figure series. Its single argument should thus contain a sequence of |\figureSeriesElement|s.
% Since sub-figures are placed row-by-row, no sub-figure can span multiple rows.
%
% If the overall caption of the figure series has not yet been printed, it would be stored in
% |\@figSer@delayedCaption|. Thus, if |\@figSer@delayedCaption| is not empty,
% this macro first prints the delayed caption and then the contents of the row together in
% a |\parbox| command which is wrapped into a |center| environment.
%
% Again, the reason why we need to delay caption printing is that \LaTeX's page breaking algorithm
% may separate the caption from the first figure row if the figure series starts close to the bottom
% of the page. Thus, we pack the delayed caption together with the first row of figures into a
% |\parbox| command. |\parbox|es are (hopefully) not affected by page breaking and (hopefully) always
% remain as solid objects. If the caption has already been printed, i.e.,
% |\@figSer@delayedCaption| is empty, we do not need the awkward |\parbox|.
%
% Plain |\parbox|es, however, seem to not work we with the breaking of the |figureSeries| into
% multiple pieces to facilitate page breaking later on. Thus, we (need to?) wrap everything into
% a |center| environment.
%
% \begin{macrocode}
%%
%% Insert a row of sub-figures into the figure series.
%% #1 the contents of the rows: arbitrarily many calls to |\figureSeriesElement|
\long\gdef\figureSeriesRow#1{%
\begin{center}%
\ifx\@figSer@delayedCaption\@empty%
\vspace\abovecaptionskip%
\strut#1\strut%
\else%
\parbox[b]{\textwidth}{%
\@figSer@delayedCaption%
\global\let\@figSer@delayedCaption\@empty%
\vspace\abovecaptionskip%
\strut#1\strut%
}%
\fi%
\end{center}%
}%
% \end{macrocode}
% \end{macro}
%
% The following two macros, |\figureSeriesHere| and |\figureSeriesFloat| act as switches
% that decide which special situation applies, as different things have to be done for
% \begin{enumerate}%
% \item the non-floating (``Here'') or floating (``Float'') case, as well as for%
% \item one-column or two-column documents.%
% \end{enumerate}%
%
% \begin{macro}{\figureSeriesHere}
% The macro |\figureSeriesHere|\marg{caption}\marg{contents} tries to insert a non-floating figure
% series at the current position in the document. This means that it may begin wherever, well, it
% is defined, e.g., in the middle of the page.
%
% The macro has two mandatory parameters, the caption and the contents. The caption will (different from
% usual |figure|s) be put at the beginning of the figure series. The reason is that a figure series
% may span over multiple pages and having the caption at the end may be awkward. The caption text
% may contain a |\label|.
%
% The contents of a figure series should be a sequence of |\figureSeriesRow| calls.
%
% Since figure series are page-wide elements, starting them in the middle of the page only works
% in one-column documents. In two-column documents, any figure series will behave as specified in
% macro |\figureSeriesFloat| below.
%
% Furthermore, if a floating figure series is already pending for insertion, we will not print
% the current figure series here but attach it to the floating one. This will ensure that the
% order in which figure series' are printed is always the same as the order in which they are
% declared.
% \begin{macrocode}
%%
%% Insert a figure series right here, i.e., at the location at which this
%% function is called.
%% Exceptions: This function will behave like \figureSeriesFloat if 1. a
%% floating figure series already pending and 2. in two-column documents.
%% #1 the caption of the figure series, potentially including a |\label|
%% #2 the contents of the figure series: arbitrarily many calls to
%% |\figureSeriesRow|
\long\def\figureSeriesHere#1#2{%
\ifx\@figSer@floatingBody\@empty%
\if@twocolumn%
\@figSer@store{#1}{#2}%
\afterpage{\@figSer@deferred}%
\else%
\@figSer@print{#1}{#2}%
\fi%
\else%
\@figSer@store{#1}{#2}%
\fi%
}%
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\figureSeriesFloat}
% The macro |\figureSeriesFloat|\marg{caption}\marg{contents} takes the same parameters
% as |\figureSeriesHere|, but has a float-like behavior. By using the |\afterpage| command from the
% |afterpage| package~\cite{C1995TAPECATPB}, we let it start at the following page.
% This is different from \LaTeX' normal floating behavior, but as good as we can get with
% page-breaking objects, I think.
% \begin{macrocode}
%%
%% Insert a floating figure series right here, i.e., one which will be
%% laid out on top of the following page.
%% #1 the caption of the figure series, potentially including a |\label|
%% #2 the contents of the figure series: arbitrarily many calls to
%% |\figureSeriesRow|
\long\gdef\figureSeriesFloat#1#2{%
\ifx\@figSer@floatingBody\@empty%
\@figSer@store{#1}{#2}%
\afterpage{\@figSer@deferred}%
\else%
\@figSer@store{#1}{#2}%
\fi%
}%
% \end{macrocode}
% \end{macro}
%
% \subsection{Internal Utility Definitions and Macros}%
% Here we discuss the internal utility definitions and macros used by our
% figure series.
%
% \begin{macrocode}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%% Internal Macros %%%%%%%%%%%%%%%%%%%%%%%%%%
%%
% \end{macrocode}
%
% \subsubsection{Container Macros}%
%
% We use the command |\@figSer@floatingBody| to temporarily store any floating figure series.
% If this command is |\@empty|, no floating figure series is pending.
% \begin{macrocode}
\global\let\@figSer@floatingBody\@empty%
% \end{macrocode}
%
% We want to avoid having a figure series broken right below the caption, i.e., having a caption
% alone at the bottom of a page and the first row of sub-figures coming on the next page.
% Therefore, we temporarily store the overall caption of the figure series in |\@figSer@delayedCaption|
% and print it together with the first figure row.
%
% \begin{macrocode}
\global\let\@figSer@delayedCaption\@empty%
% \end{macrocode}
%
% Our figure series are basically nothing else than simple arrays of rows.
% Each |\figureSeriesRow| is wrapped into a |center| environment and the
% |\figureSeriesElement|s are horizontally distributed inside using |\strut|s and |\hfill|s.
%
% Here we define the macro for printing our figure series. The rest of the package
% will deal with the logic where and how to invoke it.
%
% \begin{macro}{\@figSer@print}
% The macro |\@figSer@print|\marg{caption}\marg{contents} does the work of
% printing the figure series.
% \begin{macrocode}
\long\def\@figSer@print#1#2{%
\def\@figSer@delayedCaption{%
\noindent\parbox{\textwidth}{%
\captionof{figure}{#1}%
\global\advance\c@figure by 0%
}%
\par}%
\begin{center}%
#2%
\end{center}%
\medskip%
}%
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@figSer@store}
% If we want to make a figure series float, we need to temporarily store it. If another
% figure series is already stored, we attach the new one at its end.
% We store a figure series in |\@figSer@floatingBody| for later layout with the macro
% |\@figSer@store|\marg{caption}\marg{contents}.
% \begin{macrocode}
\long\def\@figSer@store#1#2{%
\g@addto@macro{\@figSer@floatingBody}{\@figSer@print{#1}{#2}}%
}%
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\@figSer@deferred}
% This macro is used to lay out the figure series in a ``deferred'' way, i.e.,
% when we emulate floating behavior via |\afterpage|. It behaves differently in
% one- and two-column mode.
%
% In one-column mode, there is nothing much to do: The figure series is stored
% in |\@figSer@floatingBody| and we just need to print it.
%
% In two column mode, we should only print it if we are in the first column.
% Otherwise, there may be errors. Thus, if we are not in the first column,
% we simply defer again, via |\afterpage|. For actually printing the figure
% series, we then use the |strip| environment from package |cuted|~\cite{T2012TCP}.
%
% \begin{macrocode}
\def\@figSer@deferred{%
\if@twocolumn%
\if@firstcolumn%
\begin{strip}\@figSer@floatingBody\end{strip}\null\par%
\global\let\@figSer@floatingBody\@empty%
\else%
\afterpage{\@figSer@deferred}%
\fi%
\else%
\@figSer@floatingBody%
\global\let\@figSer@floatingBody\@empty%
\fi%
}%
% \end{macrocode}
% \end{macro}
%
%
% \subsection{Errors, Tests, and Incompatibilities}%
% \label{sec:incompatible}%
%
% We may sometimes get |! Dimension too large.| errors. These may be caused by
% too-long |figureSeries| or too-big sub-figures.
%
% |figureSeries| loads the packages |caption|~\cite{S2011TCPCCIFE},
% |subcaption|~\cite{S2013TSPSFSC}, |afterpage|~\cite{C1995TAPECATPB}, and |cuted|~\cite{T2012TCP}.
% Therefore it inherits all incompatibilities of these packages. The |subcaption| package, for instance,
% is not compatible with the packages |subfigure| and |subfig|.
%
% \subsection{Related Work}%
% The |longfigure| package~\cite{A2014TLPPAFLETBOP} provides a similar functionality,
% i.e., a figure environment that can wrap over multiple pages. This environment can
% be made to float by using |\afterpage|, but does not work in two-column documents.
% \begin{sloppypar}%
% Tom{\'{a}}{\v{s}}~Hejda's method~\cite{H2012MPOCAIATCD} was originally used
% in our package (up to version 0.9.3) to lay out figure series. However, with my implementation
% of that method, I often got |! LaTeX Error: Float(s) lost.|
% errors in conjunction with |\afterpage|. With the `strip` environment from package
% |cuted|~\cite{T2012TCP}, I do not get those errors anymore.
% \end{sloppypar}%
%
% The following web resources are related to this package:
% \begin{enumerate}%
% \item Primary GitHub Repository: \url{https://github.com/thomasWeise/figureSeries}%
% \item \url{http://tex.stackexchange.com/questions/185534}%
% \item \url{http://stackoverflow.com/questions/1078370}%
% \item \url{http://tex.stackexchange.com/questions/11059}%
% \item \url{http://blog.it-weise.de/p/318}%
% \item \url{http://tex.stackexchange.com/questions/252487}%
% \item \url{http://tex.stackexchange.com/questions/255091}%
% \end{enumerate}
% \begin{sloppypar}%
% The reason why I developed this package is my |optimizationBenchmarking| framework, which
% can automatically generate reports from benchmark data obtained from optimization
% algorithms. It therefore needs a facility to deal with arbitrarily many automatically
% generated sub-figures of a figure. You can find this project at \url{https://github.com/optimizationBenchmarking/optimizationBenchmarking}.%
% \end{sloppypar}%
%
% \subsection{License}%
% The copyright (c) of this work is with Thomas Weise (\url{http://www.it-weise.de}).
%
% This document, the package, and its documentation are under the LaTeX Project Public License, version 1.3,
% which may be found online at \url{http://www.latex-project.org/lppl.txt}.
%
% The distribution of this package may also contain the \LaTeX\ document classes
% |llncs.cls|~\cite{SPRINGERLNCS}, |IEEEtran.cls|~\cite{IEEETRAN}, and |sig-alternate.cls|~\cite{ACMSIGALTERNATE}.
% The copyrights of these files are with their respective owners and these owners
% alone can determine the license terms for these files. The files are just
% included here to make the examples stand-alone. They may not be up-to-date,
% so please download their latest versions from their respective locations.
%
% If you feel that this document, its presentation, or any parts I provide for
% download violate your (copy)right, please contact me (\url{http://www.it-weise.de},