%%
%% Arnošt Komárek
%%
%% Simple sample report
%%
%% =====================================
\documentclass[a4paper, 11pt]{article}

   %%% LaTeX packages to be used
%\usepackage[czech]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath, amssymb}
\usepackage{calc}
\usepackage{color}

\usepackage[lf]{venturis}
\usepackage[T1]{fontenc}

    %%% Definition of some colors
\definecolor{red2}{rgb}{0.9333333, 0, 0}
\definecolor{mediumblue}{rgb}{0, 0, 0.8039216}
\definecolor{magenta4}{rgb}{0.545098, 0, 0.545098}
\usepackage[colorlinks, linkcolor=red2, citecolor=mediumblue, urlcolor=magenta4, breaklinks=true]{hyperref}

     %%% Some dimensions
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{9in}
\setlength{\oddsidemargin}{(\paperwidth - \textwidth)/2 - 1in}
\setlength{\evensidemargin}{(\paperwidth - \textwidth)/2 - 1in}
\setlength{\voffset}{0in}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1em}

\pagestyle{plain}

\begin{document}

\begin{center}
\setlength{\fboxsep}{2pt}
\setlength{\fboxrule}{1pt}
\fbox{
  \parbox{0.85\textwidth}{%
    \begin{center}\bfseries\Large
      NMST432 \\[0.5ex]
      Computational Environment for Statistical Data Analysis \\[1ex]
      Sample Report
    \end{center}

    \begin{center}\large
    Arnošt Komárek \\[0.5ex]
    \textit{\today}  
    \end{center}        
  }
}
\end{center}

\vspace{10em}

%%% --------------------------------------------------
\section{Sample table}

    %%% LaTeX code stored in an external file
    %%% (here in tab01.tex in a subdirectory Tabs)
    %%% can be "copy-pasted" into the LaTeX document
    %%% using the \input{} command.
\begin{table}[h!]\centering
  \renewcommand{\arraystretch}{1.2}
  \caption{Analysis of \textbf{score in mathematics} by \textbf{family composition}.}
  \label{tab01}
  \vspace{1ex}
  \input{./Tabs/tab01.tex}
\end{table}  


%%% --------------------------------------------------
\section{Results}
Results for math score are seen in Table~\ref{tabMath}. For science, see Table~\ref{tabSci}. If you are interested in social science, go to Table~\ref{tabSoc}. Finally, reading score is analyzed in Table~\ref{tabRead}.

    %%% User-defined LaTeX command \putTab
    %%% which includes 4 tables and also allows
    %%% to modify their caption and label.
\newcommand{\putTab}[4][p!]{
  \begin{table}[#1]\centering
  \renewcommand{\arraystretch}{1.2}
  \caption{Analysis of \textbf{#4}.}
  \label{#3}
  
  \vspace{2em}
  \input{./Tabs/#2_gender}

  \vspace{3em}
  \input{./Tabs/#2_fam.comp}

  \vspace{3em}  
  \input{./Tabs/#2_f2.menrol}

  \vspace{3em}  
  \input{./Tabs/#2_f2.arrest}  
  \end{table}
}  

\putTab{tab_sco.math}{tabMath}{Math Score}

\putTab{tab_sco.sci}{tabSci}{Science Score}

\putTab{tab_sco.soc}{tabSoc}{Social Science Score}

\putTab{tab_sco.read}{tabRead}{Reading Score}

\end{document}

