summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-parallel.sty
blob: 9d428615bac322fd6c178ec8c80dc73645fd4731 (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
%%
%% This is file `lwarp-parallel.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% lwarp.dtx  (with options: `parallel')
%% This is a generated file.
%% Copyright 2016-2020 Brian Dunn
%% 
%% This work 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.
\LWR@ProvidesPackageDrop{parallel}[2003/04/13]
\newcounter{LWR@parallel@Lwidth}
\newcounter{LWR@parallel@Rwidth}
\newcommand*{\LWR@parallel@border}

\newenvironment*{Parallel}[3][]%
    {%
        \LWR@printpendingfootnotes%
        \setlength{\linewidth}{\LWR@userstextwidth}%
        \setlength{\textwidth}{\LWR@userstextwidth}%
        \renewcommand*{\LWR@parallel@border}{}%
        \ifstrequal{#1}{v}%
            {%
                \renewcommand*{\LWR@parallel@border}{ ; border-left: 2px solid black}%
            }%
            {}%
        \ifblank{#2}{%
            \ifblank{#3}{% {}{}
                \setcounter{LWR@parallel@Lwidth}{45}%
                \setcounter{LWR@parallel@Rwidth}{45}%
            }% {}{}
            {% {}{x}
                \setlength{\LWR@templengthone}{\linewidth-#3}%
                \setcounter{LWR@parallel@Lwidth}{%
                    90*\ratio{\LWR@templengthone}{\linewidth}%
                }%
                \setcounter{LWR@parallel@Rwidth}{%
                    90*\ratio{#3}{\linewidth}%
                }%
            }% {}{x}
        }% #2 blank
        {% #2 non-blank
            \ifblank{#3}{% {x}{}
                \setcounter{LWR@parallel@Lwidth}{%
                    90*\ratio{#2}{\linewidth}%
                }%
                \setlength{\LWR@templengthone}{\linewidth-#2}%
                \setcounter{LWR@parallel@Rwidth}{%
                    90*\ratio{\LWR@templengthone}{\linewidth}%
                }%
            }% {x}{}
            {% {x}{x}
                \setcounter{LWR@parallel@Lwidth}{%
                    90*\ratio{#2}{\linewidth}%
                }%
                \setcounter{LWR@parallel@Rwidth}{%
                    90*\ratio{#3}{\linewidth}%
                }%
            }% {x}{x}
        }% #2 non-blank
    }
    {%
        \ParallelAtEnd%
        \renewcommand*{\ParallelAtEnd}{}%
        \LWR@printpendingfootnotes%
    }

\newcommand*{\ParallelLText}[1]{%
    \begin{BlockClass}[%
        width:\arabic{LWR@parallel@Lwidth}\% ; % space
        padding: .5ex 1\% ; % space
    ]{minipage}%
    #1%
    \end{BlockClass}%
}

\newcommand*{\ParallelRText}[1]{%
    \begin{BlockClass}[%
        width:\arabic{LWR@parallel@Rwidth}\% ; % space
        padding: .5ex 1\% ; % space
        \LWR@parallel@border%
    ]{minipage}%
    #1%
    \end{BlockClass}%
}

\newcommand*{\ParallelPar}{\LWR@printpendingfootnotes}

\newcommand*{\ParallelAtEnd}{}
\endinput
%%
%% End of file `lwarp-parallel.sty'.