0

with this code

\documentclass[11pt]{article}
\usepackage{array}
%\usepackage{multirow}
\usepackage{blindtext}
\usepackage{lipsum}  
\usepackage{geometry}
 \geometry{
 a3paper,
 total={297mm,420mm},
 left=20mm,
 top=10mm,
 %right=20mm
% bmargin=20mm
 }
 
\begin{document}
%\section{Some dummy text}
%\blindtext[10]
%\lipsum[2-14]
\begin{tabular}{p{0.3\textwidth}>{\centering}p{0.3\textwidth}>{\centering}p{0.3\textwidth}>{\centering\arraybackslash}p{0.3\textwidth}}
\hline
%\multirow{2}{*}{Country}&\multicolumn{2}{c}{Population}&\multirow{2}{*}{Change (\%)}\\\cline{2-3}
&2016&2017&\\
\hline
%China&1,403,500,365&1,409,517,397&+0.4\%\\
testo1 testo1 testo1testo1 testo1 testo1testo1 testo1 testo1testo1 testo1 testo1 

&
testo2 testo2 testo2testo2 testo2 testo2testo2 testo2 testo2testo2 testo2 testo2  

&
testo3 testo3 testo3testo3 testo3 testo3 testo3 testo3 testo3testo3 testo3 testo3&+0.4\%\\

testo1 testo1 testo1testo1 testo1 testo1testo1 testo1 testo1testo1 testo1 testo1 

&
testo2 testo2 testo2testo2 testo2 testo2testo2 testo2 testo2testo2 testo2 testo2  

&
testo3 testo3 testo3testo3 testo3 testo3 testo3 testo3 testo3testo3 testo3 testo3&+0.4\%\\

%\hline
\end{tabular}
\end{document}

I would have an A3 page with 20mm margin on top, bottom, left and right, but it produces just left and top margin, not left and bottom margin. why?

6
  • 1
    What exactly are you trying to do here? Note that your geometry options gives a warning in the log. ANd why both a3paper and total? Are you trying to do a3paper landscape?
    – daleif
    Feb 28 at 11:53
  • no, I need A3 portrait with 3 column and 5 horizontal line. Then I will put inside text in each cell
    – RenatoP
    Feb 28 at 12:21
  • Please note: 4 * (0.3\textwidth + 2\tabcolsep) = 1.2 \textwidth + 8 \tabcolsep > 1 \textwidth and don't forget \parindent.
    – cabohah
    Feb 28 at 12:27
  • If I remove total and adjusts as cabohah suggests I get an a3paper with left margin = 20mm, top = 10mm. I'd probably use margin=20mm instead to set all at once.
    – daleif
    Feb 28 at 12:34
  • @daleif: sorry I do not understand.can you made me an example?
    – RenatoP
    Feb 28 at 16:00

1 Answer 1

1

I would use a tabularx (or xltabular if page breaks are needed). For better lines, I also suggest to use booktabs. And IMHO it does not make sense, to make the last column have a quarter of the page width, if there are only small percentage values in it. For the paper size A3 it is enough to load geometry with option a3paper. And to set all margins to 2cm option margin=2cm would be a good idea. If you don't want to use page header and footer, also options nohead and nofoot or noheadfoot can be added, depending on the expected result.

So I would suggest, for example:

\documentclass[11pt]{article}
\usepackage{array}
%\usepackage{multirow}
\usepackage{blindtext}
\usepackage[a3paper,margin=2cm,noheadfoot]{geometry}
\pagestyle{empty}

\usepackage{tabularx}
\usepackage{booktabs}
 
\begin{document}
\noindent
\begin{tabularx}{\textwidth}{>{\raggedright}X>{\centering}X>{\raggedleft}Xr}
\toprule
&2016&\centering 2017&\\
\toprule
testo1 testo1 testo1testo1 testo1 testo1testo1 testo1 testo1testo1 testo1
testo1
& testo2 testo2 testo2testo2 testo2 testo2testo2 testo2 testo2testo2 testo2
  testo2  
& testo3 testo3 testo3testo3 testo3 testo3 testo3 testo3 testo3testo3 testo3
testo 3
&+0.4\%\\
testo1 testo1 testo1testo1 testo1 testo1testo1 testo1 testo1testo1 testo1
testo1 
& testo2 testo2 testo2testo2 testo2 testo2testo2 testo2 testo2testo2 testo2
  testo2   
& testo3 testo3 testo3testo3 testo3 testo3 testo3 testo3 testo3testo3 testo3
testo3
&+0.4\%\\
\blindtext[1] & \blindtext[2] & \blindtext[3] &+0.4\% \\
\bottomrule
\end{tabularx}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .