summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/beamer/beamerpatchparalist.sty
blob: 7853b36d7045418158af8d76316b6f2419699f69 (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
% Copyright 2017,2018 by Louis Stuart, Joseph Wright
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.

\mode<presentation>

\if@plnewitem
  \def\enumerate{%
    \ifnum \@enumdepth >\tw@
      \@toodeep
    \else
      \advance\@enumdepth \@ne
      \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
      \advance\@itemdepth \@ne%
    \fi
    \def\@enum@widestlabel{7}%
    \beamer@computepref\@enumdepth%
    \expandafter\edef\csname label\@enumctr\endcsname{\noexpand\usebeamertemplate{enumerate \beameritemnestingprefix item}}%
    \@ifnextchar[{\beamer@@enum@}{\beamer@enummerate@}}
  \def\beamer@@enum@[{\@ifnextchar<{\beamer@enumdefault[}{\beamer@@@enum@[}}
  \def\beamer@enumdefault[#1]{\def\beamer@defaultospec{#1}%
    \@ifnextchar[{\beamer@@@enum@}{\beamer@enummerate@}}
  \def\beamer@@@enum@[#1]{\@enumlabel@{\beamer@enummerate@}[[#1]} % Here a token is gobbled in paralist package
  \def\beamer@enummerate@{%
    \beamer@computepref\@itemdepth% sets \beameritemnestingprefix
    \usebeamerfont{itemize/enumerate \beameritemnestingprefix body}%
    \usebeamercolor[fg]{itemize/enumerate \beameritemnestingprefix body}%
    \usebeamertemplate{itemize/enumerate \beameritemnestingprefix body begin}%
    \@adjust@enum@labelwidth
    \expandafter\list\csname label\@enumctr\endcsname{%
      \usecounter{\@enumctr}%
      \labelwidth
        \csname leftmargin\romannumeral\@listdepth\endcsname
      \advance\labelwidth-\labelsep
      \let\makelabel\enumlabel}%
    \beamer@cramped%
    \raggedright%
    \beamer@firstlineitemizeunskip%
  }
  \def\itemize{%
    \ifnum \@itemdepth >\tw@
      \@toodeep
    \else
      \advance\@itemdepth\@ne
      \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
    \fi
    \beamer@computepref\@itemdepth%
    \expandafter\edef\csname\@itemitem\endcsname{\noexpand\usebeamertemplate{itemize \beameritemnestingprefix item}}%
    \@ifnextchar[{\beamer@@item@}{\beamer@itemize@}}%
  \def\beamer@@item@[{\@ifnextchar<{\beamer@itemdefault[}{\beamer@@@item@[}}
  \def\beamer@itemdefault[#1]{\def\beamer@defaultospec{#1}%
    \@ifnextchar[{\beamer@@@item@}{\beamer@itemize@}}
  \def\beamer@@@item@[#1]{\@itemlabel@{\beamer@itemize@}[#1]}
  \def\beamer@itemize@{%
    \usebeamerfont{itemize/enumerate \beameritemnestingprefix body}%
    \usebeamercolor[fg]{itemize/enumerate \beameritemnestingprefix body}%
    \usebeamertemplate{itemize/enumerate \beameritemnestingprefix body begin}%
    \@adjust@item@labelwidth
    \expandafter\list\csname\@itemitem\endcsname{%
      \labelwidth
        \csname leftmargin\romannumeral\@listdepth\endcsname
      \advance\labelwidth-\labelsep
      \let\makelabel\itemlabel}%
    \beamer@cramped%
    \raggedright%
    \beamer@firstlineitemizeunskip%
  }
\fi
\if@plflushright
  \def\enumlabel#1{{\usebeamerfont*{enumerate \beameritemnestingprefix item}%
                    \usebeamercolor[fg]{enumerate \beameritemnestingprefix item}\hss#1}}
  \def\itemlabel#1{{\usebeamerfont*{itemize \beameritemnestingprefix item}%
                    \usebeamercolor[fg]{itemize \beameritemnestingprefix item}\hss#1}}
\else
  \def\enumlabel#1{{\usebeamerfont*{enumerate \beameritemnestingprefix item}%
                    \usebeamercolor[fg]{enumerate \beameritemnestingprefix item}#1\hfil}}
  \def\itemlabel#1{{\usebeamerfont*{itemize \beameritemnestingprefix item}%
                    \usebeamercolor[fg]{itemize \beameritemnestingprefix item}#1\hfil}}
\fi

\mode
<all>