summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/miniplot/miniplot.tex
blob: 57c17f32d372a4a39b6c605889dfc3f26f0067e6 (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272



\documentclass[12pt,a4paper]{article}

% needed packages
\usepackage{calc}
\usepackage{ifthen}
\usepackage{graphics}
\usepackage{epsfig}
\usepackage{miniplot}

% supplementary packages
\usepackage{wrapfig}
\usepackage{subfigure}
\usepackage{rotfloat}

%\usepackage{showkeys}

% personal adjustments
\newcommand{\comm}[1]{\texttt{#1}}
\renewcommand{\floatpagefraction}{0.8}    % default = 0.5, see "The LaTeX Companion, page 142"
\setcounter{plotFigures}{1}


\begin{document}

%\pagestyle{myheadings}
%\markright{Section \thesection}

\title{MiniPlot -- A Package For Easy Figure Arrangements}
\author{Tobias Wahl\footnote{I'd like to thank all the people helping me in \comm{comp.text.tex}
for answering my dull questions.}}
\date{15th June 2001}
\maketitle


\begin{abstract}
MiniPlot is a package to help \LaTeX's user to typeset eps figures
using an easy-to-use interface.

Figures can be arranged as one-figure-only or as a collection of
figure in columns and rows which can contain itself sub-figures in
columns and rows. Also wrapped figures are supported.

This package provides commands to display a framebox instead of
the figure as the graphics package does already but additionally
it writes useful information such as the label and scaling factor
into these boxes.
\end{abstract}

\tableofcontents


%=================================================================
\section{Motivation}

This section is only to show what MiniPlot is about. MiniPlot is a
strong tool for plotting multiple figures and sub-figure as the 
following figures show. It's easy to use interface allows easy and 
fast access to professional looking figure presentation.


\begin{arrangedFigure}{2}{2}{arrangedO521}{left sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[This is a very long sub-sub-caption]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arrangedO522}{right sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\setlength{\subFigureAboveCaptionSpace}{7mm} 
\end{arrangedFigure} 
\setlength{\subFigureAboveCaptionSpace}{0mm} 


\begin{arrangedFigure}{1}{4}{arrangedO1521}{top sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arrangedO1522}{bottom sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}


\begin{arrangedFigure}{2}{3}{arrangedO31}{top left}
    \subFig{figures/1}%
    \subFig{figures/2}%
    \subFig{figures/3}%
    \subFig{figures/4}%
    \subFig{figures/1}%
    \subFig{figures/2}%
\newSubFig{arrangedO32}{top right}
    \subFig{figures/1}%
    \subFig{figures/2}%
    \subFig{figures/3}%
    \subFig{figures/4}%
    \subFig{figures/1}%
    \subFig{figures/2}%
\newSubFig{arrangedO33}{bottom}
    \subFig{figures/1}%
    \subFig{figures/2}%
    \subFig{figures/3}%
    \subFig{figures/4}%
    \subFig{figures/1}%
    \subFig{figures/2}%
\end{arrangedFigure}



\clearpage

%================================================================= 



%---------------------------------------------------------------- 
\section{Loading the packages}

In order to run MiniPlot the following lines are needed in the \LaTeX
file


\begin{verbatim}
% needed packages
\usepackage{calc}
\usepackage{ifthen}
\usepackage{graphics}
\usepackage{epsfig}
\usepackage{miniplot}

% supplementary packages
\usepackage{wrapfig}
\usepackage{subfigure}
\usepackage{rotfloat}

% personal adjustments
\setcounter{plotFigures}{0}
\renewcommand{\floatpagefraction}{0.8}    
\end{verbatim}

The wrapfigure package is only needed when one uses the wrapfigure
features of MiniPlot. The subfigure package is certainly something
one might include since this gives access to the \comm{arrangedFigure}
environment, the most powerful feature of this package.
Rotfloat, and rotating which is loaded by rotfloat, is needed when one 
likes to use the side-way-figure capabilities of MiniPlot.
I recommend to install all packages.

Putting the line \comm{setcounter{plotFigures}{0}} is not necessary but is
recomended for editing a document with loads of figures or when one likes
to obtain the label of figures for refences.

The last line is very much my own personal style and not needed for using 
MiniPlot.



%---------------------------------------------------------------- 
\section{Including single figures}

The problem is how to arrange your eps figures efficiently in you
document. The answer is given by MiniPlot. This section is
included to provide an overview over the capabilities of MiniPlot.

We start with a simple implementation of a single eps figure as
shown in Figure \ref{fig:singleSimple}, the simple implementation
is given by

\begin{verbatim} \includeEps{figures/1}{Simple figure included 
with scaling factor equals one.}{singleSimple}{1} \end{verbatim}

\includeEps{figures/1}{Simple figure included with scaling factor 
equals one.}{singleSimple}{1}

Note that the label is given without \comm{fig:}. The general 
parameters are

\begin{verbatim}
\includeEps[htpb]{path}{label}{caption}{scaling factor}
\end{verbatim}

Now imagine one has one type of figure which occurs very often in 
the document. Then the user could use the following command

\begin{verbatim} \includeStandardGraph[htpb]{path}{label}{caption} 
\end{verbatim}

where the standard scaling factor can be set generally for all 
the figures included by this command. The default is 

\begin{verbatim} \renewcommand{\standardGraphScale}{1} 
\end{verbatim}

\includeStandardGraph{figures/1}{Simple figure included with 
scaling factor calculated to scale figure to meet specified 
width.}{singleStandard}

However, by default this value is not used but the figure is 
scaled to achieve the width equal to the length of the following 
variable.

\begin{verbatim} \setlength{\myStandardFigureWidth}{\linewidth} 
\end{verbatim}

If the figures are scaled to the width above or if a standard 
scaling factor is assumed depends on the following counter

\begin{verbatim} \setcounter{scaleToStandardFigureWidth}{1} 
\end{verbatim}

Set \comm{1} to to scale to standard-figure-width or \comm{0} to 
use standard-graph-scale. 

Additionally one can set if each figure is to be scaled 
individually or if the scaling factor is to be calculated at the 
first time the include-standard-graph command is stated

\begin{verbatim} \setcounter{scaleFigureIndividual}{1} 
\end{verbatim} 

Set \comm{1} to to scale individually or \comm{0} to use scaling 
factor calculated when inserting the first standard-graph. 

When we now include a figure using the command for standard 
figures 

\begin{verbatim} \includeStandardGraph{figures/1}{Simple figure 
included with scaling factor calculated to scale figure to meet 
specified width.}{singleStandard} 
\end{verbatim}

we obtain a figure scaled to the specified width in Figure 
\ref{fig:singleStandard}.

To show the use of the counter \comm{plotFigures} we set

\begin{verbatim} 
\setcounter{plotFigures}{0} 

\includeStandardGraph{figures/1}{Simple figure included with 
scaling factor calculated to scale figure to meet specified 
width.}{singleStandard2} 

\setcounter{plotFigures}{1} 
\end{verbatim}

to obtain Figure \ref{fig:singleStandard2}. We can see that the 
scaling factor is no more equals one. Other usefull information 
is given by the label.

\setcounter{plotFigures}{0} 
\includeStandardGraph{figures/1}{Simple figure included with 
scaling factor calculated to scale figure to meet specified 
width.}{singleStandard2} 
\setcounter{plotFigures}{1} 

Of course there is also a side-ways version of a figure, see 
Figure \ref{fig:singleStandard3}. This figure is implemented using
the include-standrd-side-ways-graph command. 

\begin{verbatim} 
\setcounter{plotFigures}{0} 

\includeStandardSideWaysGraph{figures/1}{Simple figure included with 
scaling factor calculated to scale figure to meet specified in width 
in side-ways-mode.}{singleStandard3} 

\setcounter{plotFigures}{1} 
\end{verbatim}

\setcounter{plotFigures}{0} 
\includeStandardSideWaysGraph{figures/1}{Simple figure included with 
scaling factor calculated to scale figure to meet specified 
width in side-ways-mode.}{singleStandard3} 
\setcounter{plotFigures}{1} 

Note that the width of the side-ways-figure is now determined by

\begin{verbatim} 
\setlength{\myStandardSideWaysFigureWidth}{\textheight}
\end{verbatim}

Note that there is also an include-side-ways-eps command where 
you have to set a scaling factor.










\clearpage

%---------------------------------------------------------------- 
\section{Including wrapped figures}


The use of the include-Eps-Wrap command is similar to the 
include-Eps command. By writing

\includeEpsWrap[20]{l}{figures/wrapMe}{Example of an wrapped figure}{wrappedFigure1}{1}

\begin{verbatim} \includeEpsWrap[20]{l}{figures/wrapMe}{Example of an 
wrapped figure}{wrappedFigure1}{1} \end{verbatim}

we obtain Figure \ref{fig:wrappedFigure1}.

The general form is given by

\begin{verbatim} 
\includeEpsWrap[lines]{side}{path}
{caption}{label}{scaling factor} 
\end{verbatim}

where lines stands for the number of narrow lines and side stands 
for left (l) or right (r) as specified in the documentation of the 
wrapfig package.

Of course, if the counter \comm{plotFigures} equals 0 then this figure is 
replaced by a framebox containing some useful information:

\begin{verbatim}
\setcounter{plotFigures}{0}
\includeEpsWrap[20]{l}{figures/wrapMe}
{Example of an wrapped figure}
{wrappedFigure2}{1}
\setcounter{plotFigures}{1}
\end{verbatim}

The counter \comm{plotFigures} is inteded to be \comm{0} in 
draft mode to improve browsing speed through the document and
to provide information for referencing. However, when a figure 
is to be implemented the first time one like to see the result. 
This can be done without changing the counter \comm{plotFigures}.
Simple one can add the term \comm{Now} to any command provided 
to include figures. Therefore the following command would show the 
figure and not the framebox:

\begin{verbatim}
\setcounter{plotFigures}{0}
\includeEpsWrapNow{l}{figures/wrapMe}
{Example of an wrapped figure}
{wrappedFigure3}{1}
\setcounter{plotFigures}{1}
\end{verbatim}

To customize the figure there is the width which is added to the wrapped figure
in oder to have some space between figure and text

\begin{verbatim}
\setlength{\extraWrapWidth}{2mm}
\end{verbatim}

The space above the wrapped figure is set to be

\begin{verbatim}
\setlength{\aboveWrapFigureSpace}{0mm}
\end{verbatim}



%---------------------------------------------------------------- 
\section{Including arranged sub-figures and sub-sub-figures}


The content of this subsection is the generation of figures which can
consist of several columns and rows of figures with their own caption 
(Figure ...), I will call these figures sub-figures.

Inside these sub-figures can now be arranged several columns and rows of 
sub-sub-figures. These are placed using the subfigure package.

A simple example might be given by Figure \ref{fig:arranged11} to \ref{fig:arranged12}

\begin{verbatim}
\begin{arrangedFigure}{2}{2}{arranged11}{This is the left 
                        sub-figure of an arranged figure.}
    \subFig{figures/1}%
    \subFig{figures/2}%
    \subFig{figures/3}%
    \subFig{figures/4}%
\newSubFig{arranged12}{This is the right sub-figure of an 
                                        arranged figure.}
    \subFig{figures/1}%
    \subFig{figures/2}%
    \subFig{figures/3}%
    \subFig{figures/4}%
\end{arrangedFigure}
\end{verbatim}

\begin{arrangedFigure}{2}{2}{arranged11}{This is the left sub-figure of an arranged figure.}
    \subFig{figures/1}%
    \subFig{figures/2}%
    \subFig{figures/3}%
    \subFig{figures/4}%
\newSubFig{arranged12}{This is the right sub-figure of an arranged figure.}
    \subFig{figures/1}%
    \subFig{figures/2}%
    \subFig{figures/3}%
    \subFig{figures/4}%
\end{arrangedFigure}

The first parameter to the \comm{arrangedFigure} environment is the number of 
columns of sub-figures, the second one specifies the number of columns of 
sub-sub-figures. The next parameters is the label and then the caption to the immediate
following sub-sub-figures.

The command \comm{subFig} should actually be called \comm{subSubFig} since it inserts the 
sub-sub-figure specified by the path of the figure to be included. \emph{It is important to 
enter the \%-signs after the \comm{subFig} command in order to avoid introducing 
unwanted spaces between the sub-sub-figures.}

The command \comm{newSubFig} opens the next que to fill up a sub-figure with sub-sub-figures.
The parameter is the label and the caption for the immediately following sub-figure.

Another example could be given by Figure \ref{fig:arranged2}

\begin{verbatim}
\begin{arrangedFigure}{1}{4}{arranged2}{This is the 
                only sub-figure of an arranged figure.}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}
\end{verbatim}


\begin{arrangedFigure}{1}{4}{arranged2}{This is the only sub-figure of an arranged figure.}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}

Note that the number of columns of sub-figures changed to one and that we arrange four 
sub-sub-figures in the width of one sub-figure.

Also the \comm{subFig} command got now an empty optional command leading to the indexing
of the sub-sub-figures from a to d. This behavior is identically with the one of the 
subfigure package.

To complete a list of examples a last one is given by Figure \ref{fig:arranged31} to
\ref{fig:arranged33}



\begin{verbatim}
\renewcommand{\subfigbottomskip}{0pt}%
\renewcommand{\subfigcapskip}{0pt}%
\renewcommand{\subfigcapskip}{0pt}%
\renewcommand{\subcapsize}{\scriptsize}%

\begin{arrangedFigure}{2}{4}{arranged31}{top left}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
\newSubFig{arranged32}{top right}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
\newSubFig{arranged33}{bottom}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}
\end{verbatim}

In this figure we have an odd ratio of sub-figures to sub-figure-columns
and we see that the remaining sub-figure is shifted to the right.

The same happens to the sub-sub-figures included in the top row of 
sub-figures.


    \renewcommand{\subfigbottomskip}{0pt}%
    \renewcommand{\subfigcapskip}{0pt}%
    \renewcommand{\subfigcapskip}{0pt}%
    \renewcommand{\subcapsize}{\scriptsize}%

\begin{arrangedFigure}{2}{4}{arranged31}{top left}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
\newSubFig{arranged32}{top right}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
\newSubFig{arranged33}{bottom}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}

    \renewcommand{\subfigbottomskip}{10pt}%
    \renewcommand{\subfigcapskip}{10pt}%
    \renewcommand{\subfigcapskip}{10pt}%
    \renewcommand{\subcapsize}{\footnotesize}%


The reader certainly notices that it takes longer to load the page when a lot
of sub-sub-figures are arranged. This is an important reason to set the counter 
\comm{plotFigures} to zero to save time as the reader might notice when loading
Figure \ref{fig:arranged41} to \ref{fig:arranged42}.

\begin{verbatim}
\setcounter{plotFigures}{0}
\end{verbatim}

At the same time an example of the arranged-side-ways-figure is shown. That 
this page loads faster is not theonly difference one can notice. The label for 
reference is now added to the caption in order to be easier accessible. A disadvantage 
is that the caption might become bigger and that might influence the document layout.
This might be changed in later versions and the label migth be moved to the margin or so.



\begin{verbatim}
\setcounter{plotFigures}{0}

\begin{arrangedSideWaysFigure}{2}{2}{arranged41}{left sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged42}{right sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedSideWaysFigure}

\setcounter{plotFigures}{1}
\end{verbatim}



\setcounter{plotFigures}{0}
\begin{arrangedSideWaysFigure}{2}{2}{arranged41}{left sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged42}{right sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedSideWaysFigure}
\setcounter{plotFigures}{1}


\clearpage

%---------------------------------------------------------------- 
\section{Customizing arranged figures}


For cutomizing purposes one should know that the space between 
each sub-figure is specified by

