4

I have relatively complex logical proofs, for which I am using the ebproof package to type them. I have already reduced the font size to \footnotesize. Anything smaller, and it becomes illegible. Hence, I have to break the margins of the respective page.

I have tried solutions from this forum that are apt for text or images, but I seem not to be able to make them work. My goal is to either center or move this code block by hand to the left or right.

\documentclass{article}
\usepackage{amssymb}
\usepackage{ebproof}

\begin{document}

\begin{prooftree*}[%
    separation = .1em, 
    template = \footnotesize$\inserttext$,
    left label template=\footnotesize{\inserttext},
    label separation = .1em]
    %%%
    \hypo{*}
    \infer[left label = $\mathbb{R}$]1{j(x,y), x\geq \gamma \vdash [x' = -kx, y' = 0] (-kx \geq 0 \vee 0 \geq 0)}
    \infer[left label = $\rightarrow R$]1{j(x,y) \vdash x \geq \gamma \rightarrow [x' = -kx, y' = 0] (-kx \geq 0 \vee 0 \geq 0)}
    %%%
    \hypo{*}
    \infer[left label = $\mathbb{R}$]1{j(x,y), x < \gamma \vdash [x' = 0, y' = -ky](0 \geq 0 \vee -ky \geq 0)}
    \infer[left label = $\rightarrow R$]1{j(x,y) \vdash x < \gamma \rightarrow [x' = 0, y' = -ky](0 \geq 0 \vee -ky \geq 0)}
    %%%
    \infer[left label = $\wedge R$]2{j(x,y) \vdash x\geq \gamma \rightarrow [x' = -kx, y' = 0](-kx \geq 0 \vee 0 \geq 0) \wedge x < \gamma \rightarrow [x' = 0,y' = -ky](0 \geq 0 \vee -ky \geq 0)}
    \infer[left label = chase]1{}
\end{prooftree*}

\end{document}

enter image description here

2 Answers 2

5

The solution with addmargin, which I've already shown an hour ago here, also works with ebproof:

\documentclass{article}
\usepackage{amssymb}
\usepackage{ebproof}
\usepackage{scrextend}

\begin{document}
\begin{addmargin}{-\dimeval{\marginparwidth+\marginparsep}}
\begin{prooftree*}[%
    separation = .1em, 
    template = \footnotesize$\inserttext$,
    left label template=\footnotesize{\inserttext},
    label separation = .1em]
    %%%
    \hypo{*}
    \infer[left label = $\mathbb{R}$]1{j(x,y), x\geq \gamma \vdash [x' = -kx, y' = 0] (-kx \geq 0 \vee 0 \geq 0)}
    \infer[left label = $\rightarrow R$]1{j(x,y) \vdash x \geq \gamma \rightarrow [x' = -kx, y' = 0] (-kx \geq 0 \vee 0 \geq 0)}
    %%%
    \hypo{*}
    \infer[left label = $\mathbb{R}$]1{j(x,y), x < \gamma \vdash [x' = 0, y' = -ky](0 \geq 0 \vee -ky \geq 0)}
    \infer[left label = $\rightarrow R$]1{j(x,y) \vdash x < \gamma \rightarrow [x' = 0, y' = -ky](0 \geq 0 \vee -ky \geq 0)}
    %%%
    \infer[left label = $\wedge R$]2{j(x,y) \vdash x\geq \gamma \rightarrow [x' = -kx, y' = 0](-kx \geq 0 \vee 0 \geq 0) \wedge x < \gamma \rightarrow [x' = 0,y' = -ky](0 \geq 0 \vee -ky \geq 0)}
    \infer[left label = chase]1{}
\end{prooftree*}
\end{addmargin}
\end{document}

enter image description here

There are several alternatives for using scrextend and addmargin, e.g. package fullwidth and environment fullwidth.

2
  • Thanks @cabohah - somehow I am not able to get '-\dimeval' to work. Your MWE produces an error of undefined control sequence for that term. I searched for the potential issue, but I could not find anything. Any ideas?
    – freshens
    Commented Aug 7 at 7:21
  • @freshens Then your LaTeX is no up-to-date. \dimeval is available from LaTeX 2022-06-01 (see ltnews35.pdf). However, you can replace \dimeval{\marginparwidth+\marginparsep} by any length you want or by \dimexpr \marginparwidth+\marginparsep\relax.
    – cabohah
    Commented Aug 7 at 17:19
5

You can use prooftree inside \[...\], with the famous trick* for ignoring the width of the material.

\documentclass{article}
\usepackage{amssymb}
\usepackage{ebproof}

\usepackage{showframe}

\begin{document}

\noindent X\dotfill X

\[
\hspace{10000pt minus 1fil}
\begin{prooftree}[%
    separation = .1em, 
    template = \footnotesize$\inserttext$,
    left label template=\footnotesize{\inserttext},
    label separation = .1em,
]
    %%%
    \hypo{*}
    \infer[left label = $\mathbb{R}$]1{j(x,y), x\geq \gamma \vdash [x' = -kx, y' = 0] (-kx \geq 0 \vee 0 \geq 0)}
    \infer[left label = $\rightarrow R$]1{j(x,y) \vdash x \geq \gamma \rightarrow [x' = -kx, y' = 0] (-kx \geq 0 \vee 0 \geq 0)}
    %%%
    \hypo{*}
    \infer[left label = $\mathbb{R}$]1{j(x,y), x < \gamma \vdash [x' = 0, y' = -ky](0 \geq 0 \vee -ky \geq 0)}
    \infer[left label = $\rightarrow R$]1{j(x,y) \vdash x < \gamma \rightarrow [x' = 0, y' = -ky](0 \geq 0 \vee -ky \geq 0)}
    %%%
    \infer[left label = $\wedge R$]2{j(x,y) \vdash x\geq \gamma \rightarrow [x' = -kx, y' = 0](-kx \geq 0 \vee 0 \geq 0) \wedge x < \gamma \rightarrow [x' = 0,y' = -ky](0 \geq 0 \vee -ky \geq 0)}
    \infer[left label = chase]1{}
\end{prooftree}
\hspace{10000pt minus 1fil}
\]

\end{document}

output

Footnote.
* See Exercise 19.8, page 190, in the TeXbook, solution on page 326.

1
  • 1
    Seems you could alternatively use \hss instead of \hspace{10000pt minus 1fil}. (Just because it is shorter).
    – cabohah
    Commented Aug 6 at 15:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .