Home > tables > How to make this following table?

How to make this following table?

May 14Hits:1
Advertisement

I am using the slashbox package in a table as shown next. However as you can see, the diagonal line in the first cell is not the real diagonal of that cell. This is because of the existence of more than a row in that cell. So how to make the diagonal line reach from the top left corner to the bottom right corner of the first cell to the left?

How to make this following table?

Here is my code:

\documentclass[12pt]{article} \usepackage{slashbox}  \begin{document}  \begin{table}[htbp] \begin{center} \begin{tabular}[htp]{||l|c|c|c|c||} \hline \backslashbox{Adult}{Motion types} & can definitely & \multicolumn{2}{c|}{can definitely } & can definitely\\ person & walk & \multicolumn{2}{c|}{jump} & run\\ \cline {3-4} & & more than & more than & \\ & & 10 cm & 20 cm & \\[4mm] \hline \hline Joe & Yes & No & No & No \\[4mm] \hline \end{tabular} \end{center} \end{table}  \end{document} 

Thank you.

Answers

To get a cell spanning several rows, you can use the multirow package. \backslashbox works well with this within its implemantion limits - the slash is constructed as a LaTeX picture, and so there are only a limited number of slopes for the line allowed.

How to make this following table?

\documentclass[12pt]{article}

\usepackage{slashbox,multirow}

\begin{document}

\begin{table}[htbp]
\begin{center}
\begin{tabular}[htp]{||l|c|c|c|c||}
\hline
\multirow{4}{*}{\backslashbox{Adult\\\strut person}{\strut Motion\\ types}}
& can definitely & \multicolumn{2}{c|}{can definitely } & can definitely\\
& walk & \multicolumn{2}{c|}{jump} & run\\
\cline {3-4} & & more than & more than & \\
& & 10 cm & 20 cm &\\
\hline \hline
Joe & Yes & No & No & No \\
Margaret & Yes & Yes & Yes & Yes \\
\hline
\end{tabular}
\end{center}
\end{table}

\end{document}

A more sophisticated solution with, more flexible choices of slash line, would use something like tikz, see Diagonal lines in table cell for some such approaches, but would still require such a \multirow command.

Related Articles

  • HTML Utopia! Design Websites Without Tables - Parts 1 and 2

    HTML Utopia! Design Websites Without Tables - Parts 1 and 2April 12

    Welcome to HTML Utopia – the two part series on creating Web page designs without tables. Part 1 introduces the concept of using CSS to create a design without tables, and explains the reasons why this philosophy has become so popular. Part 2 explore

  • The Trick to Rounded Corner Tables

    The Trick to Rounded Corner TablesMay 1

    One technique that has always been of interest to new Web designers is building rounded corners for the tables in their site. So how do they get that "professional" look? . It's actually a relatively easy task with most graphic editors. It is a

  • HTML Utopia: Designing Without Tables Using CSS, Chapter 1: Getting The Lay Of The Land

    HTML Utopia: Designing Without Tables Using CSS, Chapter 1: Getting The Lay Of The LandMay 31

    CSS In Context Almost as soon as the Web became popularized by the emergence of the first graphical Web browser (the forerunner to Netscape Navigator), graphic designers became aware of a problem. The method by which the Web browser displayed informa

  • HTML Utopia: Designing Without Tables Using CSS, Chapter 3: Digging Below The Surface

    HTML Utopia: Designing Without Tables Using CSS, Chapter 3: Digging Below The SurfaceMay 31

    This chapter completes our look at the "mechanics" of CSS: the background you need to have to work with the technology. It covers six major topics: quick review of the three methods for assigning CSS properties to HTML documents use of shorthand

  • HTML Utopia: Designing Without Tables Using CSS, Chapter 4: CSS Website Design

    HTML Utopia: Designing Without Tables Using CSS, Chapter 4: CSS Website DesignMay 31

    CSS Website Design The development of any Website begins with its design. Typically, you'll have a statement from your client, or at least a rough idea in your head, of the intended capabilities of the site. If you're a by-the-book sort of developer,

  • HTML Utopia: Designing Without Tables Using CSS, Chapter 5: Building the Skeleton

    HTML Utopia: Designing Without Tables Using CSS, Chapter 5: Building the SkeletonMay 31

    Building the Skeleton Most books on CSS begin by teaching you how to deal with the bits and pieces of a Web page: fonts, colors, lists, and the like. Then, they move on to explaining the broader issues associated with CSS positioning (CSS-P), which a

  • Practical Web Design - Introduction to Tables, Part 1

    Practical Web Design - Introduction to Tables, Part 1June 7

    If you take a tour of the poorer neighborhoods in my neck of the woods, you'll find a lot of single-wide trailers. They aren't much to live in - they're ugly, they're crowded, they leak, they have no style whatsoever - but as domiciles, they're funct

  • Practical Web Design - Introduction to Tables, Part 2July 4

    Some sobering facts: two-thirds of the world's installed PCs are three years old or older Windows 98 is the operating system most used in the world's PCs This means that a huge number of people view our Web pages with "out of date" browsers such

  • HTML Utopia: Designing Without Tables Using CSSJuly 16

    We can look at Cascading Style Sheets (CSS) from a number of contextual perspectives. I prefer to view them as a correction to a fundamental mistake that was made at the beginning of Web Time, back in the old days of the early 1990s, when Tim Berners

  • Tables Vs. CSS - A Fight to the Death

    Tables Vs. CSS - A Fight to the DeathMay 27

    The first time I surfed the Internet it was through a dumb terminal. After a short while, its monochromatic screen was spewing out the full script to Monty Python's "Holy Grail" from a server in Minnesota. It was nothing short of magical. We had

  • Build Table-less CSS Layouts with eZ publish

    Build Table-less CSS Layouts with eZ publishJanuary 24

    Whenever you read about design and HTML these days, you see references to so-called table-less CSS layout. This article covers how to use the power of CSS to theme eZ publish 3.5. Here, we'll walk through every step required to create a new theme usi

  • Alter Table Row Background Colors Using JavaScript

    Alter Table Row Background Colors Using JavaScriptFebruary 10

    Many sites that present tabular data use alternating background colors to increase the readability of that data. And as I developed a site, I realised I wanted to do that, too. The problem? In my case the table was not generated by a server side appl

  • TILT! Tables sneak in the backdoorMay 4

    There's been a lot written about using the DOM to retro-fit HTML to make to work and look nicer than is otherwise possible. Little did we know the dark force we were tinkering with. Pining for the simplicity of table-based layout, Dimitri Glazkov has

  • Leaving Money on the Table: Printable Versions of ArticlesNovember 15

    If you offer printable versions of your site's content with all the graphics and ads removed you really need to take a couple steps first to make sure you aren't leaving money on the table. Back in 2001 SitePoint had an article linked to from Slashdo

  • Table-Based Layout Is The Next Big Thing

    Table-Based Layout Is The Next Big ThingFebruary 28

    The recently-launched SitePoint CSS Reference (and its print version, The Ultimate CSS Reference) contains extensive coverage of some of the more obscure areas of CSS. One such area that is going to become very important with the release of IE8 later

  • Rowspans & Colspans in CSS Tables

    Rowspans & Colspans in CSS TablesSeptember 9

    "-we've implemented every property in CSS 2.1 and are closing in on our goal of complete support for the CSS 2.1 specification by the time we release." If you were to guess who recently made that statement you'd be forgiven for thinking it came

  • Create dump file only from some SQLite tables September 16

    How do I dump the data, and only the data, not the schema, of some SQLite3 tables of a database (not all the tables)? The dump should be in SQL format, as it should be easily re-entered into the database later and should be done from the command line

  • Updating Table via .on('click') Only Works One Time October 14

    I have a bit of code where I am looping though all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouseon/off. This happens on page ready and works just fine. The problem I have is that any

  • Register Event listener onto a table that has has been created dynamically through AJAX October 14

    I have a bit of code where I am looping though all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouseon/off. This happens on page ready and works just fine. The problem I have is that any

  • Conditionally concat table values November 7

    How do I get: id Name Value 1 A 4 1 B 8 2 C 9 to id Column 1 A:4, B:8 2 C:9 --------------Solutions------------- No CURSOR, WHILE loop, or User-Defined Function needed. Just need to be creative with FOR XML and PATH. [Note: This solution only works o

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 2.617 s.