-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmultirow.dtx
2332 lines (2332 loc) · 88.9 KB
/
multirow.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
%
% Parts of this file, Copyright (C) 1994 by Jerry Leichter
% Copyright (C) 2016-2024 by Pieter van Oostrum <[email protected]>
% -------------------------------------------------------
%
% 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
%
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{\jobname.dtx}
%</driver>
% This is the variable part of the preamble
%
%<multirow|bigstrut>%% Copyright (C) 1994 by Jerry Leichter
%<bigdelim>%% Copyright (C) 1994 by \O ystein Bache
%% Copyright (C) 2016-2024 by Pieter van Oostrum <[email protected]>
%%
%
% \begin{macrocode}
%<multirow|bigstrut|bigdelim>\NeedsTeXFormat{LaTeX2e}
%<multirow>\ProvidesPackage{multirow}%
%<bigstrut>\ProvidesPackage{bigstrut}
%<bigdelim>\ProvidesPackage{bigdelim}
%<multirow|bigstrut|bigdelim> [2024/11/12 v2.9
%<multirow> Span multiple rows of a table]%
%<bigstrut> Provide larger struts in tabulars]
%<bigdelim> Create big delimiters in tabular or array]
% \end{macrocode}
%
%<*driver>
\documentclass[a4paper]{ltxdoc}
\usepackage[T1]{fontenc}
\usepackage{multirow,bigstrut,bigdelim,colortbl}
\usepackage[table]{xcolor}
\usepackage{tabulary}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{calc}
\usepackage{url}
\usepackage[colorlinks, urlcolor=blue, linktocpage]{hyperref}
\usepackage{tikz}
\usepackage{hhline}
\usepackage{etoolbox}
\AtBeginEnvironment{macrocode}{\color{red}}
\newcommand{\minitab}[2][l]{\begin{tabular}{#1}#2\end{tabular}}
\DisableCrossrefs
\CodelineIndex
\RecordChanges
\newcommand{\env}[1]{\texttt{#1}}
\newcommand{\Package}[1]{\textsf{#1}}
\def\bsbs{\cs{\char`\\}}
\begin{document}
\DeleteShortVerb{\|}
\DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{0}
%
% \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{v1.7}{2016/09/13}{Give all the files the same version number}
% \changes{v2.0}{2016/09/27}{Release v2.0}
% \changes{v2.3}{2018/08/03}{Small bugfix}
% \changes{v2.4}{2018/12/30}{Add \leavevmode in bigstrut.sty}
% \changes{v2.4}{2019/01/01}{Make \meta{width} and \meta{vmove} in \cs{multirow}
% \Package{calc} compatible}
% \changes{v2.5}{2019/05/31}{Solve a clash with the \Package{colortbl} package}
%
% \GetFileInfo{multirow.sty}
%
% \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ }
% \DoNotIndex{\@ne}
% \DoNotIndex{\advance,\begingroup,\catcode,\closein}
% \DoNotIndex{\closeout,\day,\def,\edef,\else,\empty,\endgroup}
%
% \title{The \Package{multirow},
% \Package{bigstrut} and
% \Package{bigdelim} packages}
% \author{Pieter van Oostrum\thanks{catalogued ``active author''}\\
% \O ystein Bache\\
% Jerry Leichter\thanks{Documentation originally put together by Robin
% Fairbairns}}
%
% \date{Released \filedate, version \fileversion}
%
% \maketitle
%
% \tableofcontents
%
% \section{Introduction}
% These packages offer a series of extensions to the standard \LaTeX{}
% \env{tabular} environment. Their respective functions are:
% \begin{description}
% \item[\Package{multirow}] which provides a construction for table cells
% that span more than one row of the table;
% \item[\Package{bigstrut}] which creates struts which (slightly) stretch
% the table row in which they sit.
% \item[\Package{bigdelim}] which creates an appropriately-sized
% delimiter (for example, brace, parenthesis or bracket) to fit in a
% single multirow, to indicate a relationship between other rows; and
% \end{description}
%
% \section{Changes in version 2}
% \label{sec:changes-2}
%
%\subsection*{version 2.9}
%
% \begin{itemize}
% \item Documentation correction: the description of the meaning of a
% negative value of \meta{nrows} was wrong.
% \item Make \texttt{multirow.sty} compatible with
% \texttt{supertabular} version 4.2a or later.
% \end{itemize}
%
%\subsection*{version 2.8}
%
%\begin{itemize}
%\item Optional argument \meta{vmove} for \cs{ldelim} and \cs{rdelim}.
%\end{itemize}
%
%\subsection*{version 2.7}
%
%\begin{itemize}
%\item Make \cs{@xmultirow} and \cs{multirow@setcolwidth} \cs{long} to allow
% multi-paragraph text.
% See \url{https://github.com/pietvo/multirow/issues/1}
%\end{itemize}
%
%\subsection*{version 2.6}
%
% \begin{itemize}
% \item Make the \texttt{supertabular} option compatible with newer
% versions of the \Package{supertabular} package
% \item Initialize \cs{@arstrutbox} when not defined, to enable some
% uses of the big delims outside of an \env{array} or \env{tabular}.
% \end{itemize}
%
%\subsection*{version 2.5a}
%
% \begin{itemize}
% \item Changed contact information
% \end{itemize}
%
%\subsection*{version 2.5}
%
% \begin{itemize}
% \item Solve a clash with the \Package{colortbl} package, when multirow
% uses the \texttt{longtable} option. There was a clash with both
% packages redefining \cs{@cline}.
% \end{itemize}
%
%\subsection*{version 2.4}
%
% \begin{itemize}
% \item Add a \cs{leavevmode} in \Package{bigstrut} to force horizontal mode
% \item Make \meta{width} and \meta{vmove} in \cs{multirow} \Package{calc} compatible
% \end{itemize}
%
%\subsection*{version 2.3}
%
% \begin{itemize}
% \item Replaced \cs{textrm} with \cs{textnormal} in text beside big braces in bigdelim.sty.
% \end{itemize}
%
%\subsection*{version 2.2}
%
% \begin{itemize}
% \item Support for fractional values of \meta{nrows}.
% \end{itemize}
%
%\subsection*{version 2.0}
%
% \begin{itemize}
% \item \cs{multirow} now has an first optional parameter \oarg{vpos}.
% \item The \meta{width} parameter can be specified as \texttt{=} to use
% the defined width of the column in which the \cs{multirow} appears.
% \item Optional prefix letters (\texttt{t}, \texttt{b}) for
% the \meta{bigstruts} parameter (see section~\ref{sect-refine-bigstrut}).
% \item Package option \texttt{debug}.
% \item Package option \texttt{longtable} to work around a bug in
% \Package{longtable}. See section~\ref{sec:use-with-longtable}.
% \item Package option \texttt{supertabular} to better support \Package{supertabular}. See
% section~\ref{sec:use-with-supertabular}.
% \item Better positioning in some cases.
% \item Lots of documentation.
% \item The distribution is now based on a \texttt{.dtx} file.
% \item Backwards compatible with v1.6.
% \end{itemize}
%
% \section{Using \Package{multirow}}\label{sec:multirow}
%
% \DescribeMacro{\multirow}
% \cs{multirow} sets a piece of text in a \env{tabular} or
% similar environment, spanning multiple rows. We will call the block of
% rows and columns that the text spans the multirow block. Usually this
% covers one column, but by combining it with \cs{multicolumn} more
% columns can be covered.
% \changes{v2.1}{2016/10/06}{Rename \meta{fixup} to \meta{vmove} in the
% documentation as in The LaTeX Companion.}
%
% The basic syntax is:
% \begin{quote}
% \cmd{\multirow}\oarg{vpos}\marg{nrows}\oarg{bigstruts}\marg{width}\oarg{vmove}\marg{text}
% \end{quote}
% where
% \begin{description}
% \item[\meta{vpos}] defines the vertical positioning of the text in the multirow block.
% The default is \texttt{[c]} which means the text will be vertically centered.
% Other options are \texttt{[t]} for top alignment and \texttt{[b]} for bottom alignment.
% \item[\meta{nrows}] is the number of rows to span. You should
% leave the other rows empty at this column, otherwise the stuff created by \cs{multirow}
% will over-write it. With a positive value of \meta{nrows} the
% spanned columns are this row and (\meta{nrows}-1) rows below
% it. With a negative value of \meta{nrows} they are this row and
% (-\meta{nrows}-1) above it. Fractional values are permitted for
% \meta{nrows}; this allows for some fine-tuning.
%
% \item[\meta{bigstruts}] is mainly used if you've used the
% \Package{bigstrut} package. In that case it is the total number of uses of
% \cs{bigstrut} within the rows being spanned. Count 2 uses for each
% \cs{bigstrut}, 1 for each \cs{bigstrut}\oarg{x} where \meta{x} is
% either \texttt{t} or \texttt{b}. The default is 0.
%
% The \meta{bigstruts} parameter can optionally be preceded by a prefix
% letter \texttt{t}, \texttt{b} or \texttt{tb} for finer control. See
% section \ref{sect-refine-bigstrut} for details. The letter may be
% separated from the number by a space character.
%
% \item[\meta{width}] is the width to which the text is to be set.
% Special values are \texttt{*} to indicate that the text parameter's natural width is to
% be used, and \texttt{=} to indicate that the specified width of the column in
% which the \cs{multirow} entry is set should be used.
%
% \item[\meta{vmove}] is a length used for fine-tuning: the text will be
% raised (or lowered, if \meta{vmove} is negative) by that length
% above (below) wherever it would otherwise have gone.
%
% \item[\meta{text}] is the actual text of the construct. If the width
% was set explicitly, the text will be set in a \cs{parbox} of that
% width; you can use \bsbs{} to force linebreaks where you like.
%
% If the width was given as \texttt{*} the text will be set in LR
% mode. If you want a multiline entry in this case you could use a
% \env{tabular} or \env{array} environment in the text
% parameter. See for example the \env{minitab} below.
%
% The width can also be given as \texttt{=} when the \cs{multirow} entry is given in a
% column that has a defined width, for example in a \texttt{p\{\}} column, an
% \texttt{X} column in \env{tabularx} or a \texttt{L}, \texttt{C},
% \texttt{R} or \texttt{J} column in a \env{tabulary} environment.
% The text will be set in a \cs{parbox} of that width.
% If you give ``\texttt{=}'' in other situations, you will get strange
% results (usually a too wide column).
%
% \end{description}
%
% In \Package{multirow} version 2.4 and later, the \meta{width} and
% \meta{vmove} arguments can be given as \Package{calc} expressions if
% the \Package{calc} package is loaded. It is the responsibility of the
% document writer to include the \Package{calc} package;
% \Package{multirow} does not do this.
%
% N.B. \cs{multirow} can be used in the \env{tabular} environment and
% most derivatives of it, for example \env{tabularx},
% \env{tabulary}, \env{supertabular}, \env{ltablex},
% \env{xtab}, \env{longtable}, \env{tabu},
% \env{booktabs} and \env{ctable}. For some of these you
% have to pay special attention to certain cases, see below.
%
% \DescribeMacro{\multirowsetup}
% Just before \meta{text} is expanded, the \cs{multirowsetup} macro is
% expanded to set up any special environment. Initially,
% \cs{multirowsetup} contains just \cs{raggedright}. It may be
% redefined with \cs{renewcommand}.
%
% If you want to use both \cs{multirow} and \cs{multicolumn}
% \index{multicolumn=\verb!*+\multicolumn+|usage}
% on the same entry, you must put the \cs{multirow} inside the
% \cs{multicolumn}. The other way around will not work.
% For example:
% \begin{verbatim}
% \multicolumn{2}{c}{\multirow{3}{*}{Multi-multi}}
% \end{verbatim}
%
% \subsection{Package Options}
% \label{sec:package-options}
%
% \DescribeMacro{multirowdebugtrue}
% \DescribeMacro{multirowdebugfalse}
% The following options are defined:
% \begin{description}
% \item[debug]
% This option causes information about multirow boxes
% to be written to the log file. This is done by the \TeX{} \cs{showbox}
% command. Note: this will cause the \LaTeX{} compilation to be considered
% failed, even if there is no real error.
% This option can also be activated anywhere in the document with the
% command \cs{multirowdebugtrue} and deactivated with
% \cs{multirowdebugfalse}. When such a command is placed just before a
% \cs{multirow}, it applies only to that specific \cs{multirow} entry.
% \item[longtable]
% The \texttt{longtable} option redefines the \cs{cline} macro to work
% around a bug in the \Package{longtable} package. See section \ref{sec:use-with-longtable}.
% \end{description}
%
%\subsection{Examples}
%\label{sec:examples}
%
% An example with both \Package{multirow} and \Package{bigstrut}):
%
% \begin{quote}
% \begin{verbatim}
% \newcommand{\minitab}[2][l]{\begin{tabular}{#1}#2\end{tabular}}
% \begin{tabular}{|c|c|}
% \hline
% \multirow{4}{1in}{Common g text} & Column g2a\\
% & Column g2b \\
% & Column g2c \\
% & Column g2d \\
% \hline
% \multirow{3}[6]*{Common g text} & Column g2a\bigstrut\\\cline{2-2}
% & Column g2b \bigstrut\\\cline{2-2}
% & Column g2c \bigstrut\\
% \hline
% \multirow{4}[8]{1in}{Common g text, but a bit longer.} &
% Column g2a\bigstrut\\\cline{2-2}
% & Column g2b \bigstrut\\\cline{2-2}
% & Column g2c \bigstrut\\\cline{2-2}
% & Column g2d \bigstrut\\
% \hline
% \multirow{4}*{\minitab[c]{Common \\ g text}} & Column g2a\\
% & Column g2b \\
% & Column g2c \\
% & Column g2d \\
% \hline
% \end{tabular}
% \end{verbatim}
% \end{quote}
% which will appear as:
% \begin{quote}
% \begin{tabular}{|c|c|}
% \hline
% \multirow{4}{1in}{Common g text} & Column g2a\\
% & Column g2b \\
% & Column g2c \\
% & Column g2d \\
% \hline
% \multirow{3}[6]*{Common g text} & Column g2a\bigstrut\\\cline{2-2}
% & Column g2b \bigstrut\\\cline{2-2}
% & Column g2c \bigstrut\\
% \hline
% \multirow{4}[8]{1in}{Common g text, but a bit longer.} &
% Column g2a\bigstrut\\\cline{2-2}
% & Column g2b \bigstrut\\\cline{2-2}
% & Column g2c \bigstrut\\\cline{2-2}
% & Column g2d \bigstrut\\
% \hline
% \multirow{4}*{\minitab[c]{Common \\ g text}} & Column g2a\\
% & Column g2b \\
% & Column g2c \\
% & Column g2d \\
% \hline
% \end{tabular}
% \quad
% \begin{tabular}{ll}
% \multirow{4}{*}{Normal case} & \\
% & \\
% & \\
% & \\
% \multirow{3}[6]*{With \cs{bigstrut}s and \texttt{*} as \meta{width}} & \bigstrut\\
% & \bigstrut\\
% & \bigstrut\\
% \multirow{4}[8]{*}{With \cs{bigstrut}s and normal \meta{width}} & \bigstrut\\
% & \bigstrut\\
% & \bigstrut\\
% & \bigstrut\\
% \multirow{4}*{Multiline text in \cs{multirow}} & \\
% & \\
% & \\
% & \\
% \end{tabular}
%
% \end{quote}
% \vspace{1ex}
% An example with the ``\texttt{=}'' \meta{width} specifier in a
% \env{tabulary} (Note: The braces around the \texttt{=} may be omitted):
%
% \begin{quote}
% \index{extrarowheight=\verb!*+\extrarowheight+|usage}
% \begin{verbatim}
% \setlength{\extrarowheight}{2pt}
% \begin{tabulary}{11cm}{|L|L|L|}
% \hline
% All human beings are born free and equal in dignity and rights. &
% \multirow{2}{=}{Everyone is entitled to all the rights and
% freedoms set forth in this Declaration, without distinction of
% any kind, such as race, colour, sex, language, religion,
% political or other opinion, national or social origin, property,
% birth or other status.}
% & Everyone has the right to life, liberty and security of person. \\
% \cline{1-1}\cline{3-3}
% No one shall be held in slavery or servitude; slavery and the
% slave trade shall be prohibited in all their forms. &
% & No one shall be subjected to torture or to cruel, inhuman or
% degrading treatment or punishment. \\
% \hline
% \end{tabulary}
% \end{verbatim}
% \end{quote}
%
% \begin{quote}
% \index{extrarowheight=\verb!*+\extrarowheight+|usage}
% \setlength{\extrarowheight}{2pt}
% \begin{tabulary}{11cm}{|L|L|L|}
% \hline
% All human beings are born free and equal in dignity and rights. &
% \multirow{2}{=}{Everyone is entitled to all the rights and
% freedoms set forth in this Declaration, without distinction of
% any kind, such as race, colour, sex, language, religion,
% political or other opinion, national or social origin, property,
% birth or other status.}
% & Everyone has the right to life, liberty and security of person. \\
% \cline{1-1}\cline{3-3}
% No one shall be held in slavery or servitude; slavery and the
% slave trade shall be prohibited in all their forms. &
% & No one shall be subjected to torture or to cruel, inhuman or
% degrading treatment or punishment. \\
% \hline
% \end{tabulary}
% \end{quote}
%
% A few observations about this example:
% \begin{enumerate}
% \item The middle column is the \cs{multirow}. You would expect it to
% be vertically centered, but it isn't. This is because \cs{multirow}
% doesn't know the height of the box. The only estimate \cs{multirow}
% can make about the height is the number of rows${}\times{}$the normal
% height of a row. It tries to center the text in that space, but that space
% is too low in this example. Therefore the text is at the top of the
% box. If you want it to be centered, you have to supply a \meta{vmove}
% argument to shift it down.
% \item We have used an \cs{extrarowheight}\footnote{This is only
% available with the \Package{array} package, which \Package{tabulary}
% includes automatically.} of 2pt, to make a bit room between the
% \cs{hline} and the following text. However, this is not applied to the
% \cs{multirow}, because this is thought to be centered. In this case
% you can give the \meta{vpos} argument as \texttt{[t]}, in which case
% \cs{multirow} will do the proper positioning.
% \end{enumerate}
%
% Now with a negative \meta{nrows}.
%
% \begin{quote}
% \index{extrarowheight=\verb!*+\extrarowheight+|usage}
% \begin{verbatim}
% \setlength{\extrarowheight}{2pt}
% \begin{tabulary}{11cm}{|L|L|L|}
% \hline
% All human beings are born free and equal in dignity and rights. &
% & Everyone has the right to life, liberty and security of person. \\
% \cline{1-1}\cline{3-3}
% No one shall be held in slavery or servitude; slavery and the
% slave trade shall be prohibited in all their forms. &
% \multirow{-2}{=}[12mm]{Everyone is entitled to all the rights and
% freedoms set forth in this Declaration, without distinction of
% any kind, such as race, colour, sex, language, religion,
% political or other opinion, national or social origin, property,
% birth or other status.}
% & No one shall be subjected to torture or to cruel, inhuman or
% degrading treatment or punishment. \\
% \hline
% \end{tabulary}
% \end{verbatim}
% \end{quote}
%
% \begin{quote}
% \index{extrarowheight=\verb!*+\extrarowheight+|usage}
% \setlength{\extrarowheight}{2pt}
% \begin{tabulary}{11cm}{|L|L|L|}
% \hline
% All human beings are born free and equal in dignity and rights. &
% & Everyone has the right to life, liberty and security of person. \\
% \cline{1-1}\cline{3-3}
% No one shall be held in slavery or servitude; slavery and the
% slave trade shall be prohibited in all their forms. &
% \multirow{-2}{=}[12mm]{Everyone is entitled to all the rights and
% freedoms set forth in this Declaration, without distinction of
% any kind, such as race, colour, sex, language, religion,
% political or other opinion, national or social origin, property,
% birth or other status.}
% & No one shall be subjected to torture or to cruel, inhuman or
% degrading treatment or punishment. \\
% \hline
% \end{tabulary}
% \end{quote}
%
% In this case the text would be centered somewhere in the
% bottom row, which would make it stick out of the bottom. Therefore we
% applied a \meta{vmove} of 12mm. The \meta{vmove} usually requires some experimentation.
%
% \subsection{Fine-Tuning}
% \label{sec:fine-tuning}
%
% If any of the spanned rows are unusually large, or if you're using the
% \Package{bigstrut} package and \cs{bigstrut}s are used asymetrically about the
% centerline of the spanned rows, the vertical centering may not come
% out right. Use the \meta{vmove} parameter in this case. Sometimes it
% may be more helpful to just use a larger value for \meta{nrows},
% including fractional values. See an example in section~\ref{sec:dealing-with-tall}.
%
% It's just about impossible to deal correctly with descenders. The
% text will be set up centered, but it may then have a baseline that
% doesn't match the baseline of the stuff beside it, in particular if
% the stuff beside it has descenders and \meta{text} does not. This may
% result in a small misalignment. About all that can be done is to do a
% final touchup on \meta{text}, using the \meta{vmove} optional parameter.
% (Hint: If you use a measure like \texttt{.1ex}, there's a reasonable
% chance that the \meta{vmove} will still be correct if you change the point
% size.)
%
% \cs{multirow} is mainly designed for use with \env{tabular}, as
% opposed to \env{array}, environments. It might not work well in an
% array environment if there are big formulas in some rows; in that case you can use the
% \meta{vmove} parameter to refine the result.
%
% In some cases you might want to align the multirow entry with the top
% of the other row cells, for example if you have a large capital in it.
% when you use \meta{vpos} = \texttt{[t]}, the baselines will be
% aligned, which is the wrong thing in this case. You can then do the
% positioning with the \meta{vmove} parameter and let \LaTeX{} calculate
% the amount. For example:
%
% \begin{quote}
% \begin{verbatim}
% \usepackage{calc}
% \newlength{\shiftdown}
% \setlength{\shiftdown}{\heightof{\Huge\bfseries B}-\heightof{f}}
% . . .
% \begin{tabular}{cll}
% \toprule
% \multirow[t]{5}{*}[-\shiftdown]{\Huge\bfseries B}
% & foo & Lorem ipsum dolor sit \\
% & bar & Maecenas sed purus \\
% & baz & Nullam luctus id tellus \\
% & qux & Aenean consequat commodo \\
% \bottomrule
% \end{tabular}
% \end{verbatim}
% \end{quote}
%
% \begin{quote}
% \newlength{\shiftdown}
% \setlength{\shiftdown}{\heightof{\Huge\bfseries B}-\heightof{f}}
% \begin{tabular}{cll}
% \toprule
% \multirow[t]{5}{*}[-\shiftdown]{\Huge\bfseries B}
% & foo & Lorem ipsum dolor sit \\
% & bar & Maecenas sed purus \\
% & baz & Nullam luctus id tellus \\
% & qux & Aenean consequat commodo \\
% \bottomrule
% \end{tabular}
% \end{quote}
% In \Package{multirow} version 2.4 and later you can also directly use the expression
% \verb|-\heightof{\Huge\bfseries B}-\heightof{f}| instead of \verb|-\shiftdown| for the \meta{vmove} argument.
%
% \subsection{Multirow and colored cells}\label{sec:mult-color-cells}
%
% If you use \cs{multirow} with the \Package{colortbl} package (or the
% \index{colortbl=\Package{colortbl}|usage}
% \Package{xcolor} package with the \texttt{[table]} option) you have
% \index{xcolor=\Package{xcolor}|usage}
% to take precautions if you want to color the column that has the
% \cs{multirow} in it. The \Package{colortbl} package works by coloring each cell
% separately. So if you use \cs{multirow} with a positive \meta{nrows}
% value, \Package{colortbl} will first color the top cell, then
% \cs{multirow} will typeset \meta{nrows} cells starting with this cell,
% and later \Package{colortbl} will color the other cells, effectively
% hiding the text in that area. This can be solved by putting the
% \cs{multirow} in the last row with a negative \meta{nrows} value.
% See, for example:
% \begin{quote}
% \begin{verbatim}
% \begin{tabular}{l>{\columncolor{yellow}}l}
% aaaa & \\
% cccc & \\
% dddd & \multirow{-3}*{bbbb}\\
% \end{tabular}
% \end{verbatim}
% \end{quote}
% which will produce:
% \begin{quote}
% \begin{tabular}{l>{\columncolor{yellow}}l}
% aaaa & \\
% cccc & \\
% dddd & \multirow{-3}*{bbbb}\\
% \end{tabular}
% \end{quote}
%
% \index{hhline=\Package{hhline}|usage}
% When you use colored multirow cells together with the
% \Package{hhline} package you may find some white stripes in your
% colored multirow cell. For example:
% \begin{quote}
% \begin{verbatim}
% \begin{tabular}{|>{\columncolor{red}}c|c|}
% \hline
% \bfseries ColumnOne & \bfseries ColumnTwo\\ \hline
% First data & 932\\ \hline
% & 239\\ \hhline{|~|-|}
% & 137\\ \hhline{|~|-|}
% \multirow{-3}{*}{More data} & 319\\ \hline
% Last data & 132\\ \hline
% \end{tabular}
% \end{verbatim}
% \end{quote}
%
% \begin{quote}
% \begin{tabular}{|>{\columncolor{red}}c|c|}
% \hline
% \bfseries ColumnOne & \bfseries ColumnTwo\\ \hline
% First data & 932\\ \hline
% & 239\\ \hhline{|~|-|}
% & 137\\ \hhline{|~|-|}
% \multirow{-3}{*}{More data} & 319\\ \hline
% Last data & 132\\ \hline
% \end{tabular}
% \end{quote}
%
% This can be solved by putting colored horizontal rules with the same
% color in the colored multirow cell.
% \begin{quote}
% \begin{verbatim}
% \begin{tabular}{|>{\columncolor{red}}c|c|}
% \hline
% \bfseries ColumnOne & \bfseries ColumnTwo\\ \hline
% First data & 932\\ \hline
% & 239\\ \hhline{|>{\arrayrulecolor{red}}->{\arrayrulecolor{black}}|-|}
% & 137\\ \hhline{|>{\arrayrulecolor{red}}->{\arrayrulecolor{black}}|-|}
% \multirow{-3}{*}{More data} & 319\\ \hline
% Last data & 132\\ \hline
% \end{tabular}
% \end{verbatim}
% \end{quote}
%
% \begin{quote}
% \begin{tabular}{|>{\columncolor{red}}c|c|}
% \hline
% \bfseries ColumnOne & \bfseries ColumnTwo\\ \hline
% First data & 932\\ \hline
% & 239\\ \hhline{|>{\arrayrulecolor{red}}->{\arrayrulecolor{black}}|-|}
% & 137\\ \hhline{|>{\arrayrulecolor{red}}->{\arrayrulecolor{black}}|-|}
% \multirow{-3}{*}{More data} & 319\\ \hline
% Last data & 132\\ \hline
% \end{tabular}
% \end{quote}
%
% \subsection{Fine-tuning the \meta{bigstruts} argument}
% \label{sect-refine-bigstrut}
%
% \cs{multirow} can calculate the height of the required multirow box
% from \meta{nrows} and \meta{bigstruts}, supposed that all the rows
% don't have ``unusual'' heights. However, there are cases when this is
% not enough to properly position the box, especially when there is a
% \cs{bigstrut} on top of the first row and/or one on the bottom of the
% last row. In that case \cs{multirow} should be given additional
% information. This is done by prefixing the \meta{bigstruts} argument
% with a letter (or two) indicating which of these two are present.
%
% See the following examples:\\ (in these examples we have
% \verb+\setlength{\bigstrutjot}{10pt}+ to make the effect clearly visible)\\[5mm]
% \begin{minipage}[c]{0.23\linewidth}
% \setlength{\bigstrutjot}{10pt}
% \begin{tabular}{|c|c|}
% \hline
% \multirow{3}[1]{*}{Multirow} & T \bigstrut[t] \\
% \cline{2-2}
% & X \\
% \cline{2-2}
% & B \\
% \hline
% \end{tabular} \\[2mm]
% \begin{tabular}{|c|c|}
% \hline
% \multirow{3}[t 1]{*}{Multirow} & T \bigstrut[t] \\
% \cline{2-2}
% & X \\
% \cline{2-2}
% & B \\
% \hline
% \end{tabular}
% \end{minipage}
% \begin{minipage}[c]{0.75\linewidth}
% \begin{verbatim}
% \begin{tabular}{|c|c|}
% \hline
% \multirow{3}[1]{*}{Multirow} & T \bigstrut[t] \\
% \cline{2-2}
% & X \\
% \cline{2-2}
% & B \\
% \hline
% \end{tabular}
% \end{verbatim}
% \end{minipage}
% \\[5mm]
% In the top box in the above example the text ``Multirow'' should be centered, but it
% is a bit below the center, because of the \cs{bigstrut[t]} in the top
% row. We can correct this by giving the \meta{bigstruts} parameter as
% ``t 1'', indicating a bigstrut in the top. This is done in the bottom box, where
% \verb+\multirow{3}[t 1]{*}{Multirow}+ is used.
%
% A second example:\\[5mm]
% \begin{minipage}{0.23\linewidth}
% \setlength{\bigstrutjot}{10pt}
% \begin{tabular}{|c|c|}
% \hline
% & T \\
% \cline{2-2}
% & X \\
% \cline{2-2}
% \multirow[t]{-3}[1]{*}{Multirow} & B \bigstrut[b] \\
% \hline
% \end{tabular} \\[2mm]
% \begin{tabular}{|c|c|}
% \hline
% & T \\
% \cline{2-2}
% & X \\
% \cline{2-2}
% \multirow[t]{-3}[b 1]{*}{Multirow} & B \bigstrut[b] \\
% \hline
% \end{tabular}
% \end{minipage}
% \begin{minipage}{0.75\linewidth}
% \begin{verbatim}
% \begin{tabular}{|c|c|}
% \hline
% & T \\
% \cline{2-2}
% & X \\
% \cline{2-2}
% \multirow[t]{-3}[1]{*}{Multirow} & B \bigstrut[b] \\
% \hline
% \end{tabular}
% \end{verbatim}
% \end{minipage}
% \\[5mm]
% In the top box the \verb+\multirow[t]+ should be positioned on the
% same height as the \texttt{T}, but it is too high, because there is a
% \cs{bigstrut} in the bottom. We can correct that by specifying the
% \meta{bigstruts} argument as ``b 1'', i.e. using
% \verb+\multirow[t]{-3}[b 1]{*}{Multirow}+.
% \\[5mm]
% The possibilities for the prefix are:
% \begin{description}
% \item[\texttt{t}] There is a bigstrut in the top, i.e. a \cs{bigstrut}
% or \cs{bigstrut[t]} in the top row.
% \item[\texttt{b}] There is a bigstrut in the bottom, i.e. a \cs{bigstrut}
% or \cs{bigstrut[b]} in the bottom row.
% \item[\texttt{tb}] They are both present. Note: this cannot be given
% as \texttt{bt}.
% \end{description}
% The space between the letter(s) and the number is optional.
% Please note that the prefix does not depend on whether the
% \cs{multirow} is in the top or the bottom row.
%
% \subsection{Use with \Package{longtable}}
% \label{sec:use-with-longtable}
%
% \index{longtable=\env{longtable}|usage}
% \index{longtabu=\env{longtabu}|usage}
% It is possible to use \cs{multirow} in a \env{longtable}
% environment (as well as in its descendent \env{longtabu}).
% However, care must be taken that the longtable doesn't break the
% multirow entry when it is near the bottom of the page. For example:
%
% \noindent
% \begin{minipage}[t]{0.4\linewidth}
% \begin{longtable}{|l|l|l|}
% \ldots & \ldots & \ldots \\
% \hline
% Sept. 21 & 09:00 & event 1 \\
% \hline
% Sept. 22 & 10:00 & event 2 \\
% \hline
% \multirow{3}*{Sept. 23} & 10:00 & event 3 \\
% & 12:00 & event 4 \\
% & 15:00 & event 5 \\
% \hline
% Sept. 24 & 09:00 & event 6 \\
% \hline
% \ldots & \ldots & \ldots \\
% \end{longtable}
% \end{minipage}
% \begin{minipage}[t]{0.58\linewidth}
% \begin{verbatim}
% \begin{longtable}{|l|l|l|}
% \ldots & \ldots & \ldots \\
% \hline
% Sept. 21 & 09:00 & event 1 \\
% \hline
% Sept. 22 & 10:00 & event 2 \\
% \hline
% \multirow{3}*{Sept. 23} & 10:00 & event 3 \\
% & 12:00 & event 4 \\
% & 15:00 & event 5 \\
% \hline
% Sept. 24 & 09:00 & event 6 \\
% \hline
% \ldots & \ldots & \ldots \\
% \end{longtable}
% \end{verbatim}
% \end{minipage}
%
% In this case if the ``Sept. 23'' entry comes close to the bottom of the
% page, you want to prevent the pagebreak to occur in the middle of this
% entry. You can do this by ending the intermediate rows with \verb+\\*+ instead of \verb+\\+.
%
% \begin{verbatim}
% \multirow{3}*{Sept. 23} & 10:00 & event 3 \\*
% & 12:00 & event 4 \\*
% & 15:00 & event 5 \\
% \end{verbatim}
%
% There is, however, a bug in \Package{longtable}, that causes the
% \verb+\\*+ not to work if it is followed by a \cs{cline}, like in the
% following example:
%
% \begin{verbatim}
% \multirow{3}*{Sept. 23} & 10:00 & event 3 \\*
% \cline{2-3}
% & 12:00 & event 4 \\*
% \cline{2-3}
% & 15:00 & event 5 \\
% \end{verbatim}
%
% \Package{multirow} has a package option \texttt{longtable} that redefines
% \cs{cline} so that the \verb+\\*+ will also work when followed by
% \cs{cline}. The code comes from David Carlisle.
%
% \subsection{Use with \Package{supertabular}}
% \label{sec:use-with-supertabular}
%
% \index{supertabular=\env{supertabular}|usage}
% \index{xtab=\env{xtab}|usage}
% With the package \Package{supertabular} (or the augmented version
% \Package{xtab}) there is the same requirement
% to keep the rows of a multirow together when a pagebreak occurs.
% Unfortunately, \Package{supertabular} does not have a way to specify
% that a pagebreak should be suppressed. I.e. \verb+\\*+ does not
% suppress a pagebreak.
% Therefore \Package{multirow} provides a package option
% \texttt{supertabular} that redefines \verb+\\*+ inside a
% \env{supertabular} to suppress the pagebreak. You should use
% this to end the intermediate rows in a multirow block. However, this
% does not cause \env{supertabular} to consider breaking the
% page before the \cs{multirow}, contrary to \env{longtable}.
% Thus the table may become too long.
%
% \DescribeMacro{\STneed}
% Therefore when the \texttt{supertabular} option is given,
% \Package{multirow} also provides a command \cs{STneed} to be used
% in a \env{supertabular} that specifies how much space we need
% on the page. Then if there is not enough space, a pagebreak will occur
% at that place. For example:
% \begin{verbatim}
% \tabletail{\hline}
% \begin{supertabular}{|l|l|l|}
% \ldots & \ldots & \ldots \\
% \hline
% Sept. 20 & 10:00 & event 1\\
% \hline
% Sept. 21 & 10:00 & event 2\\
% \hline
% Sept. 22 & 10:00 & event 3\\
% \hline
% \STneed {2cm}
% \multirow{3}*{Sept. 23} & 10:00 & event 4\\*
% \cline{2-3}
% & 12:00 & event 5 \\*
% \cline{2-3}
% & 15:00 & event 6 \\
% \hline
% Sept. 24 & 09:00 & event 7 \\
% \hline
% \ldots & \ldots & \ldots \\
% \end{verbatim}
%
% You will have to experiment a bit with the value to see
% what works. Sometimes it is better to exaggerate the required space a bit.
%
% \subsection{Dealing with tall entries}
% \label{sec:dealing-with-tall}
%
% Sometimes there are rows that are taller than what is expected. This
% section gives some hints how to deal with these situations. There are
% two cases:
% \begin{enumerate}
% \item When there is an exceptionally tall row outside of the multirow
% block the positioning of the \cs{multirow} might be wrong. This is
% because \cs{multirow} does not have information about the heights
% of the rows. This can happen for example when a large formula is
% entered in a cell, or a multi-line paragraph in a \texttt{[\{\}]}
% column. An example:
%
% \begin{quote}
% \begin{verbatim}
% \begin{tabular}{| l | l | p{4cm} |}
% \hline
% \multirow{3}*{Week 38} & Monday & Rain most of the day\\
% \cline{2-3}
% & Tuesday & Sunny with some clouds\\
% \cline{2-3}
% & Wednesday & A clear day with a lot of sunshine.
% However, the strong wind will bring down the
% temperature. \\
% \hline
% \end{tabular}
% \end{verbatim}
% \end{quote}
% \begin{quote}
% \begin{tabular}{| l | l | p{4cm} |}
% \hline
% \multirow{3}*{Week 38} & Monday & Rain most of the day\\
% \cline{2-3}
% & Tuesday & Sunny with some clouds\\
% \cline{2-3}
% & Wednesday & A clear day with a lot of sunshine.
% However, the strong wind will bring down the
% temperature. \\
% \hline
% \end{tabular}
% \end{quote}
% The \cs{multirow} is positioned on the second row, because it
% specifies that it should cover 3 rows. However, the second row is not
% the vertical center in this case because the third row is much taller.
%
% To remedy this, the \meta{vmove} parameter could be used. However, in
% this case it would be easier to pretend that \cs{multirow} spans 6
% rows (the total number of lines in the last column). So use
% \verb+\multirow{6}+\ldots{} and we get:
% \begin{quote}
% \begin{tabular}{| l | l | p{4cm} |}
% \hline
% \multirow{6}*{Week 38} & Monday & Rain most of the day\\
% \cline{2-3}
% & Tuesday & Sunny with some clouds\\
% \cline{2-3}
% & Wednesday & A clear day with a lot of sunshine.
% However, the strong wind will bring down the
% temperature. \\
% \hline
% \end{tabular}
% \end{quote}
% \item The second case is when the \cs{multirow} entry is taller than
% the surrounding normal rows. In that case the multirow text will stick
% out of its block. We must now enlarge the other rows, and that is
% something \cs{multirow} cannot do.
%
% An example:
% (Don't take this as a medical advice. The names are fake anyway.)
% \begin{verbatim}
% \begin{tabular}{| p{2mm} l | p{5cm} |}
% \hline
% \multicolumn{2}{|l|}{\textbf{Medicine \& dose}}
% & \textbf{Possible Side effects} \\
% \hline
% \multicolumn{2}{|l|}{Spirino}
% & \multirow{3}={Confusion,
% hallucinations, rapid breathing,
% seizure (convulsions);
% upset stomach, heartburn; severe nausea,