\begin{verbatim}
\setlength{\interSubFigSpace}{8mm}
\end{verbatim}

whereas the space between each sub-sub-figure is specified by

\begin{verbatim}
\setlength{\interSubSubFigSpace}{2.5mm}
\end{verbatim}

The horizontal position of the numvering of sub-sub-figures 
\emph{(a)-(..)} can be changed by changing the following length 
which default value is

\begin{verbatim}
\setlength{\subCaptionPenalty}{0mm}
\end{verbatim}

This has only an effect if the \comm{subFig} command is issued with 
an empty optional parameter.

If a sub-sub-caption is given as in the following example


\begin{verbatim}
\begin{arrangedFigure}{2}{2}{arranged511}{left sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[This is a very long sub-sub-caption]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged512}{right sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}
\end{verbatim}

\begin{arrangedFigure}{2}{2}{arranged511}{left sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[This is a very long sub-sub-caption]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged512}{right sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}

\begin{arrangedFigure}{2}{2}{arranged521}{left sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[This is a very long sub-sub-caption]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged522}{right sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\setlength{\subFigureAboveCaptionSpace}{7mm}
\end{arrangedFigure}
\setlength{\subFigureAboveCaptionSpace}{0mm}


then the following length can be set in order to compensate for the extra space

\begin{verbatim}
\begin{arrangedFigure}{2}{2}{arranged51}{left sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[This is a very long sub-sub-caption]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged52}{right sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\setlength{\subFigureAboveCaptionSpace}{7mm}
\end{arrangedFigure}
\setlength{\subFigureAboveCaptionSpace}{0mm}
\end{verbatim}


with a resulting Figure \ref{fig:arranged521} and \ref{fig:arranged522}.

If the figure looks like Figure \ref{fig:arranged5311} and \ref{fig:arranged5312} 
then one could set

\begin{verbatim}
\begin{arrangedFigure}{2}{2}{arranged531}{left sub-figure}
    \subFig[]{figures/1}%
    \subFig[This is a very long sub-sub-caption]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged532}{right sub-figure}
    \setlength{\horizontalSubSubFigSpace}{4mm}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \setlength{\horizontalSubSubFigSpace}{0mm}
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}
\end{verbatim}

to achieve Figure \ref{fig:arranged531} and \ref{fig:arranged532}.



\begin{arrangedFigure}{2}{2}{arranged5311}{left sub-figure}
    \subFig[]{figures/1}%
    \subFig[This is a very long sub-sub-caption]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged5312}{right sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}

\begin{arrangedFigure}{2}{2}{arranged531}{left sub-figure}
    \subFig[]{figures/1}%
    \subFig[This is a very long sub-sub-caption]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged532}{right sub-figure}
    \setlength{\horizontalSubSubFigSpace}{4mm}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \setlength{\horizontalSubSubFigSpace}{0mm}
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}



Another parameter for modifying the look is given by

\begin{verbatim}
\setlength{\subFigureBelowCaptionSpace}{3mm}
\end{verbatim}

which sets the space below the main sub-figure caption and the next 
main sub-figure below it.

After all, it might be difficult to reset every variable on its 
own and to remenber their default values. Therefore, the 
command \comm{resetMiniPlot} has been introduced. This 
sets variables and commands to their default values. Note 
that the counter \comm{plotFigures} is not reset. A listing
of the definition is given below.


\begin{verbatim}
\newcommand{\resetMiniPlot}%
    {%
    \setcounter{printCaption}{1}
    \setlength{\extraWrapWidth}{2mm}    
    \setlength{\aboveWrapFigureSpace}{0mm}
    \renewcommand{\standardGraphScale}{1} 
    \setcounter{scaleToStandardFigureWidth}{1}
    \setcounter{isFirstStandardFigure}{1}
    \setcounter{scaleFigureIndividual}{1}
    \setlength{\frameBoxPenalty}{2.4mm}
    \setlength{\myStandardFigureWidth}{\linewidth}                  
    \setlength{\myStandardSubFigureWidth}{\myStandardFigureWidth}   
    \setlength{\myStandardSideWaysFigureWidth}{\textheight}
    \renewcommand{\isFirstSubFig}{false}                  
    \setlength{\subFigPenalty}{0mm}                    
    \setlength{\subSubFigPenalty}{0.001mm}              
    \setlength{\interSubFigSpace}{8mm}
    \setlength{\interSubSubFigSpace}{2.5mm}
    \setlength{\subFigureAboveCaptionSpaceDefaultOffset}{0mm}
    \setlength{\subFigureAboveCaptionSpaceDefault}{0mm} 
    \setlength{\subFigureAboveCaptionSpace}{\subFigureAboveCaptionSpaceDefault 
                                    + \subFigureAboveCaptionSpaceDefaultOffset}
    \setlength{\horizontalSubSubFigSpace}{0mm}
    \setlength{\subFigureBelowCaptionSpace}{3mm}
    \setlength{\subCaptionPenalty}{0mm}
    }%
