1

I have the following code and I want to do two things to it.First, I want to have the output maximally on the left, that is I do not want any indentation of the stuff in the align environment, I want them to be in the same alignment as my text.The second thing I want to do is place a box around the entire content of the align environment. If anyone has any suggestions, I would be most grateful!

I want this to be left-aligned in the same position as the following equations.

\documentclass{article}
\usepackage[margin= 1in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{tree-dvips}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usepackage[affil-it]{authblk}
\usepackage{tipa}
\usepackage{tabularx}
\usepackage{enumitem}
\usepackage{parcolumns}
\usepackage{natbib}
\usepackage{gb4e}
\usepackage{stmaryrd}
\usepackage{amssymb, amsmath}
\usepackage{qtree}
    \tikzset{small/.style={level distance=25pt,sibling distance=0pt}}

\usepackage{hyperref}
\begin{document}
\begin{flalign*}
&\llbracket \text{before} (\mathscr{B} \vee \mathscr{C}) \rrbracket                         \\
&\equiv \lambda t. \Big(\neg \exists t' \big[t' \le t \wedge \llbracket (\mathscr{B} \vee \mathscr{C}) \rrbracket(t') \big] \Big)                        \tag{definition}\\
&\equiv \lambda t. \Big(\forall t' \neg \big[t' \le t \wedge \llbracket (\mathscr{B} \vee \mathscr{C}) \rrbracket(t') \big] \Big)                    \tag{$\neg (\exists x)[\mathscr{P}(x)] \equiv  (\forall x)\neg[\mathscr{P}(x)]$}\\
&\equiv \lambda t. \Big(\forall t' \neg \big[t' \le t \wedge (\llbracket \mathscr{B}) \rrbracket(t') \vee \llbracket \mathscr{C}) \rrbracket(t') ) \big] \Big)                   \tag{point-wise disjunction}\\
&\equiv \lambda t. \Big(\forall t'  \neg \Big[ \Big(t' \le t \wedge \llbracket \mathscr{B}) \rrbracket(t') \Big) \vee \Big(t' \le t \wedge \llbracket \mathscr{C}) \rrbracket(t') \Big) \Big] \Big)                           \tag{$\mathscr{A}\wedge(\mathscr{B} \vee \mathscr{C}) \equiv (\mathscr{A} \wedge \mathscr{B}) \vee (\mathscr{A} \wedge \mathscr{C}))$}\\
&\equiv \lambda t. \Big(\forall t'  \Big[ \neg\Big(t' \le t \wedge \llbracket \mathscr{B}) \rrbracket(t') \Big) \wedge \neg\Big(t' \le t \wedge \llbracket \mathscr{C}) \rrbracket(t') \Big) \Big] \Big)   \tag{De Morgan}\\
&\equiv \lambda t.  \Big[ \forall t'\neg\Big(t' \le t \wedge \llbracket \mathscr{B}) \rrbracket(t') \Big) \wedge \forall t'\neg\Big(t' \le t \wedge \llbracket \mathscr{C}) \rrbracket(t') \Big) \Big]          \tag{$\forall x[\mathscr{P}(x) \vee \mathscr{R}(x)] \equiv \forall x[\mathscr{P}(x)] \vee \forall x[\mathscr{R}(x)]$}\\
&\equiv \lambda t.  \Big[ \forall t'\neg\Big(t' \le t \wedge \llbracket \mathscr{B}) \rrbracket(t') \Big) \Big] \wedge \lambda t. \Big[ \forall t'\neg\Big(t' \le t \wedge \llbracket \mathscr{C}) \rrbracket(t') \Big) \Big] \tag{point-wise conjunction}\\
&\equiv \lambda t.  \Big[ \neg\exists t'\Big(t' \le t \wedge \llbracket \mathscr{B}) \rrbracket(t') \Big) \Big] \wedge \lambda t. \Big[ \neg\exists t'\Big(t' \le t \wedge\llbracket \mathscr{C}) \rrbracket(t') \Big) \Big] \tag{$\neg (\exists x)[\mathscr{P}(x)] \equiv  (\forall x)\neg[\mathscr{P}(x)]$}\\
& \equiv \llbracket \text{before} (\mathscr{B}) \wedge \text{before} (\mathscr{C})\rrbracket \tag{definition}
\end{flalign*}
\end{document}
  • 1
    If you give us a minimal but complete working example, it will be easy to help you. This is, complete your code starting with \documentcass and finishing with \end{document} and insert a preamble with all needed packages. – Ignasi Jun 09 '15 at 06:17
  • Done! Most packages may be irrelevant for this but I am just listing them anyway in case of potential conflicts. – Orest Xherija Jun 09 '15 at 06:25
  • 1
    For boxes around equations: http://tex.stackexchange.com/q/109900/1952 – Ignasi Jun 09 '15 at 06:28
  • 1
    Your code doesn't compile in my system. Something is missing. – Ignasi Jun 09 '15 at 06:31
  • 1
    Please minimize your code. It makes it much easier for us. If you get in conflicts later, just do another question. – LaRiFaRi Jun 09 '15 at 07:22

2 Answers2

2

Here is an example of using falling and tikzmark to place a box around he entire set of equations:

enter image description here

Notes:

  • This does require two runs. First one to determine the locations, and the second to do the drawing.
  • Also note the trailing & on the F = ma. This is required to get the equations al the way to the left.

Code:

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{showframe}
\usetikzlibrary{calc}
\usepackage{tikzpagenodes}

\newcommand{\mytikzmark}[1]{\tikz[overlay,remember picture] \node[baseline] (#1) {\strut};} \newcommand{\xSep}{2.0pt} \newcommand{\DrawBox}[3][]{% \begin{tikzpicture}[remember picture, overlay] \coordinate (Right Side) at (#3.south -| current page text area.north east); \draw [#1] (#2.north) rectangle %(current page text area.east); (Right Side); \end{tikzpicture}% }%

\begin{document} I want this to be left-aligned in the same position as the following equations, with no indentation from the left margin \begin{flalign} \mytikzmark{start} F & = ma &&\text{Newtons famous equation.} &\ E &= mc^2 && \text{Einstein's discovery!}\mytikzmark{end} \end{flalign} \DrawBox[draw=red, thick]{start}{end}% \end{document}

Peter Grill
  • 223,288
1

enter image description here

\documentclass{article}
\usepackage{empheq}

\begin{document} I want this to be left-aligned in the same position as the following equations, with no indentation from the left margin \begin{empheq}[box=\fbox]{flalign*} F & = ma && \text{Newtons famous equation.} & \ E &= mc^2 && \text{Einstein's discovery!}
\end{empheq} \end{document}

This is slightly simplified and less fancy than what proposed in @Peter Grill answer.

I used empheq package. As stated in package documentation:

The empheq package can best be described as a visual markup extension to amsmath. In short it offers a) a multi line equivalent of \boxed from amsmath and b) a way to produce arbitrary delimiters that span entire math displays.

Zarko
  • 296,517