Pregunta

I have some xml text to be inserted in the document as plain text. I directly inserted but it gives weird symbols. How can I avoid that?

XML I want to add:

\begin{tabular}{|c|}

<table>
<tr>
<td> Title and Logo</td>
</tr>
<tr>
<td> left Column </td>
<td> main table </td>
</tr>
</table>


\end{tabular}

And the output is like :

¡table¿ ¡tr¿ ¡td¿ Title and Logo¡/td¿ ¡/tr¿ ¡tr¿ ¡td¿ left Column ¡/td¿ ¡td¿ main table ¡/td¿ ¡/tr¿ ¡/table

Basically I want to add the HTML code in a tabular. How can I do that?

¿Fue útil?

Solución

Have you tried the verbatim environment?

\begin{verbatim}
  Your text here.
\end{verbatim}

Without knowing what your "weird symbols" are, it's difficult to suggest a solution to your problem.


Update: In order to embed a verbatim environment in a table cell, you need to change the column to a paragraph column (using either p, m, or b as the column specifier); e.g.

\begin{tabular}{|p{10cm}|}
  \begin{verbatim}
    Your text here.
  \end{verbatim}
\end{tabular}

See Wikibooks for more information.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top