1

Please suggest as how can I implement the following code:

\documentclass{article}
\usepackage{amssymb,ntheorem,float}
\begin{document}
We summarize our results.  
\begin{table}[H] 
\centering % used for centering table 
\begin{tabular}{|c|c|c|} 
\hline\hline 
$n$ & $m$ & Proof\\ 
\hline 
$1$ & 2 & \ref{1}\\
\hline
$3$ & 4 & \ref{2}\\
\hline
\end{tabular} 
\end{table}
\noindent\textbf{Proofs:}\\
1.\label{1} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam viverra
dictum nulla, a pretium dui malesuada in. Aliquam id blandit lectus. Sed cursus lorem  
\\\\
2.\label{2} more blah blah
\end{document} 

Now I want \ref{1} to write as '1' and when it is clicked it should go to proof 1. Secondly I want that the the lipsum text should all be aligned such that a little margin is left where I put 1. as the indicator of proof 1

How do I implement this?

6
  • You need to use a decent environment (provided by a package) thats steps a referencable counter. Right now, there is none set in your document.
    – Johannes_B
    Aug 24, 2014 at 7:35
  • I can see from your document, that you are a beginner. Please read some basic introductory material.
    – Johannes_B
    Aug 24, 2014 at 7:36
  • You can use ntheorem for create and label correctly the proof in your code. Check this and this that can be useful for you.
    – Aradnix
    Aug 24, 2014 at 7:40
  • @Aradnix: Thanks. Your links don't contain anything about ntheorem though?
    – user8735
    Aug 24, 2014 at 7:49
  • @Shahab You're right, I forgot to include it. Sorry... in this link you can check the package documentation. Luck.
    – Aradnix
    Aug 24, 2014 at 8:03

1 Answer 1

2

Putting the Proofs in a enumerate environment solves your problem with the spacing and aligning of the "lorem ipsum..." (This is a standard environment. I agree with Johanes_B, so please read some introductory material).

Using the hyperref package makes the references in the table clickable.

\documentclass{article}
\usepackage{float}
\usepackage[colorlinks=true,linkcolor=black,citecolor=black]{hyperref} % make proofs clickable    

\begin{document}

We summarize our results.  

\begin{table}[H] 
    \centering % used for centering table 
    \begin{tabular}{|c|c|c|} 
        \hline\hline 
        $n$ & $m$ & Proof\\ 
        \hline 
        $1$ & 2 & \ref{proof:1}\\
        \hline
        $3$ & 4 & \ref{proof:2}\\
        \hline
    \end{tabular} 
\end{table}

\noindent\textbf{Proofs:}
\begin{enumerate}
    \item\label{proof:1} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam viverra
    dictum nulla, a pretium dui malesuada in. Aliquam id blandit lectus. Sed cursus lorem 
    \item\label{proof:2} more blah blah
\end{enumerate}
\end{document}

enumerate and hyperref

You must log in to answer this question.