\end{verbatim}



\clearpage






%---------------------------------------------------------------- 
\section{Debugging arranged figures}

Normally it shouldn't be necessary to do any debugging but in case there is
I'd like to mention some tweaks here.

If one is unluky one might find something like the following graph

\setlength{\subSubFigPenalty}{-1mm} 

\begin{verbatim}
\begin{arrangedFigure}{2}{2}{arranged51d}{left sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged52d}{right sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}
\end{verbatim}

\begin{arrangedFigure}{2}{2}{arranged51d}{left sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged52d}{right sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}

from which one would expect to yield two columns of sub-figures and
inside those again two columns of sub-sub-figures. However, Figure
\ref{fig:arranged51} to \ref{fig:arranged51} have only one column of
sub-sub-figures. This is because the sub-sub-figures plus the space
between them is too wide to fit into the width of the minipage environment
they are in. So, the figures are shifted down. This effect can be removed
by changing the following length which default value is

\begin{verbatim}
\setlength{\subSubFigPenalty}{0.001mm}
\end{verbatim}

\setlength{\subSubFigPenalty}{0.001mm}

Theoretical this value should be zero but due to numerical inaccuracies the 
sub-sub-figures have to be made a little bit narrower. The above length is to 
compensate for the numerical error.

By increasing the above length one can yield a satisfactory figure layout as 
can be seen in Figure

