0

I have a template for word with extension docx. I wanted to learn latex and write my internship documentation in latex. To start I used a website to turn this template to a tex file but the template uses tables and the website turn this template to a table which I thought I can work with it. But I think tables aren't meant to be contain whole documentation. What should I use to mimic this template so I can write my documentation inside a "table". (Added a ASCII Table and Image). I need to be able to use this template in every page and use latex features like "code, math, inserting images, tables ... "

+--+---------------------+----------+--------------------------+--+
|  | Work Implemented :  |          | Date:                    |  |
|  |                     |          |                          |  |
+--+---------------------+----------+--------------------------+--+
|  | Department where    |                                     |  |
|  | work will be        |                                     |  |
|  | implemented         |                                     |  |
+--+---------------------+-------------------------------------+--+
|  | This is area where my documentation will go               |  |
+--+                                                           +--+
|  |                                                           |  |
+--+                                                           +--+
|  |                                                           |  |
+--+                                                           +--+
|  |                                                           |  |
+--+                                                           +--+
|  |                                                           |  |
+--+                                                           +--+
|  |                                                           |  |
+--+                                                           +--+
|  |                                                           |  |
+--+                                                           +--+
|  |                                                           |  |
+--+                                                           +--+
|  |                                                           |  |
+--+                                                           +--+
|  |                                                           |  |
+--+                                                           +--+
|  |                                                           |  |
+--+                                                           +--+
|  |                                                           |  |
+--+-----------------------------------------------------------+--+
|  |       STUDENT       | APPROVED |     Company Authority    |  |
|  |      Signature      |          |         Signature        |  |
|  |                     |          |                          |  |
|  |                     |          |                          |  |
+--+---------------------+----------+--------------------------+--+

A Template in word

EDIT: So I tried to make the table my self but I have encountered with some problems. Problem I wrote so much thing in the table like I already would with my documentation. How can I solve this broken table after that can I use this code to write my documentation inside this code I will use images, codes, tables. And How can I make this table fixed 90%(A4) sized.

% \documentclass[a4paper,12pt]{scrartcl}
\documentclass{article}
\usepackage{array}
\usepackage{everypage}
\usepackage{tabularx}
\usepackage{lipsum}




\begin{document}

  \thispagestyle{empty}
  \noindent

  \begin{tabularx}{\linewidth}{|c|X|c|}
    \hline
      \begin{tabular}{c}Work Implemented: \end{tabular} & \centering
      \begin{tabular}{c} Latex \end{tabular} &
      \begin{tabular}{c}Date: 11.07.2018 \end{tabular}\\
    \hline
      \multicolumn{1}{|c|}{ 
        \begin{tabular}{c} Department where\\the work will\\be implemented: \end{tabular} } & 
      \multicolumn{2}{c|}{ Department Name  } \\
    \hline
      \multicolumn{3}{|l|}{ 
        \begin{tabular}{l} Documentation \\ Test \\ Test 1 \\ Test 2 \end{tabular} } \\
    \hline
      \begin{tabular}{c}STUDENT \\ Signature \\ *SIGNATURE* \end{tabular} & \centering
      \begin{tabular}{c}APPROVED \\ APPROVED? \end{tabular} &
      \begin{tabular}{c}Company Authority \\ Signature \\ *SIGNATURE* \end{tabular} \\
    \hline

  \end{tabularx}


\end{document}
  • This could be done with either a tabular or with TikZ or even flowfram. Personally I would use a tabular and use \parboxes to create the cells. – John Kormylo Jul 11 '18 at 4:00
  • Thank you, I will try to use \parbox first. Can I use every command in a \parbox. – Goktug K. Jul 11 '18 at 5:32
  • herbert.the-little-red-haired-girl.org/html/latex2e/… In this site it says you shouldn't use any fancy paragraph environments inside of a parbox – Goktug K. Jul 11 '18 at 6:10
  • I know you can't use \caption in a \parbox (must use a minipage instead). I should add that the reason I would use \parbox is that one can assign a vertical and horizontal size to them. – John Kormylo Jul 11 '18 at 13:37
2

Tables are not a good idea for this. Probably the best is to implement the frame as a background. Once set up, you can forget about it and write your documentation just as any LaTeX document.

There are many ways to implement this. Since the frame is not that fancy, I used the eso-pic package and LaTeX picture commands here. In my opinion, TikZ would be a bit overkill, but of course, it could be used too. The geometry package is used to set the margins so the text area fits in the frame.

enter image description here

The code:

\documentclass[a4paper]{article}
\usepackage[left=2cm,right=2cm,top=6cm,bottom=4cm]{geometry}
\usepackage{eso-pic}
% no head line or foot line
\pagestyle{empty}

% just for filling a few pages
\usepackage{blindtext}

% initialize the variable texts
\newcommand{\PrintWork}{}
\newcommand{\PrintDate}{}
\newcommand{\PrintDepartment}{}

% the origin (0,0) is the bottom left corner of the paper
\AddToShipoutPictureBG{%
    \setlength{\unitlength}{1mm}
    % the main frme
    \put( 10, 10){\framebox(190,277){}}
    % additional horzontal lines
    \put( 10, 30){\line(1,0){190}}
    \put( 10,267){\line(1,0){190}}
    \put( 10,247){\line(1,0){190}}
    % additional vertical lines
    \put( 60, 10){\line(0,1){20}}
    \put(150, 10){\line(0,1){20}}
    \put( 60,267){\line(0,1){20}}
    \put(150,267){\line(0,1){20}}
    \put( 60,247){\line(0,1){20}}
    % texts
    \put( 35,277){\makebox(0,0){Work implemented:}}
    \put(105,277){\makebox(0,0){\PrintWork}}
%    \put(175,277){\makebox(0,0){Date: \PrintDate}}
    \put(175,281){\makebox(0,0){Date: \PrintDate}}
    % example for inserting page number
    \put(175,273){\makebox(0,0){Page: \thepage}}
    % multinie text must be set in a \parbox
    \put( 35,257){\makebox(0,0){\parbox{35mm}{\centering Department where work will be implemented:}}}
    \put(125,257){\makebox(0,0){\PrintDepartment}}
    \put( 35, 28){\makebox(0,0)[t]{\parbox{35mm}{\centering Student\\signature}}}
    \put(105, 28){\makebox(0,0)[t]{approved}}
    \put(175, 28){\makebox(0,0)[t]{\parbox{35mm}{\centering Company authority\\signature\\}}}
}
% commands to set variable text parts
\newcommand{\Work}[1]{\renewcommand{\PrintWork}{#1}}
\newcommand{\Date}[1]{\renewcommand{\PrintDate}{#1}}
\newcommand{\Department}[1]{\renewcommand{\PrintDepartment}{#1}}

% setting variable texts
\Work{Some interesting project}
%\Date{\today}
\Date{11.07.2018}
\Department{Department of intersting projects}

\begin{document}
\Blinddocument
\end{document}
  • This is very well written and easy to understand even for me, thank you but let's say I want to change the department, changing the variable's value in second page also changes the first page and I'll write this documentation in a very long time so date will also change. How should I change a variable's value so that It doesn't change in another page. – Goktug K. Jul 12 '18 at 6:16
  • SOLVED: I tried to change the values before \newpage, It should have been after the \newpage. – Goktug K. Jul 12 '18 at 6:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.