2

I'm new to LaTeX. I completely want to remove the vertical space between two consecutive lines in a paragraph. Let me show you what I mean.

\documentclass[12pt]{article}
\renewcommand\baselinestretch{0}
\setlength\parindent{0pt}
\setlength\intextsep{0pt}
\renewcommand\arraystretch{0}

\begin{document}

nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn  

\begin{table}[h]

\begin{tabular}{ccc}
\hline a&a&a\\
b&b&b\\\hline
\end{tabular}
\end{table}

nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn nnnnn 

\end{document}

In this code, even though the baselinestretch is 0, there seems to be a tiny vertical gap between to consecutive lines.

sample

But when the arraystretch for the table is 0, there is no gap between the two rows of the table.

How should I remove this vertical space from two consecutive lines in a paragraph?

1

1 Answer 1

6

You can add

\setlength\lineskip{0pt}

hopefully your real example is some special codes not human readable text!

2
  • Wouldn't that apply for the entire document? Is there a local fix? Mar 16, 2021 at 6:51
  • @EduardoReis its a local setting like a font change so local to the current group or environment Mar 16, 2021 at 10:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .