Impaginazione errata di testo seguito da tabella

  • Creatore
    Topic
  • #87007
    Up
    0
    Down
    ::


    salve, ho un problema con una presentazione in beamer: vorrei creare una frame in cui inserire del testo seguito da una tabella. Purtroppo il risultato che ottengo è che il testo viene interrotto dalla tabella. Sapreste aiutarmi? Il codice è il seguente:

    `
    \frame{\frametitle{Integrazione adattiva: errore e tolleranza}
    \verb”for k=1:10\\
    \qquad tol=10$\wedge$(-k);\\
    \qquad $[$Q,fcount$]$=quad($@$humps,0,1,tol);\\
    \qquad err=Q$-$Qexact;\\
    end”
    \begin{tabular}{lccccccccc}
    \multicolumn{4}{c}{\bf }\\
    \bf tol &\bf Q
    & \bf fcount & \bf Errore\\ \hline
    1e-001&29.833284441748&25&-2.504e-002\\
    1e-002&29.857914446299&41&-4.109e-004\\
    1e-003&29.858342992376&69&1.760e-005\\
    1e-004&29.858324444375&93&-9.511e-007\\
    1e-005&29.858325515486&149&1.200e-007\\
    1e-006&29.858325401940&265&6.442e-009\\
    1e-007&29.858325394998&369&-5.005e-010\\
    1e-008&29.858325395526&605&2.764e-011\\
    1e-009&29.858325395496&1061&-2.636e-012\\
    1e-010&29.858325395498&1469&2.309e-013\\
    \end{tabular}
    }`

Visualizzazione 0 filoni di risposte
  • Autore
    Risposte
    • #87008
      Up
      0
      Down
      ::

      missile” post=86394salve, ho un problema con una presentazione in beamer: vorrei creare una frame in cui inserire del testo seguito da una tabella. Purtroppo il risultato che ottengo è che il testo viene interrotto dalla tabella. Sapreste aiutarmi? Il codice è il seguente:

      `
      \frame{\frametitle{Integrazione adattiva: errore e tolleranza}
      \verb”for k=1:10\\
      \qquad tol=10$\wedge$(-k);\\
      \qquad $[$Q,fcount$]$=quad($@$humps,0,1,tol);\\
      \qquad err=Q$-$Qexact;\\
      end”
      \begin{tabular}{lccccccccc}
      \multicolumn{4}{c}{\bf }\\
      \bf tol &\bf Q
      & \bf fcount & \bf Errore\\ \hline
      1e-001&29.833284441748&25&-2.504e-002\\
      1e-002&29.857914446299&41&-4.109e-004\\
      1e-003&29.858342992376&69&1.760e-005\\
      1e-004&29.858324444375&93&-9.511e-007\\
      1e-005&29.858325515486&149&1.200e-007\\
      1e-006&29.858325401940&265&6.442e-009\\
      1e-007&29.858325394998&369&-5.005e-010\\
      1e-008&29.858325395526&605&2.764e-011\\
      1e-009&29.858325395496&1061&-2.636e-012\\
      1e-010&29.858325395498&1469&2.309e-013\\
      \end{tabular}
      }`

      Ottieni vari errori con quel codice. Non puoi terminare righe all’interno di un comando [tt]\verb[/tt]. Tanto meno con [tt]\\[/tt]. Quello che ti serve è un ambiente [tt]tabbing[/tt]:
      `\documentclass{beamer}
      \begin{document}
      \begin{frame}
      \frametitle{Integrazione adattiva: errore e tolleranza}

      {\ttfamily
      \begin{tabbing}
      for \= k=1:10\\
      \> tol=10$\wedge$(-k);\\
      \> $[$Q,fcount$]$=quad($@$humps,0,1,tol);\\
      \> err=Q$-$Qexact;\\
      end
      \end{tabbing}}

      {\small\begin{tabular}{lccc}
      \bfseries tol &\bfseries Q & \bfseries fcount & \bfseries Errore\\
      \hline
      1e-001&29.833284441748&25&-2.504e-002\\
      1e-002&29.857914446299&41&-4.109e-004\\
      1e-003&29.858342992376&69&1.760e-005\\
      1e-004&29.858324444375&93&-9.511e-007\\
      1e-005&29.858325515486&149&1.200e-007\\
      1e-006&29.858325401940&265&6.442e-009\\
      1e-007&29.858325394998&369&-5.005e-010\\
      1e-008&29.858325395526&605&2.764e-011\\
      1e-009&29.858325395496&1061&-2.636e-012\\
      1e-010&29.858325395498&1469&2.309e-013\\
      \end{tabular}\par}
      \end{frame}
      \end{document}`
      Non usare mai [tt]\frame{…}[/tt], preferisci sempre la forma come ambiente. Se in un frame vuoi usare [tt]\verb[/tt] o l’ambiente [tt]verbatim[/tt] devi per forza aggiungere
      `\begin{frame}[fragile]`
      ma in questo caso non è necessario. Ho aggiunto [tt]\small[/tt] per la tabella, così non occupa troppo spazio.

      Benvenuto nel forum! 🙂

      Ciao
      Enrico

Visualizzazione 0 filoni di risposte
  • Devi essere connesso per rispondere a questo topic.

Go to top