Graphics, Figures & TablesHow do i make this Table? .jpg

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Sacrety
Posts: 7
Joined: Fri Nov 04, 2016 6:23 pm

How do i make this Table? .jpg

Post by Sacrety »

It's enough if you show how it works to the bottom of the "R1", i'd be very grateful.
Image

I'm getting this out of my skills, looks like shit, googled for some solutions but couldn't find the right help/tips.

Code: Select all

Code, edit and compile here:
\documentclass[a4paper,10pt,titlepage,bibtotoc,bibtotocnumbered]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[pdftex]{graphicx}
\usepackage{lscape}
\usepackage{rotating}
\usepackage{ulem}
\usepackage[english]{babel}
\renewcommand{\arraystretch}{1.5}
\usepackage{tabulary}
\begin{document}
\begin{center}
\begin{tabulary}{1.5\textwidth}{|L|L|L|L|C|L|}
\hline
\textbf{requirement} & \textbf{covered in} & \textbf{contained domain} & \textbf{domain type} & \textbf{constrained} & \textbf{controlled phenomena} \\
\hline
\end{tabulary}
\end{center}
\end{document}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Last edited by Sacrety on Fri Nov 11, 2016 4:14 pm, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

How do i make this Table? .jpg

Post by Stefan Kottwitz »

Screenshots and images are nice. But please post real code for code, not an image of a code. Otherwise we readers need to type that all (or don't have the time). Code as text is better to copy.

Stefan
LaTeX.org admin
Sacrety
Posts: 7
Joined: Fri Nov 04, 2016 6:23 pm

How do i make this Table? .jpg

Post by Sacrety »

Stefan Kottwitz wrote:Screenshots and images are nice. But please post real code for code, not an image of a code. Otherwise we readers need to type that all (or don't have the time). Code as text is better to copy.

Stefan
Ok, just added the code

The table goes over the edge of the paper on the right side. I want the table and its content to get smaller if it doesnt fit on the a4 page anymore
Sacrety
Posts: 7
Joined: Fri Nov 04, 2016 6:23 pm

How do i make this Table? .jpg

Post by Sacrety »

nvm...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

How do i make this Table? .jpg

Post by Stefan Kottwitz »

So were you able to solve it?
I'm traveling today, so I can add something in the evening or tomorrow.

Btw. the table design needs improvement, in my opinion. For example spacing between lines and cell content. In general, it's good to use some horizontal lines but to avoid vertical lines at all. It can be done in LaTeX easily. A table design example: http://blog.darkhorseanalytics.com/clear-off-the-table. Quick small samples I had in my book: http://texblog.net/latex-beginners-guid ... chapter-5/. If you want to work on the table further on, perhaps post the code of the current status.

Stefan
LaTeX.org admin
Sacrety
Posts: 7
Joined: Fri Nov 04, 2016 6:23 pm

How do i make this Table? .jpg

Post by Sacrety »

Code: Select all

Code, edit and compile here:
\documentclass[a4paper,10pt,titlepage,bibtotoc,bibtotocnumbered]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[pdftex]{graphicx}
\usepackage{lscape}
\usepackage{rotating}
\usepackage{ulem}
\usepackage[english]{babel}
\renewcommand{\arraystretch}{1.5}
\usepackage[showframe=true]{geometry}
\usepackage{changepage}
\usepackage{tabulary}
\begin{document}
\section {Validation I - VII}
\begin{adjustwidth}{-1.3cm}{}
\begin{tabulary}{1.5\textwidth}{|L|p{2cm}|L|L|C|p{4cm}|}
\hline
\textbf{requirement} & \textbf{covered in} & \textbf{contained\newline domain} & \textbf{domain \newline type} & \textbf{constr.} & \textbf{controlled \newline phenomena} \\
\hline
R02 & pdRegister & CalendarData & lexical,designed & X & ToUseApplication \\
\cline{3-6}
& & Guest & biddable & & register \\
\cline{3-6}
& & WebpageGuest& connection & X & sendingRegisterData \\
\cline{3-6}
& & Register & machine & & ShowRegisterProcess \\
\hline
R07,R09 & pdGroupRights & CalendarData & lexical,designed & X & GroupRights \\
\cline{3-6}
& & User & biddable & & joinGroup \\
\cline{3-6}
& & Administrator & biddable & & inviteUser, changeRights \\
\cline{3-6}
& & WebpageUser & connection & X & sendingRightChanges, confirmRightChanges \\
\cline{3-6}
& & changeRights & machine & & ShowChangedRights \\
\hline
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Looks like this: Image

It's quite useable at the moment, the lines which show the edges of an A4 paper I think are coming from my \begin{adjustwidth}{-1.3cm}{} command, I can delete the lines after creating my PDF with an PDF program which is indeed not comfortable but works for the moment.

I'm running out of time, gotta do this until 23:59, but I will have to do more tables in the future since this a bigger project for the university so any help will be very appreciated and I'll be very thankful!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

How do i make this Table? .jpg

Post by Stefan Kottwitz »

I will be home at 20:00, I will have time to check it and any further question of you then.

Anything else to fix, let us know!

Greetings from the airport,

Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

How do i make this Table? .jpg

Post by Johannes_B »

The first version nearly untouched, the second rotating the table (takes an own page), the third scaling to the textwidth.

Code: Select all

Code, edit and compile here:
\documentclass[a4paper,10pt,titlepage,
bibliography=totocnumbered
]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[pdftex]{graphicx}
\usepackage{lscape}
\usepackage{rotating}
\usepackage{ulem}
\usepackage[english]{babel}
\renewcommand{\arraystretch}{1.5}
\usepackage[
showframe=true
]{geometry}
\usepackage{changepage}
\usepackage{tabulary}
\begin{document}
\section {Validation I - VII}
\begin{adjustwidth}{-1.3cm}{}
\footnotesize
\begin{tabulary}{1.5\textwidth}{|L|p{2.2cm}|L|L|C|>{\raggedright\arraybackslash}p{4cm}|}
\hline
\textbf{requirement} & \textbf{covered in} & \textbf{contained\newline domain} & \textbf{domain \newline type} & \textbf{constr.} & \textbf{controlled \newline phenomena} \\
\hline
R02 & pdRegister & CalendarData & lexical,designed & X & ToUseApplication \\
\cline{3-6}
& & Guest & biddable & & register \\
\cline{3-6}
& & WebpageGuest& connection & X & sendingRegisterData \\
\cline{3-6}
& & Register & machine & & ShowRegisterProcess \\
\hline
R07,R09 & pdGroupRights & CalendarData & lexical,designed & X & GroupRights \\
\cline{3-6}
& & User & biddable & & joinGroup \\
\cline{3-6}
& & Administrator & biddable & & inviteUser, changeRights \\
\cline{3-6}
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

How do i make this Table? .jpg

Post by Stefan Kottwitz »

Thanks, Johannes!

This looks pretty ok, based on that it seems to be planned as a grid (Gitter, Raster) table, such as a fill-in form.

Some thoughts:
  • When resized, the font gets smaller. A sidewaystable preserves the original font size.
  • The second column should be wider (p option longer), or simply an L column too.
  • There should be a space after the comma at all places.
The lines marking the text area on the paper come because of the showframe=true option to the geometry package, in the preamble, that can simple be removed. I guess it was made to see if the table extends into the margin.

Stefan
LaTeX.org admin
Sacrety
Posts: 7
Joined: Fri Nov 04, 2016 6:23 pm

How do i make this Table? .jpg

Post by Sacrety »

Thank you very much :!: , Danke
Post Reply