\begin{arrangedFigure}{2}{2}{arranged51dd}{left sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged52dd}{right sub-figure}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}


Another thing which is unlikely but not impossible to occur is that on has 
the displacment of figure as described above only when \comm{plotFigures} 
is equals zeros, meaning the framebox(es) are shown with the information
in it. The reason then is that the following length needs to be increased 
from its default value.

\begin{verbatim}
\setlength{\frameBoxPenalty}{2.4mm}
\end{verbatim}

The reason is that the framebox is drawn around the actual size of the 
eps-figure, this space needs to be substracted.


\clearpage








%---------------------------------------------------------------- 
\section{Referencing to figures}

Suppose the label given to a figure is \comm{arranged51dd} then the actual label
assign is \comm{fig:arranged51dd} and thats what needs to be referenced to

\begin{verbatim}
... see Figure \ref{fig:arranged51dd} ...
\end{verbatim}

... see Figure \ref{fig:arranged51dd}

Referencing to sub-sub-figures is not implemented yet but will be done in future
versions as done as the subfigure package describes. That 
is for example

\begin{verbatim}
... see Figure \ref{fig:arranged51dd-c} ...
\end{verbatim}

However, this does not work yet but if somebody knows how to extract the
\comm{a} from \comm{(a)} then it wouldn't be a problem to implement it.













%---------------------------------------------------------------- 
\section{Recommendation for working with MiniPlot}

The only recommendation there is is only to set

\begin{verbatim}
\usepackage{miniplot}
\setcounter{plotFigures}{0}
\end{verbatim}

This will display only the frameboxes of the figures and this will
increase browsing speed through the document significantly.

When implementing a figure for the first time one should use the
\comm{\~Now}-version of the implementation command, for example

