langsci / 259

Müller, Stefan et al. (eds): Head-Driven Phrase Structure Grammar: The handbook
Creative Commons Attribution 4.0 International
22 stars 7 forks source link

too much space between two exes with multicolumn and two few space after them cg.tex #156

Closed stefan11 closed 3 years ago

stefan11 commented 3 years ago

grafik

I could do this with tabular, but this would break the labels.

Glottotopia commented 3 years ago

don't use multicolumn. It is never the right solution. You can use something along the lines of

\ea
\parbox[t]{5cm}{
\ea
}%
\parbox[t]{5cm}{
\ex
}
\z
\z

(from the top of my head). Don't quote me on the exact positioning of the \z's

On 5/25/21 5:13 PM, Stefan Müller wrote:

grafik https://user-images.githubusercontent.com/4655859/119522117-0278d600-bd7c-11eb-9472-0dd7f0b40d3c.png

I could do this with tabular, but this would break the labels.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/langsci/259/issues/156, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL3JKF65PNXSWADNOEP63LTPO5DNANCNFSM45PSXPXQ.

stefan11 commented 3 years ago

Thanks! I think your solution does not work because of the nesting of \ea within brackets. I tryed the following:

\eal
\label{SE0}%
\parbox[t]{5cm}{%
\ex\label{rseone} Forward Slash Elimination:\\[.5\baselineskip]
\begin{prooftree}
\NoSem
\hypo{\LexEnt{\pt{\ptv{a}}}{\sem{ }}{\syncat{\textit{A}/\textit{B}}}}
\hypo{\LexEnt{\pt{\ptv{b}}}{\sem{ }}{\syncat{\textit{B}}}}
\infer2[\ensuremath{/}E]{\LexEnt{\pt{\ptv{a} \ensuremath{\circ}\xspace \ptv{b}}}{\sem{ }}{\syncat{\textit{A}}}}
\end{prooftree}
}
\parbox[t]{5cm}{
\ex\label{lseone} Backward Slash Elimination:\\[.5\baselineskip]
\begin{prooftree}
\NoSem
\hypo{\LexEnt{\pt{\ptv{b}}}{\sem{ }}{\syncat{\textit{B}}}}
\hypo{\LexEnt{\pt{\ptv{a}}}{\sem{ }}{\syncat{\textit{B}\ensuremath{\backslash}{}\textit{A}}}}
\infer2[\ensuremath{\backslash}E]{\LexEnt{\pt{\ptv{b} \ensuremath{\circ}\xspace \ptv{a}}}{\sem{ }}{\syncat{\textit{A}}}}
\end{prooftree}
}
\zl

While this does compile, the result is not as expected. The a. and b. come out somewhere below on the page: grafik

Glottotopia commented 3 years ago
\newcommand{\shortbox}[3][-.7]{
    \parbox[t]{.4\textwidth}{
      \vspace{#1\baselineskip} #2\strut~~ #3}%
}

\ea
\begin{xlist}
\shortbox{a.}{abc}\shortbox{b.}{def}
\end{xlist}
\z

\ea
\begin{xlist}
\shortbox{a.}{ghi}\shortbox{b.}{jkl}
\end{xlist}
\z

Screenshot_2021-06-10_09-42-40

stefan11 commented 3 years ago

Yes, this is like having a table, isn't it? But the labels will not work for this. I cannot refer to (1a) and (1b) with the latex reference mechanism or can I?

Glottotopia commented 3 years ago

It has less overhead than a table. you can use (\ref{ex:mylabel}a)

Glottotopia commented 3 years ago

you do not need the {xlist} parts actually

Glottotopia commented 3 years ago
\ea 
\shortbox{a.}{abc}\shortbox{b.}{def} 
\z

\ea 
\shortbox{a.}{ghi}\shortbox{b.}{jkl} 
\z
Glottotopia commented 3 years ago

BTW the backward Slash in 29b \ I^n has extra horizontal space after it as compared to both 28b and 29a

stefan11 commented 3 years ago

But we need some tabular environment if the content spans more than one line, since the content should not start below a. and b. but below the first line of the second argument to shortbox (ghi or jkl).

stefan11 commented 3 years ago

I did it this way now:

\newcommand{\twomulticolexamples}[2]{
\begin{tabular}[t]{@{}l@{~~}l@{\hspace{1em}}l@{~~}l@{}}
a. & \parbox[t]{.4\textwidth}{#1} & b. & \parbox[t]{.4\textwidth}{#2}\\
\end{tabular}
}

There was a version with multicols that worked: If multicols was used outside the exe environment. But for one example the examples were too big for multicols but OK for my table solution, so I used my table solution.