LaTex Tutorial 8: Advanced Tables

Поділитися
Вставка
  • Опубліковано 8 січ 2025

КОМЕНТАРІ •

  • @adrianwolf1265
    @adrianwolf1265 2 роки тому

    Thank you, aint no one else show the multicolumn stacked side by side like you did.

  • @drizzylmg752
    @drizzylmg752 4 роки тому +3

    Just what I was looking for, thanks!

  • @joaopedrodabarradeoliveira3089
    @joaopedrodabarradeoliveira3089 3 роки тому

    Thanks so so much. You helped me a lot. I have looked for a explanation about tables like yours a so time... Thanks again

  • @pongalplayer
    @pongalplayer 4 роки тому

    Really awesome.. this is what i was looking for..superb..thanks

  • @DharmendraYadav-js2bu
    @DharmendraYadav-js2bu 6 років тому +1

    Thanks For Video Sir, Very informative Video

  • @CanDoSo_org
    @CanDoSo_org 2 роки тому

    Thanks, TJR. I am struggling in fitting a big table on one page. Could you please show us how to do it?

    • @tjr1252
      @tjr1252  2 роки тому

      Hi Reddy, you could try the resizebox option, here is an example:
      \begin{table}
      \centering

      esizebox{\columnwidth}{!}{%
      \begin{tabular}{r|lll}
      \multicolumn{1}{r}{}
      & \multicolumn{1}{l}{Heading 1}
      & \multicolumn{1}{l}{Heading 2}
      & \multicolumn{1}{l}{Heading 3} \\ \cline{2-4}
      Row 1 & Cell 1,1 & Cell 1,2 & Cell 1,3 \\
      Row 2 & Cell 2,1 & Cell 2,2 & Cell 2,3
      \end{tabular}%
      }
      \end{table}
      You can see the tabular environment is within the
      esizebox{X}{Y} environment where X is the width option and Y is the height option. The features in the example set X=\columnwidth which will make the table span the entire width of the page. Y=! will make it so that the height scales with the width so you only need to set one and your original proportions will be kept. Otherwise, you could customize both to your liking e.g.
      esizebox{3cm}{2cm}.
      I hope that helps!

    • @CanDoSo_org
      @CanDoSo_org 2 роки тому

      @@tjr1252 Many thanks, TJR.😁

  • @Jake-om9no
    @Jake-om9no 3 роки тому

    More than grateful!

  • @Jonathan-zj6to
    @Jonathan-zj6to 4 роки тому +1

    good vid 👍

  • @seddargroup2960
    @seddargroup2960 3 роки тому

    Hi TJR . Thanks for making this video. A quick question though. How do you make a table of 4 columns where the first column is single but the other three are multi-columns with two smaller columns within each? I hope the question is clear enough... thanks.

    • @tjr1252
      @tjr1252  3 роки тому

      I don't really understand what you mean by "the other three are multi-columns with two smaller columns within each?" Do you mean you want a row that spans the last 3 columns but not the first?

  • @ginarose8038
    @ginarose8038 3 роки тому

    What are the packages we need to add for multi column command?

    • @tjr1252
      @tjr1252  3 роки тому

      From my understanding you don't need to include any packages for multicolumn. I can run the table (after removing the colors) with only:
      \documentclass[11pt]{article}
      \begin{document}
      \begin{center}
      \setlength{\tabcolsep}{1cm}

      enewcommand{\arraystretch}{1.5}
      \begin{tabular}{|c|c|c|p{3cm}|}
      \hline
      \multicolumn{4}{|c|}{Title of the table}\\
      \hline
      \multicolumn{2}{|c|}{Category 1} & \multicolumn{2}{c|}{Category 2} \\
      \hline
      \tiny A & B & C & Longer text here Longer text hereLonger text hereLonger text hereLonger text hereLonger text here \\ \hline
      E & F & G & H\\ \hline
      I & J & K & L\\ \hline
      M & N & O & P\\ \hline
      \end{tabular}
      \end{center}
      \end{document}
      If this code doesn't work for you then it could be that you don't have the full version of Latex installed.

    • @ginarose8038
      @ginarose8038 3 роки тому

      @@tjr1252 Thank you so much for the reply!

  • @raydencreed1524
    @raydencreed1524 5 років тому

    I'm REALLY new to LaTeX. I'm working on a document about a particular topic in math that I'm interested in, and I need a table of values. I know how to format it and make it look how it's supposed to, but it's appearing at the top of the page instead of after the paragraph describing it on that same page. How can I make it appear after that paragraph instead of at the top of the page?

    • @tjr1252
      @tjr1252  5 років тому

      Good question! It is really simple, put your code for the table in between
      \begin{figure}[h]
      code for table
      \end{figure}
      The h in the bracket is an option that stands for "here" meaning that it will place the figure where it is in the tex file. Other options are t (top of page) and b (bottom of page). Fair warning though, you may have to play around with where the table is actually place in the tex file to get it to show up exactly where you want it. For example, if you place it below a paragraph too close to the end of the page it may show up on the next page etc. Just play around with it and you should find the solution. GOOD LUCK!

    • @raydencreed1524
      @raydencreed1524 5 років тому

      Thomas J. Rivera Thanks so much! Especially for replying so quickly.

    • @doaawagdy4535
      @doaawagdy4535 5 років тому

      but now its figure not table ,i need table and when putting [t] or any practices not implement the code as table

  • @brianmabua
    @brianmabua 4 роки тому +1

    brilliant

  • @chaitanyatuckley4666
    @chaitanyatuckley4666 3 роки тому

    Thanks a lot.

  • @eltonrodrigues5885
    @eltonrodrigues5885 4 роки тому

    How do I merge and center texts in the table at the same time?

    • @tjr1252
      @tjr1252  4 роки тому

      As a quick fix, just add \centering to the cell you want the text centered on.
      EX:
      \begin{tabular}{c|p{5cm}|c}
      A & \centering Longggggggggggggggggg centered text& B
      \end{tabular}

  • @azmatullah2650
    @azmatullah2650 6 років тому

    How to change the text size in different cells of the table ?

    • @tjr1252
      @tjr1252  6 років тому

      Hi Azmat,
      Thanks for the question. The simplest answer is to add one of the following commands into the cell whose text size you want to change:
      \tiny
      \scriptsize
      \footnotesize
      \small
      \large
      \Large
      \huge
      \Huge
      this list goes from smallest to biggest text size. There are of course many other ways. Hope that helps!