\begin{verbatim}
\includeEpsNow{...
\end{verbatim}

After the figure is set and everything works fine one should remove the 
\comm{Now} to end up with

\begin{verbatim}
\includeEps{...
\end{verbatim}

When the whole document is finished one simply sets

\begin{verbatim}
\setcounter{plotFigures}{1}
\end{verbatim}

and all the figures will be shown.

Another thing regarding the subfig package is that I would suggest to use
the following setting when implementing loads of figures in an arranged figure
like Figure \ref{fig:arranged31} to \ref{fig:arranged33}.

\begin{verbatim}
\renewcommand{\subfigbottomskip}{0pt}%
\renewcommand{\subfigcapskip}{0pt}%
\renewcommand{\subfigcapskip}{0pt}%
\renewcommand{\subcapsize}{\scriptsize}%
\end{verbatim}

These settings are not used for this manual.







%---------------------------------------------------------------- 
\section{The code}

I'd like to excuse that the code is not pasted in and not explained as 
proper package writers do. I just hope that the comments might give some clue
when trying to understand pieces of \comm{miniplot.sty}.








%---------------------------------------------------------------- 
\section{Restrictions when using MiniPlot}

One restriction is that the underscore \_ is not permitted in the
labels of the figures. 

This is due to to the fact that MiniPlot displays
the labels and I need to find a proper way of doing this. The simplyfied
explanation would trying to write

\begin{verbatim}
\newcommand{\examplea}{label_lab}
\examplea
\end{verbatim}

either MiniPlot cannot display the underscore in text mode or in mathmode
the underscore has a different function and is not displayed neither. I could
imagine there is something like a temporary solution like using the let command
but this goes beyond my \LaTeX \hspace{0mm} capabilities.

Another restriction is that the path to an arranged figure cannot contain the

\begin{verbatim}
\
\end{verbatim}

sign. This might not be a major restriction.








%---------------------------------------------------------------- 
\section{Known bugs}

There is only one (fixable) bug known which is that when the 
columns of the sub-figures are not evenly filled up with 
sub-sub-figures the sub-figure shift a little bit as in Figure
\ref{fig:arranged541} to \ref{fig:arranged543}. Compare the upper boundaries 
of the two top sub-figures. There is a little vertical shift.

\begin{arrangedFigure}{2}{4}{arranged541}{top left}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged542}{top right}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
\newSubFig{arranged543}{bottom}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}

However, this can be solved by typing

\begin{verbatim}
\begin{arrangedFigure}{2}{4}{arranged551}{top left}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged552}{top right}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \setlength{\subFigureAboveCaptionSpace}{2.5mm}
\newSubFig{arranged553}{bottom}
    \setlength{\subFigureAboveCaptionSpace}{0mm}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}
\end{verbatim}

using \comm{subFigureAboveCaptionSpace}
and it follows Figure \ref{fig:arranged551} and \ref{fig:arranged553}

\begin{arrangedFigure}{2}{4}{arranged551}{top left}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\newSubFig{arranged552}{top right}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \setlength{\subFigureAboveCaptionSpace}{2.5mm}
\newSubFig{arranged553}{bottom}
    \setlength{\subFigureAboveCaptionSpace}{0mm}
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
    \subFig[]{figures/1}%
    \subFig[]{figures/2}%
    \subFig[]{figures/3}%
    \subFig[]{figures/4}%
\end{arrangedFigure}

This bug might be removed one time in the future. Sugestions are very much welcome!

\clearpage



Generally bugs can please be reported to \emph{enxtw1@nottingham.ac.uk} or 
\emph{tobias\_wahl@gmx.de}.

One thing is that one gets a lot of warnings about overfull hboxes. I am 
personally not really bothered but if somebody might come up with an idea
I would be happy to implement it.

There are just few awkward things about the code and maybe somebody has an idea
how solve things. One thing is that in the following 
function the first line seems to introduce a vertical length even if one
simply writes \comm{vspace\{0pt\}}. Due to this strange behavior I had to 
introduce the length \comm{subFigureAboveCaptionSpaceDefaultOffset} equals
3mm\footnote{I have to note that this behavior happened at one point and 
does not occur annymore. So that \comm{subFigureAboveCaptionSpaceDefaultOffset}
is set to zero. However, I decided to leave this in the code in case it might 
occur again??}.


\begin{verbatim}
\newcommand{\newSubFig}[3][\subFigureAboveCaptionSpaceDefault]%
    {%
    \vspace{\subFigureAboveCaptionSpace}%
    \ifthenelse{\value{plotFigures}>0}%
        {\caption{\myCaptionText}}%
        {\caption{\myCaptionText\printLabel{\myLabel}}}%
    \label{\myLabel}%
    \end{minipage}%
    \renewcommand{\myCaptionText}{#3}%                                                   
    \renewcommand{\myLabel}{#2}%                                                                
    \vspace{\subFigureBelowCaptionSpace}%
    \hspace{\interSubFigSpace}%
    \begin{minipage}{\myStandardSubFigureWidth}%
    \aboveCaptionSpace{#1}%
    }%
\end{verbatim}

Furthermore in the above command the following command is called

\begin{verbatim}
\newcommand{\aboveCaptionSpace}[1]{\setlength{\subFigureAboveCaptionSpace}
                            {#1 + \subFigureAboveCaptionSpaceDefaultOffset}}
\end{verbatim}

For some strange reason does the length \comm{subFigureAboveCaptionSpace} 
keep its value only in the minipage where I define it. I also cannot set the 
length outside the minipage since it did not recognize the cange within it. I 
would think that this has something to do with local and global variables but I
normally would have expected the the length in question is a global variable and
known everywhere. 

The command \comm{aboveCaptionSpace} was initially thought to be used instead of setting the
length \comm{subFigureAboveCaptionSpace} directly.





%---------------------------------------------------------------- 
\section{List of variables, commands and environments}


Note that only those variables, commands and environments are cited which
are useful for the user.


\bigskip\bigskip

\underline{Counters:}

\begin{verbatim}
\setcounter{scaleToStandardFigureWidth}{1}
\setcounter{isFirstStandardFigure}{1}
\setcounter{scaleFigureIndividual}{1}
\setcounter{plotFigures}{1}
\end{verbatim}



\bigskip\bigskip

\underline{Lengths:}

\begin{verbatim}
\setlength{\myStandardFigureWidth}{\linewidth}
\setlength{\myStandardSideWaysFigureWidth}{\textheight}

\setlength{\aboveWrapFigureSpace}{0mm}

\setlength{\interSubFigSpace}{8mm}
\setlength{\interSubSubFigSpace}{2.5mm}

\setlength{\horizontalSubSubFigSpace}{0mm}
\setlength{\subFigureAboveCaptionSpaceDefault}{0mm}
\setlength{\subFigureAboveCaptionSpace}{0mm}
\setlength{\subFigureBelowCaptionSpace}{3mm}

\setlength{\subFigPenalty}{0mm}
\setlength{\subSubFigPenalty}{0.001mm}
\setlength{\subCaptionPenalty}{0mm}
\setlength{\frameBoxPenalty}{2.4mm}
\end{verbatim}



\bigskip\bigskip

\underline{Commands:}

\begin{verbatim}
\newcommand{\isFirstSubFig}{false}
\newcommand{\standardGraphScale}{1}

\includeEps[htpb]{path}{caption}{label}{scaling}
\includeEpsNow[htpb]{path}{caption}{label}{scaling}
\includeSideWaysEps[htpb]{path}{caption}{label}{scaling}
\includeSideWaysEpsNow[htpb]{path}{caption}{label}{scaling}

\includeStandardGraph[htpb]{path}{caption}{label}
\includeStandardGraphNow[htpb]{path}{caption}{label}
\includeStandardSideWaysGraph[htpb]{path}{caption}{label}
\includeStandardSideWaysGraphNow[htpb]{path}{caption}{label}

\includeEpsWrap[narrow lines]{position}{path}{caption}{label}{scaling}
\includeEpsWrapNow[narrow lines]{position}{path}{caption}{label}{scaling}

\newcommand{\printLabel}[1]{; \large\textsc{Label}$\Rightarrow$\texttt{fig:#1}
\newSubFig[\subFigureAboveCaptionSpace]{label}{caption}
\subFig[sub-sub-caption]{path}%

\resetMiniPlot
\end{verbatim}


\bigskip\bigskip

\underline{Environments:}

\begin{verbatim}
arrangedFigure[htpb]{sub-fig columns}{sub-sub-fig columns}{label}{caption}
arrangedFigureNow[htpb]{sub-fig columns}{sub-sub-fig columns}{label}{caption}

arrangedSideWaysFigure[htpb]{sub-fig columns}{sub-sub-fig columns}
                                                            {label}{caption}
arrangedSideWaysFigureNow[htpb]{sub-fig columns}{sub-sub-fig columns}
                                                            {label}{caption}
\end{verbatim}                                                          


\end{document}