3

First thing first, the code listed as below,

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, top=0.2in, bottom=0.15in, left=0.25in, right=0.25in]{geometry}
\usepackage{multirow,array,varwidth,spreadtab,caption}
\usepackage{booktabs}
\usepackage{siunitx,booktabs,caption}
\usepackage{multirow,array,varwidth,spreadtab,}
\usepackage{siunitx,booktabs,caption}
\usepackage{ragged2e}
\usepackage{layout}
\usepackage{float}
\restylefloat{table}
\newcolumntype{L}[1]{>{\RaggedRight\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\RaggedLeft\hspace{0pt}}p{#1}}
\usepackage[scaled]{helvet}
\renewcommand\familydefault{\sfdefault} 
\usepackage[T1]{fontenc}
\usepackage{pythontex}

\begin{document}
\noindent
\begin{minipage}[t]{.11\textwidth}
\raggedright
\raggedleft
\scriptsize
\begin{tabular}[t]{@{} r l @{}}% <-- Don't forget @{}!
\textbf{COMPANY:}&{ffffff}\\ %%enter value in the space after "&"
\textbf{FACTORY:}&\\
\textbf{FIELD:}&  \\%%enter value in the space after "&"
\textbf{LEASE:}&  fadsfasdfasd  \\%%enter value in the space after "&"
\end{tabular}
\end{minipage}% <-- Don't forget this one
%
\hfill
%
 \begin{minipage}[c]{.735\textwidth}
  \small
    \centering
  \textbf{PETROBRA COMPANY LIMITED} \\
  \textbf{THE ESTIMATE OF RESERVES AND FUTURE INCOME ATTRIBUTABLE} \\
  \textbf{TO CERTAIN INTERESTS} \\
  \textbf{As of JAN 1 2017}}
\end{minipage}
%
\hfill
%
\begin{minipage}[t]{.135\textwidth}
\raggedleft
\scriptsize
\begin{tabular}[t]{@{} r l @{}}% <-- Don't forget @{}!
\textbf{ID:} &         gsfd  \\ %%enter value in the space after "&"
\textbf{MAJOR PHASE:} & Oil \\%%enter value in the space after "&"
\textbf{AAAA Reserves:} & gfdsgsd \\%%enter value in the space after "&"
\textbf{Dev.Status:} &     gsdf\\%%enter value in the space after "&"
\end{tabular}
\end{minipage}
\end{document}

What I want to do are,

  1. minimize or reduce the gap between "COMPANY" and "ffffff" Adjust;

  2. right side mini pages position, make it to left enough to allow long ID existing;

  3. Make sure mid-mini page is centered.

enter image description here

P.S Even I added @{} in table environment, it wont' help much.

4
  • And which document class you use?Please add preamble to your document.
    – Zarko
    Mar 8, 2016 at 3:28
  • For #1 (and maybe #2), you are not paying enough attention to your <-- Don't forget @{}! comments. For #3, centred in relation to what? The physical page? the textblock? something else? You really should provide a complete MWE....
    – jon
    Mar 8, 2016 at 3:33
  • @zarko Please see the complete MWE. Thanks. Mar 8, 2016 at 4:02
  • @jon Please see attached full MWE, thanks a lot. Center to the width of page, which is A4paper. Mar 8, 2016 at 4:02

1 Answer 1

3

See, if this is similar to layout, which you like to achieve:

enter image description here

\documentclass{article}
\usepackage[a4paper, top=0.2in, bottom=0.15in, 
            left=0.25in, right=0.25in,
            ]{geometry}
    \usepackage{array}
    \usepackage{calc}% <-- added

\begin{document}
\setlength\tabcolsep{2pt}
\noindent\begin{tabular}{|@{}
        >{\scriptsize}m{0.2\textwidth-1\tabcolsep}|
        >{\centering\bfseries}m{.6\textwidth-4\tabcolsep}|
        >{\raggedleft\scriptsize}m{.2\textwidth-\tabcolsep}|
                   @{}|}
\begin{tabular}[t]{@{}>{\bfseries}rl}% <-- Don't forget @{}!
COMPANY:  & ffffff          \\ %%enter value in the space after "&"
FACTORY:  &                 \\
FIELD:    &                 \\%%enter value in the space after "&"
LEASE:    & fadsfasdfasd    \\%%enter value in the space after "&"
\end{tabular}
%
&
%
PETROBRA COMPANY LIMITED 

THE ESTIMATE OF RESERVES AND FUTURE INCOME ATTRIBUTABLE %

TO CERTAIN INTERESTS 

As of JAN 1 2017
%
&
%
\begin{tabular}[t]{>{\bfseries}rl@{}}% <-- Don't forget @{}!
ID:             & gsfd      \\%%enter value in the space after "&"
MAJOR PHASE:    & Oil       \\%%enter value in the space after "&"
AAAA Reserves:  & gfdsgsd   \\%%enter value in the space after "&"
Dev.Status:     & gsdf      \\%%enter value in the space after "&"
\end{tabular}
    \end{tabular}
\end{document}

Vertical lines are only for orientation. On the end they had to be omitted. As can you see, I didn't use minipages. Instead of them I employ \tabular in which in the first and last column are nested your tables. For determination their column width I added package calc. Also I move commands for bold fonts to option of column type.

Addendum: Probably you wish, that the text in the nested (sub) tables has bold text in the same position regardless of width of no bold text. IN this case is better for their second column instead column type l use ˙p{}where you deliberately select width. For examplep{12ex}` for your right sub table seems to be good selection. Try this with your real cells content and see, if it is ok.

Warning: since sub tables have column types r andl, its can happen, that in case that text in cells will be longer then reserved width in main tablar, they will protrude outside of main table column width.

Addendum (2): In case, that you like to align content of all cells with their bottom, you only need to change column type accordingly from m change to b and sub tables position from t to b. With slightly reformatted main title layout in this case you obtain:

enter image description here

\noindent\begin{tabular}{@{}
        >{\scriptsize}b{0.2\textwidth-1\tabcolsep}
        >{\centering\bfseries}b{.6\textwidth-4\tabcolsep}
        >{\raggedleft\scriptsize}b{.2\textwidth-\tabcolsep}
                   @{}}
\begin{tabular}[b]{@{}>{\bfseries}rl}% <-- Don't forget @{}!
COMPANY:  & ffffff          \\ %%enter value in the space after "&"
FACTORY:  &                 \\ %%enter value in the space after "&"
FIELD:    &                 \\ %%enter value in the space after "&"
LEASE:    & fadsfasdfasd    \\ %%enter value in the space after "&"
\end{tabular}
    &
PETROBRA COMPANY LIMITED
THE ESTIMATE OF RESERVES AND FUTURE INCOME ATTRIBUTABLE TO CERTAIN INTERESTS

As of JAN 1 2017
        &
\begin{tabular}[b]{>{\bfseries}rl@{}}% <-- Don't forget @{}!
ID:             & gsfd      \\%%enter value in the space after "&"
MAJOR PHASE:    & Oil       \\%%enter value in the space after "&"
AAAA Reserves:  & gfdsgsd   \\%%enter value in the space after "&"
Dev.Status:     & gsdf      \\%%enter value in the space after "&"
\end{tabular}
    \end{tabular}

For the top position you need to change m to p and sub tables position to t:

enter image description here

\noindent\begin{tabular}{@{}
        >{\scriptsize}p{0.2\textwidth-1\tabcolsep}
        >{\centering\bfseries}p{.6\textwidth-4\tabcolsep}
        >{\raggedleft\scriptsize}p{.2\textwidth-\tabcolsep}
                   @{}}
\begin{tabular}[t]{@{}>{\bfseries}rl}% <-- Don't forget @{}!
COMPANY:  & ffffff          \\ %%enter value in the space after "&"
FACTORY:  &                 \\ %%enter value in the space after "&"
FIELD:    &                 \\ %%enter value in the space after "&"
LEASE:    & fadsfasdfasd    \\ %%enter value in the space after "&"
\end{tabular}
    &
PETROBRA COMPANY LIMITED
THE ESTIMATE OF RESERVES AND FUTURE INCOME ATTRIBUTABLE TO CERTAIN INTERESTS

As of JAN 1 2017
        &
\begin{tabular}[t]{>{\bfseries}rl@{}}% <-- Don't forget @{}!
ID:             & gsfd      \\%%enter value in the space after "&"
MAJOR PHASE:    & Oil       \\%%enter value in the space after "&"
AAAA Reserves:  & gfdsgsd   \\%%enter value in the space after "&"
Dev.Status:     & gsdf      \\%%enter value in the space after "&"
\end{tabular}
    \end{tabular}
7
  • That's would be even nicer than my current layout setup. Though ID is usually 8-12 digit numbers. Mar 8, 2016 at 4:16
  • @ChengZhang, I need more time to format my MWE. Now it with some comment is added. If you have different width As you provided width text in your MWE. See, if they not fit into prepared columns width, than change them accordingly.
    – Zarko
    Mar 8, 2016 at 4:22
  • Well learned! Appreciated your kind help and that's the reason why I came to this community, people always help each other and teach them "how to" approach to the answer, not get the answer only. Mar 8, 2016 at 4:25
  • See addendum t answer!
    – Zarko
    Mar 8, 2016 at 4:33
  • Quick question, what if I want to adjust vertical positions of two outer tabular? For example, in your example, "COMPANY" is horizontally aligned with "THE ESTIMATE OF .....", I know in different page width it will change, but, how to control vertical position for better looking? Mar 8, 2016 at 23:53

You must log in to answer this question.

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