Skip to main content

New answers tagged

4 votes

A table with some cells selected

With {NiceMatrix} of nicematrix. \documentclass[border=2mm]{standalone} \usepackage{nicematrix,tikz} \usetikzlibrary{fit} \begin{document} \renewcommand{\arraystretch}{1.3} $\begin{NiceMatrix}[...
F. Pantigny's user avatar
  • 45.5k
2 votes
Accepted

Add caption and label for autofit table using resizebox

Page 27 of AuthoringTemplate_Manual.pdf from your link contains an example which shows how to add a caption/label to a table in with this template. In addition: don't scale elements which contain ...
samcarter_is_at_topanswers.xyz's user avatar
4 votes

Text in table with vertical spanning not wrapping

Here is a solution using hspan=minimal: \documentclass{article} \usepackage{lipsum} \usepackage{tabularray} \begin{document} \begin{table} \begin{tblr}{ vspan=even, hspan=minimal, hlines, ...
Paul Gaborit's user avatar
  • 71.8k
1 vote
Accepted

Vertical padding in table cells containing matrices

If you're not too attached to vertical rules in tables (you shouldn't be, because they make for harder reading, not easier), do \documentclass{article} \usepackage{amsmath} \usepackage{array} \...
egreg's user avatar
  • 1.2m
5 votes
Accepted

Text in table with vertical spanning not wrapping

Similar to other tabular environments, you need to help tabularray a bit in such cases and state the width of the multicolumn cell explicitly, which is ⅔ of the \linewidth (or \textwidth in this case) ...
Jasper Habicht's user avatar
4 votes
Accepted

Adjust the width of a table in a tcolorbox

In your document, the tabularx environment doesn't use a single X-type column. How is tabularx supposed to do its work? I'd like to suggest a different setup: Since you require the relative (usable) ...
Mico's user avatar
  • 528k
3 votes

Typesetting a long wide table in LaTeX

With use of {tabular*}{\linewidth} and left column distance settings to macro \extracolsep{\fill}. Additionally is exploited S column types for formatting numbers in columns. Using it the font size in ...
Zarko's user avatar
  • 305k
6 votes

Add a marker on table line

It is possible with the tabularray package, although it does not provide an interface to position things at the intersections of the borders (alias corners of cells), but with the use of the tikzmark ...
Jasper Habicht's user avatar
1 vote

Weird behavior with tabular and expl3 integers

As David mentions in the comments, you can use a global variable and \int_gset:Nn. Also, it's recommended you use proper expl3 naming conventions. \documentclass[a4paper]{report} \begin{document} \...
1 vote
Accepted

Create a table with \newcommand where the values are input as the argument?

I'm not sure why you would want this particular command, so I fear this may not address your actual need, but this answers the question as asked. tblr parses the content of the environment and so ...
cfr's user avatar
  • 219k
7 votes
Accepted

How to implement tikz in tabular in tikz

This is what the \subnode commmand from the tikzmark library was designed to do: put a pseudo-node around some content that is itself within a \node. Nesting tikzpictures - even putting a \...
Andrew Stacey's user avatar
3 votes

Please help to adjust the landscape-mode table

An alternative, as complement to nice @Mico answer (+1) with use of the tblr of tabularray package, \small font size (for better text fitting in cells) and automatic numbering of rows (here I'm not ...
Zarko's user avatar
  • 305k
4 votes
Accepted

Please help to adjust the landscape-mode table

A tabularx environment must have at least ond X-type column. In addition, many of the p-type columns are currently too wide, preventing the table from fitting inside the text block. I'd also reduce ...
Mico's user avatar
  • 528k
9 votes

How to implement tikz in tabular in tikz

Based on my answer on your previous question without use of saveboxes: \documentclass[margin=3mm]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta, positioning, ...
Zarko's user avatar
  • 305k
5 votes

How to implement tikz in tabular in tikz

I was able to find a solution by incorporating the savebox idea from https://tex.stackexchange.com/a/732342/319072, and the \tikzmarknode idea from https://tex.stackexchange.com/a/731625/319072. ...
Jasper's user avatar
  • 2,597
2 votes
Accepted

Consistent alignment of tabular in an IEEE document class

There's not much that's wrong with your table as is. I have only a few suggestions: Don't use a center environment in a table environment. instead, use a `\centering directive. Load a Times Roman ...
Mico's user avatar
  • 528k
3 votes
Accepted

Column text is getting into the table

It would be better use table*, not table, for a double-column float. Unfortunately, table* ignores the position options and the table will be placed at the top of the next page (or the middle, if ...
Fran's user avatar
  • 84.3k
7 votes

Add a marker on table line

Alternatively to F. Pantigny's answer, you can achieve the same effect with a built-in picture environment if for some reason you have not an access to nicematrix or other packages it utilises, e.g. ...
Celdor's user avatar
  • 9,694
9 votes
Accepted

Add a marker on table line

With {NiceTabular} of nicematrix. \documentclass[a4paper,11pt]{scrartcl} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{nicematrix,tikz} \usepackage[top=3cm,bottom=3cm,left=2.5cm,right=2....
F. Pantigny's user avatar
  • 45.5k
1 vote

Hex Dump Annotation

With {NiceTabular} of nicematrix and TikZ to draw the frame and the label by using the PGF/TikZ nodes created by nicematrix. \documentclass{article} \usepackage{geometry} \usepackage{nicematrix,tikz} ...
F. Pantigny's user avatar
  • 45.5k
6 votes
Accepted

Hex Dump Annotation

\documentclass{article} \begin{document} \begin{picture}(0,0) \put(82pt,1pt-6\baselineskip){\ttfamily\framebox(5em,12pt){}} \put(250pt,1pt-6\baselineskip){\framebox(10em,12pt){something ...
David Carlisle's user avatar
3 votes
Accepted

Issues with Customizing Row Heights and Centering in LaTeX Tables

The tabularray package makes it easy to adjust the height of all or just specific rows: \documentclass{article} \usepackage{graphicx} \usepackage{tabularray} \usepackage[hmargin=1.5cm]{geometry} \...
samcarter_is_at_topanswers.xyz's user avatar
1 vote

Table with resizebox not fitting all the data into my page, however I dont know how to use longtable to generate table on multiple pages

An alternative approach do formatting your table. By use of the longtblr of tabularray package, code is quite shorter and simpler, however this is payed with a bit longer compilation time. For using ...
Zarko's user avatar
  • 305k
5 votes
Accepted

Unwanted extra vertical lines for the last row in my longtable

There's no need to employ a longtable, as one can easily fit all of the material on a single page. The key is to widen columns 3 and 5 from 3cm and 5cm to 4.25cm and 7.75cm, respectively, and ...
Mico's user avatar
  • 528k
2 votes

Unwanted extra vertical lines for the last row in my longtable

Sorry, your code example is very erroneous, from missing \begin{document},\end{document}, missed packages and use obsolete siunitx syntax. Beside this, your code example is far from be minimal. I try ...
Zarko's user avatar
  • 305k
1 vote

Unwanted extra vertical lines for the last row in my longtable

Well, the code snippet provided by user3454353 is not at all a minimal-working-example, but I'll try my best to solve the problem. I got dozens of errors and warnings with the original code. Relevant ...
vanschnapen's user avatar
4 votes
Accepted

Table with resizebox not fitting all the data into my page, however I dont know how to use longtable to generate table on multiple pages

Since your table needs to span at least two pages, I suggest you switch from a table/tabular setup (which doesn't allow page breaks) to a longtable setup. To save on horizontal space and thus avoid ...
Mico's user avatar
  • 528k
4 votes
Accepted

Creating a dynamic grading table

Using tabularray package and a bit of expl3 the following code seems promising. \documentclass{article} \usepackage{tabularray} \ExplSyntaxOn \tl_new:N \l__ME_table_tl \NewDocumentCommand { \...
chrispi_cookie's user avatar
1 vote

Creating a dynamic grading table

Without your complex calculation of grade ranges you may write your grade table directly using tblr of tabularray package as follows: \documentclass{article} \usepackage{tabularray} \UseTblrLibrary{...
Zarko's user avatar
  • 305k
2 votes

How to display a pair of figures with two sets of formulas undernath

Here is a paracol soloution. Interesingly, the redefinitions of \thefigure and \theequation were local to the column, so there was no point in using \pcol@currcol. Also, since one can not use global ...
John Kormylo's user avatar
  • 83.9k
2 votes

make4ht: Configure the spacing and alignment in HTML

Try this config file: % https://tex.stackexchange.com/a/722062/114006 \Preamble{xhtml,fancylogo} % handle bullet in myitems \ConfigureEnv{myitems}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class=&...
michal.h21's user avatar
  • 52.3k
3 votes
Accepted

How to replace a line in a table and maintain the same table appearance in beamer?

If you are sure that the replacement text is shorter, you could use this quick hack: \documentclass{beamer} \usetheme{JuanLesPins} \usepackage{tabularray} \usepackage{nicefrac} \usepackage{amsmath} \...
samcarter_is_at_topanswers.xyz's user avatar
1 vote

How to replace a line in a table and maintain the same table appearance in beamer?

Following @DavidCarlisle and @samcarter_is_at_topanswers.xyz suggestions, a solution I find satisfying is provided below...even if the last line still moves a little bit when transitioning... \...
user22744's user avatar
  • 137
5 votes

How to display a pair of figures with two sets of formulas undernath

To long for comment ... Sorry, your question is not clear what you after. You should provide MWE, which show what you try so far. So, we can only gueassing. For example, are after the following? MWE ...
Zarko's user avatar
  • 305k
1 vote

How to uncover table column with borders

Here is a solution with {NiceTabular} of nicematrix. \documentclass[12pt]{beamer} \usepackage{nicematrix} \begin{document} \begin{frame}{Communication Models} \begin{itemize}[<+->] \...
F. Pantigny's user avatar
  • 45.5k
1 vote

Table not formatting properly in report - runs off the side of the page

Maybe you liked I would format your table on above showed way. Ding so the table caption and column headers appear at each part of table. So it is simpler to know, what is in some column and to ...
Zarko's user avatar
  • 305k
3 votes

How to force a longtblr's caption to single line?

This code should give you the required caption: \DefTblrTemplate{caption}{default}{% \makebox[\hsize][c]{% \UseTblrTemplate {caption-tag}{default}% \UseTblrTemplate {caption-sep}{default}...
Pieter van Oostrum's user avatar
2 votes

Reduce the Height of This Latex Table

Edit: COnsidered are @Mico comments As supplement to nice @Mico answer (+1). Main differences are: styles for both tables are merged in one definition in \SetTblrInner both tables are in one table ...
Zarko's user avatar
  • 305k
5 votes
Accepted

Reduce the Height of This Latex Table

My main suggestion is to switch to \footnotesize, for a 20% linear reduction in font size; \small just isn't enough. I would further place both tblr environments and their associated \caption ...
Mico's user avatar
  • 528k
3 votes

Typesetting a long wide table in LaTeX

You can split the table across pages. This can be done with package hvfloat. In the middle of the double pages you have to insert some space (here 2cm): \documentclass[a5paper,twoside]{book} \...
user187802's user avatar
  • 17.8k
4 votes
Accepted

Typesetting a long wide table in LaTeX

You have a lot of text that you're trying to squeeze in. Even without worrying about a table, the fourth line Logistic Reg. Preprocessor1\_Model01 0 recipe logistic\_reg binary 0,876333 0,871666667 0,...
Teepeemm's user avatar
  • 7,823
2 votes

\afterpage positions landscape page later than expected

Conceptually If you have a global requirement to have figures and tables stay in order and not float past each other they should have the same float type so, for the standard classes \makeatletter \...
David Carlisle's user avatar
5 votes
Accepted

\afterpage positions landscape page later than expected

Since you're using \afterpage, why not include both the landscape/table combo and the figure environment in its scope? This setup, plus a couple of judiciously-placed \clearpage instructions, suffices ...
Mico's user avatar
  • 528k
3 votes
Accepted

Defining column width as a fraction of linewidth/textwidth in tabularx and tabularray

Overfull \hbox (15.0pt too wide) in paragraph at lines 12--13 Never ignore warnings. The first problem (which latex is warning about) is that you have tables that are \textwidth wide but indented by ...
David Carlisle's user avatar
3 votes

How to evenly pad columns to make a table fit a specified width

With the following code you can specify the proportion of the width allotted for the first column and the total number of columns; the ones after the first will have equal width. \documentclass{...
egreg's user avatar
  • 1.2m
0 votes

Multirow in table bigger than single rows

Have a look at the tabularray package - it makes it easy to merge cells: \documentclass{article} \usepackage{tabularray} \usepackage{amsmath,amssymb,amsfonts,amsthm,mathrsfs} \begin{document} \begin{...
samcarter_is_at_topanswers.xyz's user avatar
4 votes

How to evenly pad columns to make a table fit a specified width

tabularx and tabulary adjust the table width by affecting the target column width for line breaking so shouldn't be applied to numeric data columns. All the numeric columns will naturally have the ...
David Carlisle's user avatar
6 votes

Problem with highlighting first row and column of a table

Missing lines or lines with not equal line width are often the result of the scaling in the PDF viewer. So you should either increase the size of the view or print it. If I test your code, I cannot ...
cabohah's user avatar
  • 17.9k
5 votes
Accepted

Problem with highlighting first row and column of a table

You could use the tabularray package for such tables. It makes it very easy to change the colour for specific rows and columns: \documentclass{article} \usepackage{xcolor} \usepackage{tabularray} \...
samcarter_is_at_topanswers.xyz's user avatar
2 votes

Stacking tables

Using tabularray: \documentclass{article} \usepackage{tabularray} \begin{document} \begin{table} \centering \begin{tblr}{hlines={1pt},vlines={1pt},columns={wd=1.5cm},rows={ht=0.5cm}} &&...
Stephen's user avatar
  • 6,230

Top 50 recent answers are included