不是重复的这个问题因为我想保留方程式编号,所以表格不行(我认为)。
我正在使用 flalign 排版哲学论点。我还想使用 hyperref 来链接回文档后面论点的各个行。这很好用,直到我有一个需要换行到下一行的句子。
梅威瑟:
\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}
答案1
我提出了使用类似定理的结构的建议,使用ntheorem
和cleveref
:
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage[thref, hyperref]{ntheorem}
\usepackage{cleveref}
\theoremstyle{plain}
\theoremheaderfont{\bfseries}
\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}
答案2
您可以使用\parbox
:
笔记:
- 正如其他人所说,这是不是推荐的方法。您可能想要发布一个新问题,询问有关确切期望结果以及您遇到的限制的建议。我相信有很多更好的方法可以做到这一点。
代码:
\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}
答案3
我认为你根本不想要数学。
\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}
>{\addtocounter{premise}{-1}\refstepcounter{premise}\raggedleft\arraybackslash}p{2.5cm}}
This is premise 1. &(Premise) \label{premise1} \\
This is premise 2. What happens when the text goes over the line though? &
From \autoref{premise1}\label{premise2}
\end{longtable}
Obviously \autoref{premise2} follows from \autoref{premise1}.
\end{document}