简体   繁体   中英

Latex Minted in table not correctly formed

I am trying to insert some xml code formatted with minted inside a tabular, however i cannot make it work. This is my actual code:

\begin{center}
\begin{tabular}{|l|c|l|l|}
\hline
    Nome & Metodo & URL & Risposta server \\ \hline\hline
    Inserimento dati & PUT & http://www.asllocale.it/int?key=...\newline
    \begin{minted}{xml}
    <ciao></ciao>
    \end{minted}
    & risposta \\ [0.5ex]\hline
    Visualizzazione interventi & GET & URL & risposta \\ [0.5ex]\hline
\end{tabular}
\end{center}

and the output is: first code

as you can see the code is outside the paper and I cannot see the entire table

Than I searched ad came up with this solution:

\begin{center}
\begin{tabular}{|l|c|p|l|}
\hline
    Nome & Metodo & URL & Risposta server \\ \hline\hline
    Inserimento dati & PUT & http://www.asllocale.it/int?key=...\newline
   \begin{minted}{xml}
   <ciao>
   ...
   </ciao>
   \end{minted}
    & risposta \\ [0.5ex]\hline
    Visualizzazione interventi & GET & URL & risposta \\ [0.5ex]\hline
\end{tabular}
\end{center}

and got this output: second code

with something like 12 errors. I am stuck pls help

I solved by changing the tabular begin in:

 \begin{tabular}{|l|c|p{0.6\textwidth}|l|}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM