Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I have looked at your table and rebuild the first part of it - the "var" part. Since building tables with latex isn't my speciality the code looks pretty messy but does the job. The relevant packages are <code>multirow</code> - to achieve the nested table - and <code>verbatim</code> to get the verbatim environment you asked for. As you will see I had to use additional <code>minipages</code> the handle the proper placing of the verbatim environment. You can comment them out to see the difference. Furthermore I started the table with the following line</p> <pre><code>\begin{tabular}{|l|l|l|p{8cm}|} </code></pre> <p>otherwise if you don't use <code>p</code>-aragraph colums for the last column you might get some errors using specified environments inside the columns.</p> <p>As references I would suggest the <a href="http://en.wikibooks.org/wiki/LaTeX" rel="noreferrer">latex-wikibooks</a> which have additional examples and tips.</p> <p>Here is the whole .tex example:</p> <pre><code>\documentclass[11pt]{article} \setlength{\textwidth}{20.0cm} \usepackage{verbatim} \usepackage{multirow} \begin{document} \begin{tabular}{|l|l|l|p{8cm}|} \hline Element &amp; Type &amp; Case &amp; Template\\ \hline \multirow{4}{*}{} Var &amp; id &amp; escaping or diff. level &amp; \begin{minipage}[t]{\linewidth} \begin{verbatim} return [offset](\%ebp) \end{verbatim} \end{minipage} \\ \cline{3-4} &amp; &amp; else &amp; \begin{minipage}[t]{\linewidth} \begin{verbatim} return TEMP(n) \end{verbatim} \end{minipage} \\ \cline{2-4} &amp; index &amp; - &amp; \begin{minipage}[t]{\linewidth} \begin{verbatim} a = A_var(var) movl a, t1 // do runtimecheck 5 t2 = A_exp(exp) movl t2, t3 addl $1, t3 return (t1, t3, 4) \end{verbatim} \end{minipage} \\ \cline{2-4} &amp; field &amp; - &amp; \begin{minipage}[t]{\linewidth} \begin{verbatim} a = A_var(var) movl a, t1 // hvis a ikke er temp // do runtimecheck 5 movl [offset], t3 return (t1, t3, 4) \end{verbatim} \end{minipage} \\ \hline \end{tabular} \end{document} </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload