# How to wrap text in flalign

not a duplicate of this question because I want to keep the equation numbering, so a tabular won't do (I think).

I am using flalign to typeset philosophical arguments. I also want to use hyperref to be able to hotlink back to the individual lines of the argument later in the document. This works fine until I have a sentence that needs to be wrapped to the next line.

MWE:

\documentclass[11pt]{amsart}
\usepackage{hyperref}
\begin{document}

\begin{flalign}
&& \text{This is premise 1.} && \text{(Premise)} \label{premise1} \\
&& \text{This is premise 2. What happens when the text goes over the line though? } && \text{(From \autoref{premise1})}\label{premise2}
\end{flalign}

Obviously \autoref{premise2} follows from \autoref{premise1}.

\end{document}

-
why use flalign at all??? it seems very strange to use a math alignment and then force it to be text in every cell, why not use a text alignment (or a list, which looks more suitable)? –  David Carlisle Apr 6 at 20:32
Because I'll end up with 50 or 60 different lines and I want to be able to autoref them. –  shane Apr 6 at 20:36
yes I you want automatic numbering/references but why the math? I couldn't tell from the example where the "long" text is in your real case or whether both fields need to allow long text. –  David Carlisle Apr 6 at 20:40
I think a theorem-like structure would be better from a conceptual point point of view, and it allows for numbering and referencing. –  Bernard Apr 6 at 20:40
Oh, sometimes the lines will need modal logic symbols, sometimes they need to just be plain text where the symbolism is overkill. ideally both fields would have to allow long text. –  shane Apr 6 at 20:42

I develop my suggestion of using a theorem-like structure, using ntheorem and cleveref:

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{hyperref}

\usepackage[thref, hyperref]{ntheorem}
\usepackage{cleveref}
\theoremstyle{plain}
\theorembodyfont{\upshape}
\theoremseparator{:}
\newtheorem{prem}{Premise}
\begin{document}

\begin{prem}\label{prem1}
This is the text of premise 1. A very promising premise
\end{prem}

\begin{prem}\label{prem2}
This is premise 2. What happens when the text goes over the line though? \\
\footnotesize(from \cref{prem1}).
\end{prem}
Obviously \cref{prem2} follows from \cref{prem1}.

\end{document}


-

You can use a \parbox:

## Notes:

• As others have stated, this is not a recommended approach. You may want to post a new question asking for suggestions on exactly the desired out along with the constraints that you have. I am sure there are many better ways to do this.

## Code:

\documentclass[11pt]{amsart}
\usepackage{hyperref}
\begin{document}

\begin{flalign}
&& \text{This is premise 1.} && \text{(Premise)} \label{premise1} \\
&& \parbox[t]{0.6\linewidth}{This is premise 2. What happens when the text goes over the line though? } && \text{(From \autoref{premise1})}\label{premise2}
\end{flalign}

Obviously \autoref{premise2} follows from \autoref{premise1}.

\end{document}

-
I like this a lot, but now the first line of (2) isn't aligned with the equation tag. Is there a way to fix that? –  shane Apr 6 at 20:41
You can, but I wouldn't:-) using fleqn is pretty odd anyway, but putting a fixed size parbox in it is doubly weird as you don't need to align fixed size boxes (they are fixed width anyway) and you don't need them to be in math:-) (It is though the answer to the question asked, of how to wrap text in a flalign) –  David Carlisle Apr 6 at 20:42
@shane: See updated solution. –  Peter Grill Apr 6 at 20:46
@shane -- from your comment, it sounds like you have the equation numbers on the right. (amsart default is on the left, but you didn't specify [reqno].) where do you want them -- left or right? –  barbara beeton Apr 6 at 21:01
Adding to @barbarabeeton's remark, this is very depending on the fact that amsart uses leqno and will dramatically break if the journal where the paper is submitted prefers reqno. –  egreg Apr 6 at 21:09

I don't think you want math at all.

\documentclass[11pt]{amsart}
\usepackage{longtable,array,hyperref}

\makeatletter
\newcounter{premise}
\newcommand\premiseautorefname{premise}

\makeatother

\begin{document}

\noindent X\dotfill X

\begin{longtable}{@{\stepcounter{premise}(\thepremise) }
>{\raggedright\arraybackslash}p{9cm}