Questions tagged [hline]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
33 views

Command inside tabular with automatic \hline placement

I am trying to define a command that simplifies building tables. I want the last entry to be automatically preceded by a horizontal line. I tried to do a minimal working example, and it worked (...
user avatar
  • 117
0 votes
0 answers
17 views

line gaps visible in table [duplicate]

I am having some gaps when I use hline or cline in latex, here are examples of my code: \begin{table}[ht] \centering %{*4l} \begin{tabular}{|c|c|c|c|c|}%{p{0.22\textwidth}p{0.15\textwidth}p{0....
user avatar
0 votes
0 answers
48 views

Default \hline after every row

I have a long table inside a longtable environment. I don't want to put \hline everywhere. How do I tell LaTeX to do it for me? I need \hline after every row and also before the first row.
user avatar
  • 13
2 votes
1 answer
55 views

Include \hrule within tabular rows generated using \foreach

This question extends the solution from Generate rows in table using \multido (or something similar). Based on the solution to the linked question, I understand how to use a \foreach loop to build ...
user avatar
0 votes
1 answer
20 views

Table with an extra column (comments) without horizontal line-layout

I would like to comment only some rows of a table. Is there a way to realize a table with an extra column for comments without overshooting of horizontal lines? Working example: \documentclass{article}...
user avatar
  • 58
0 votes
1 answer
34 views

hline does not show up in the output

I have some long and large Microsoft word tables that I have to fit in my LaTeX document. I converted them with the Libreoffice extension, and it was easy enough. The most difficult part will be to ...
user avatar
1 vote
0 answers
28 views

Compilation errors when using \input inside tabular environment [duplicate]

I would like to include a table stored an external tex file in a latex document via \input inside a \begin{tabular}...\end{tabular} environment. This way the column alignment definitions and ...
user avatar
  • 133
1 vote
1 answer
95 views

Double vertical line column type in tabular

I need a column type with 2 vertical lines but I want the horizontal line to not go trought it. The result would be like this : \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{lipsum} ...
user avatar
  • 47
3 votes
1 answer
56 views

Issue with \input combined with \hline [duplicate]

I have always believed that \input was strictly equivalent to copy-pasting some code in a master latex file. But I currently experience this strange behaviour. Here is a minimal example. My main file ...
user avatar
  • 133
0 votes
1 answer
25 views

Creating a table with a vertically separated header row and \hhline produces horizontal line distortion

I want to create a table which marks some cells either with $\times$ or they simply stay empty. I have two header rows of which I would like to separate the first header row visually. I use \hhline{~==...
user avatar
  • 3
0 votes
2 answers
40 views

How do I prevent \hline from overrunning the edge of my table?

Here is my minimal working example : \documentclass{article} \usepackage{tabularx} \usepackage{pdflscape} \begin{document} \small \begin{tabularx}{1.33\textwidth}{ |c|c|c|c| } \hline Date ...
user avatar
2 votes
1 answer
75 views

Why after latest update to TL, tex4ht no longer shows \hline in tables

After I updated Tex Live 2021 last night, I am finding that tex4ht no longer shows horizontal lines in tables. Why is that, and how to get them to show again? Here is MWE \documentclass[12pt]{book} \...
user avatar
  • 18k
2 votes
1 answer
58 views

Unwanted space around hline introduces gaps in the table

I am using a latex template of a journal on Overleaf to prepare an article. The template adds spaces around the \hline so that the following code: \documentclass[draft]{agujournal2019} \begin{...
user avatar
  • 23
0 votes
1 answer
53 views

\hdashline in tikzpicture-environment

I've a trouble with this code. I'd like a \hdashline, but Overleaf gives me an error, why? My code \documentclass{article} \usepackage[italian]{babel} \usepackage[utf8]{inputenc} \usepackage[a4paper,...
user avatar
  • 793
0 votes
1 answer
74 views

Table alignments. How to make a \hline in the middle of a table

I was wondering how to create these tables in LaTeX. How to have the title adjusted to the left of the table. And how to color a \hline and how to put it in the middle of a table. It almost seems like ...
user avatar
3 votes
1 answer
57 views

my \begin won't work

when I try to use a \begin{left} and \begin{right}, they get mixed up. this is my code \begin{left} \begin{tabular}{l|c|c} Monophthongs & Front & Back \\ \hline ...
user avatar
3 votes
2 answers
204 views

Partial cline in table only for some fraction

Example: \begin{tabular}{|c|c|} \hline 1 & 2 \\ \cline{1-1}\cline{2-2} 3 & 4 \\ \hline \end{tabular} I want cline to cover only e.g. half of a cell of a table. Or maybe I can specify an ...
user avatar
  • 2,417
1 vote
0 answers
17 views

Longtable & \input - Misplaced \noalign and \omit [duplicate]

SOLVED! (see below) I'm trying to create a longtable that uses a generated input file. This is my main file: \documentclass[a4paper]{article} \usepackage[left=1cm, right=1cm, top=2cm, bottom=2cm]{...
user avatar
  • 111
1 vote
2 answers
184 views

Drawing `\hline` partially in a table

\documentclass[12pt,a4paper]{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb} \usepackage{ragged2e} \usepackage{tabularx} \usepackage{graphicx} \begin{document} \begin{...
user avatar
3 votes
2 answers
136 views

Tables : \toprule and \midrule contents overlap and space needed above and below \hline

In my table the following problems arise : Toprule contents overlap with midrule contents. I need a little space above and below the horizontal lines used in the middle of the table. Here's the ...
user avatar
  • 293
6 votes
1 answer
210 views

Why should \hline be the first instruction in a tabular row?

While debugging a macro, I've spotted this weird behavior (by weird, I mean I don't have the skill to understand why it is that way, and if it's a bug or a feature...). This MWE compiles: \...
user avatar
  • 259
2 votes
1 answer
63 views

Redefine \hrule without affecting \hline

I can produce two versions from a single latex source. In one version I want to ignore the instances of \hrule. Simply redefining it produces a problem with \hline. Hence the MWE below throws an error,...
user avatar
  • 2,545
0 votes
2 answers
103 views

How to draw a double horizontal line after head in all longtables?

I want to create a latex style, which would enable to draw a double horizontal line after longtable heads automatically. An important point I already have a lot of documents which contains longtables ...
user avatar
2 votes
0 answers
54 views

Extending hline within a colorbox environment

I am trying to extend the hlines of the following table such that they span the entire width of the colorbox, but can't seem to figure out how. The current Latex code looks like this: \documentclass[...
user avatar
7 votes
1 answer
546 views

Misplaced \noalign error with \input in a table after the 2020 fall LaTeX release

With the 2020 fall update, the behaviour of \input{} changed. Before, I would have a main latex document (main.tex) and then the table contents in another file (table.tex) . Importantly, the file ...
user avatar
  • 73
1 vote
1 answer
69 views

vertical line not spanning all the way

I'm trying to have the vertical line to span until the horizontal line (marked), and not having the gap I'm currently facing. The tabular rule is {l@{~}c@{~}c@{~}|c@{~}c@{~}}, thus it is hard for me ...
user avatar
  • 209
1 vote
1 answer
40 views

How can I add a \hline on a macro created table

I'm trying to create a table dynamically by adding rows to it. The idea is that the table has to be used/created before the rows are appended using a macro. I modified the method described here In ...
user avatar
  • 51
1 vote
1 answer
199 views

Longtable With Multirow and Multicolumn

First of all, thank you for trying to help! This is the problem that I have: I am trying to create a table that will list a bunch of commands and their description. For that, I need to be able to use ...
user avatar
  • 747
1 vote
1 answer
38 views

Isolated or duplicated hlines in a longtable

I am working with the following longtable on Overleaf : \begin{longtable}{lllll} \hline \multicolumn{1}{|l|}{\textbf{DM}} & \multicolumn{1}{...
user avatar
  • 27
2 votes
3 answers
516 views

Text around \hline and \cline gets very congested!

In table, when I use \hline and \cline, line gets very close to the text which looks congested. For example, in following example, G is almost touching the line above it. This looks very congested. ...
user avatar
  • 517
13 votes
2 answers
1k views

Problems with \input{table.tex}\hline after 2020 fall LaTeX release

Since updating to the 2020 Fall release (MikTeX on Windows but also tested with TeXLive), I can no longer compile files where tables are imported from an external file using \input and followed by \...
user avatar
2 votes
2 answers
1k views

\hline not working inside tables

I want horizontal lines between each row in the table. I use this code for the table. However, it shows only vertical lines. Here is my code(Please ignore the values inside table) \begin{table}[h] \...
user avatar
  • 53
0 votes
2 answers
261 views

How not cross out headings of table after using the merge row command multiline?

Hi latex and texmaker experts I am currently still new to latex and struggling to add horizontal lines to a table after using the multirow function in latex without crossing the headings of the table ...
user avatar
  • 5
2 votes
2 answers
154 views

\linewidth plus \cline plus centering using tabularx does not work out

I am trying to create a table using tabularx to stretch a table to over the full page width. Usually, it would not need the full width but I like it better if it's like this. In my table, I have some ...
user avatar
1 vote
2 answers
391 views

I cannot get a bottom horizontal line on my table

I have tried both \hline and \bottom rule, but for some reason I cannot get a bottom horizontal line on my table. \documentclass{report} \usepackage{amsmath} \begin{document} \begin{center} \...
user avatar
  • 11
1 vote
1 answer
87 views

Why are lines missing when using multicolumn? [duplicate]

Lines are missing between healthy and total column \documentclass{article} \usepackage[table]{xcolor} \usepackage{multirow} \usepackage{makecell} \begin{document} \begin{table} \centering \begin{...
user avatar
  • 85
1 vote
2 answers
230 views

Misplaced \noalign when working with tabular and tabularx and \hline

I am constantly getting the error "Misplaced \noalign" at the end of my tabularx. I already read a lot about it online for example that you need to put \\ before \hline. I did this but i am still ...
user avatar
0 votes
0 answers
15 views

Various errors when adding new row or horizontal line to table [duplicate]

I'm trying to replicate the table from Annex A of the ISO/IEC 27001 standard: Here is my MWE: \usepackage{array,longtable} \begin{longtable}{| l | >{\raggedright}p{0.2\textwidth} | >{\...
user avatar
2 votes
1 answer
138 views

How to get a bold horizontal line in a long table using xltabular

I have a long table going over several pages and I need the last horizontal line of this table on each page to be bold. However, I only get the horizontal line on the very last page to be bold. Is ...
user avatar
  • 218
1 vote
1 answer
3k views

\hline produces "undefined control sequence"

I'm at a loss why the proper code like this one would produce "undefined control sequence" at every \hline: \begin{center} \begin{tabular}{ |c|c|c| } \hline cell1 & cell2 & cell3 \\ ...
user avatar
  • 691
1 vote
1 answer
705 views

How to reduce space between a text line and differents \hline in a table - trying to use negative \vspace value

On the following figure, I try to make decrease the space betwen the line "Nombre de bins : (Y1) :5 ..." and the two \hlines above. More over, you can see that line "Nombre de bins : (Y1) :5 ..." is ...
user avatar
2 votes
2 answers
789 views

Dissapearing of table/cell borders with coloured cells in the PDF viewer depending on the zoom

I have a problem with the coloured tables that I want to include in my master thesis, so it is a very important issue for me. I generate the tables with tablesgenerator.com, and in the LaTeX viewer ...
user avatar
  • 23
2 votes
3 answers
2k views

Solution for disappearing table/cell borders with \rowcolor in the PDF viewer depending on zoom?

We are currently trying to convert some documents (with our corporate design) from InDesign to LaTeX. These documents are supposed to be available on the Homepage as PDF and also print out nicely. The ...
user avatar
0 votes
1 answer
1k views

Table with partial line on the top

I would like to mimecry the following table in LateX: I have tried the following code but I am having hard time to get the partial line on the top (the content is not important, only the top line to ...
user avatar
1 vote
1 answer
217 views

A table with `\hline`s in a tikzposter block

I would like to have a table with \hlines fit inside of a tikzposter block, but the lines stretch outside of the block, as shown in the following image: \documentclass[25pt, a0paper, portrait]{...
user avatar
  • 633
2 votes
2 answers
588 views

Errors with table [duplicate]

I am very new to the latex community (1 week) and writing my thesis with latex. I am trying to built a table using the following code: \begin{center} \begin{longtable} [c] { |m{3cm}|m{2cm}|m{2cm}|m{...
user avatar
  • 31
0 votes
2 answers
294 views

Discontinuous table border line appearing while using tabular

I was trying to increase the thickness of the cell by giving extra space at the bottom of cell but that gives me discontinuos line at the table border. How can I get rid of this. Solution using only ...
user avatar
3 votes
2 answers
165 views

Combine rectangle split with array

I want to draw a "complicated" figure, like shown below. What is need to be done: Enlarge the \hdashline to fit the hole width (drawn in red) Remove the dashed line (:) from the first row (done per ...
user avatar
  • 1,952
1 vote
1 answer
826 views

horizontal line in table does not cover full width

Below I have the code to create a table in latex, but the horizontal dashed line is not drawn over the full width of the table. \begin{table}[H] \caption{Aggregated sales data of all products} % ...
user avatar
  • 143
4 votes
1 answer
666 views

A midrule line under each column, separated by white space

How can we draw a horizontal line in a table with white space between each column? A MWE, using booktabs's \midrule and \cmidrule: \documentclass[11pt,twoside,a4paper]{article} \usepackage{booktabs}...
user avatar
  • 195