- Questo topic ha 6 risposte, 3 partecipanti ed è stato aggiornato l'ultima volta 10 anni, 5 mesi fa da
illinguista1972.
-
CreatoreTopic
-
23 Marzo 2016 alle 16:21 #105773::
Salve, ho riprodotto la seguente tabella sia usando l’ambiente tabular che tabularx , con le relative varianti.
Purtroppo, però, l’effetto finale orizzontale non è dei migliori, in quanto non leggibile (troppo piccolo), oppure tutto il testo troppo ammassato.Vorrei evitare di mettere tale tabella in verticale.
Qualche suggerimento?
Grazie 🙂
[attachment=1577]dronivietnam.png[/attachment]
Attachments:
You must be logged in to view attached files. -
CreatoreTopic
-
AutoreRisposte
-
-
23 Marzo 2016 alle 17:07 #105774::
golden_boy” post=105846Salve, ho riprodotto la seguente tabella sia usando l’ambiente tabular che tabularx , con le relative varianti.
Purtroppo, però, l’effetto finale orizzontale non è dei migliori, in quanto non leggibile (troppo piccolo), oppure tutto il testo troppo ammassato.Vorrei evitare di mettere tale tabella in verticale.
Qualche suggerimento?
Grazie 🙂
[attachment=1577]dronivietnam.png[/attachment]Sì, quello di farci vedere i codici con cui hai fatto le prove.
Ciao
Tommaso
-
23 Marzo 2016 alle 17:33 #105775::
Ecco il codice`
\documentclass[11pt,a4paper,oneside]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}\usepackage{tabularx}
\begin{document}
\begin{center}
\begin{tabularx}{\textwidth}{|X|X|X|X|X|}
\hline
Date & Interceptor Type/Weapon Type & Interceptor Unit & Drone Type & USAF Unit/Remarks
\\
\hline
3/04/1966 & MiG-21/AA-2 Atoll (K-13) Air to Air Missile & 921st Fighter Regiment (FR) & Ryan Firebee AQM-34 series & 350th Strategic Reconnaissance Squadron (SRS), 100th Strategic Reconnaissance Wing (SRW)/This was the first U.S. drone downed by the NVAF.
\\
\hline
3/05/1966 & MiG-21/AA-2 Atoll & 921st FR & AQM-34 & 350th SRS, 100th SRW
\\
\hline
\end{tabularx}
\end{center}\end{document}
`
-
23 Marzo 2016 alle 23:03 #105776::
`
\documentclass[a4paper]{article}\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
% \usepackage[italian]{babel} % it looks like you are writing in English!\usepackage{caption}
\usepackage{tabularx}
\usepackage{rotating}\captionsetup{
tableposition = top,
figureposition = bottom
}
\newcolumntype{Y}{>{\raggedright\arraybackslash}X}\begin{document}
It’s better to use a sideways table, obviously floating:
see Table~\ref{tab:drones}. Using a smaller font (say, \verb”\small”)
might also help.\begin{sidewaystable}
\caption{Drones}
\label{tab:drones}
\begin{tabularx}{\textwidth}{|l|Y|Y|Y|Y|}
\hline
Date & Interceptor Type/Weapon Type & Interceptor Unit & Drone Type & USAF Unit/Remarks
\\
\hline
3/04/1966 & MiG-21/AA-2 Atoll (K-13) Air to Air Missile & 921st Fighter Regiment (FR) & Ryan Firebee AQM-34 series & 350th Strategic Reconnaissance Squadron (SRS), 100th Strategic Reconnaissance Wing (SRW)/This was the first U.S. drone downed by the NVAF.
\\
\hline
3/05/1966 & MiG-21/AA-2 Atoll & 921st FR & AQM-34 & 350th SRS, 100th SRW
\\
\hline
\end{tabularx}
\end{sidewaystable}In your sample code, you didn’t make use of the \textsf{booktabs} package.
I heartily disagree, but, as you can see, I~respected your choice.\end{document}
`Modifica: Volevo poi aggiungere questo commento (chiedo scusa, ma ci ho messo più di mezz’ora per ritrovarlo).
Ciao.
—
Gustavo
-
24 Marzo 2016 alle 13:19 #105777
-
24 Marzo 2016 alle 20:14 #105778::
Il succo del mio suggerimento era di definire un`\newcolumntype{Y}{>{\raggedright\arraybackslash}X}`e poi di usare tale nuovo specificatore di colonna [tt]Y[/tt] per evitare i messaggi di [tt]Underfull \hbox[/tt]. Se non si vuole assolutamente comporre la tabella in verticale, si può anche lasciare che essa invada parte dei margini, oltre a usare un carattere più piccolo:
`
\documentclass[a4paper]{article}\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
% \usepackage[italian]{babel} % it looks like you are writing in English!\usepackage{caption}
\usepackage{tabularx}
\usepackage{rotating}\captionsetup{
tableposition = top,
figureposition = bottom
}
\newcolumntype{Y}{>{\raggedright\arraybackslash}X}\begin{document}
\section{First version: sideways table}
It’s better to use a sideways table, obviously floating:
see Table~\ref{tab:drones-sw}.
Using a smaller font (say, \verb”\small”) might also help.\begin{sidewaystable}
\caption{Drones}
\label{tab:drones-sw}
\begin{tabularx}{\textwidth}{|l|Y|Y|Y|Y|}
\hline
Date & Interceptor Type/Weapon Type & Interceptor Unit & Drone Type & USAF Unit/Remarks
\\
\hline
3/04/1966 & MiG-21/AA-2 Atoll (K-13) Air to Air Missile & 921st Fighter Regiment (FR) & Ryan Firebee AQM-34 series & 350th Strategic Reconnaissance Squadron (SRS), 100th Strategic Reconnaissance Wing (SRW)/This was the first U.S. drone downed by the NVAF.
\\
\hline
3/05/1966 & MiG-21/AA-2 Atoll & 921st FR & AQM-34 & 350th SRS, 100th SRW
\\
\hline
\end{tabularx}
\end{sidewaystable}In your sample code, you didn’t make use of the \textsf{booktabs} package.
I heartily disagree, but, as you can see, I~respected your choice.\section{Second version: upright table}
If you insist on having the table set in its ordinary, upright orientation,
look, instead, at Table~\ref{tab:drones-ur}. At least, we are not getting
any \verb”Underfull \hbox” warning!\begin{table}[htp]
\caption{Drones}
\label{tab:drones-ur}
\footnotesize % reduce font size
\centerline{% let the table protrude into the margins
\begin{tabularx}{.8\paperwidth}{|l|Y|Y|Y|Y|}
\hline
Date & Interceptor Type/Weapon Type & Interceptor Unit & Drone Type & USAF Unit/Remarks
\\
\hline
3/04/1966 & MiG-21/AA-2 Atoll (K-13) Air to Air Missile & 921st Fighter Regiment (FR) & Ryan Firebee AQM-34 series & 350th Strategic Reconnaissance Squadron (SRS), 100th Strategic Reconnaissance Wing (SRW)/This was the first U.S. drone downed by the NVAF.
\\
\hline
3/05/1966 & MiG-21/AA-2 Atoll & 921st FR & AQM-34 & 350th SRS, 100th SRW
\\
\hline
\end{tabularx}%
} % end of \centerline
\end{table}\end{document}
`
È chiaro che, alla fin delle fini, qualche compromesso bisogna accettarlo: un autobus parcheggiato nello spazio di un’autovettura normale semplicemente non ci sta.Ciao.
—
Gustavo
-
25 Marzo 2016 alle 7:10 #105779
-
-
AutoreRisposte
- Devi essere connesso per rispondere a questo topic.