1

I use TeXShop on Mac. After updating to the newest version (I've been negligent for a bit) I've been having difficulty with \vspace and \normalfont. In particular, \normalfont does nothing after using \large, and \vspace only skips after the next \\ command, so I've been needing to use \vspace{} \text{}\\ to get it to work. I've posted below what I have as a minimal working example. I'm not sure if I have an error here (any help appreciated) or if these changed with the update. In either case, any help/suggestions/advice for how to better use \vspace and \normalfont would be appreciated.

\usepackage[paperwidth=8.5in,paperheight=11in,margin=.75in,headheight=0.27in,headsep=.1in]{geometry}

\begin{document} \noindent \large \textbf{The Tangent Problem}\ \normalfont \vspace{3cm}\ test1 \vspace{4cm} test2 3 4\ 5\ 6\ \end{document}

PQ-
  • 11
  • 3
    that never worked. Use \normalsize to get the normal font size, and use \vspace only between paragraphs (after an empty line), inside paragraphs use \\[3cm]. – Ulrike Fischer Jul 13 '22 at 16:16
  • Thanks for your comment on \normalsize. I'm still having the same issue with \vspace, I can only get a vertical space after using the \\ command later on elsewhere, even after an empty line (like the line above 4\\), which requires something like \vspace{stuff} \text{} \\\ for me. The command \\\[3cm] helps, but I still can't get \vspace to work out. – PQ- Jul 13 '22 at 16:49
  • learn some latex basics. E.g. https://www.learnlatex.org/en/lesson-11 – Ulrike Fischer Jul 13 '22 at 16:57
  • \normalfont selects the document default font but that is the current font so it does nothig. avoid using \\ ad \vspace, certaily don't use them at the same place, as here. – David Carlisle Jul 13 '22 at 20:41
  • Gotcha, should use \normalsize not \normalfont, silly mistake. I've tried to avoid using \\ and use only line breaks and \vspace, but I found that the compiler (or whatever it is) seems to be ignoring \vspace unless I also use \\ – PQ- Jul 13 '22 at 21:15

1 Answers1

1

LaTeX ain't a word processor.

If you want a title, mark it up with \section or another related command. If you want to do things by hand, you can, of course.

{\large\bfseries The tangent problem\par}

\vspace{3cm}

text

\vspace{4cm}

text

The braces around \large\bfseries ensure that the font size and shape commands don't leak, it's quite uncommon to have \normalfont or \normalsize in the document body. The \par ensures that the title uses the correct line spacing.

Using \\ is a sure sign of bad markup.

Better input:

\section*{The tangent problem}

Text

Other text

With \section* you don't get a number.


Let's examine your code

\noindent \large \textbf{The Tangent Problem}\\
\normalfont
\vspace{3cm}\\
test1
\vspace{4cm}
test2
3
4\\
5\\
6\\

The \large selection applies to everything, because it's not issued in a group and \normalfont does not act on the font size.

The part

\normalfont\vspace{3cm}\\

is an empty line containing only a \vspace instruction, which causes TeX to insert the vertical space after that line and to issue an Underfull \hbox (badness 10000) message (because the line is empty).

Next we have the equivalent of

test1 \vspace{4cm} test2 3 4\\

which is a single line, because \vspace doesn't force ending a paragraph. The vertical space is added after that line.

Next we have a line containing just 5 and another one containing 6.

Output, as expected:

enter image description here

egreg
  • 1,121,712
  • Thanks for your suggestions. That worked when I tried that, but I was confused about what was going wrong with \vspace. I looked more and found when I had {\large\bfseries The tangent problem\par} .. \vspace{1cm} .. test1 .. \vspace{2cm} .. test2 .. test3

    that test1 test2 and test3 all appeared on the same line still. Could you help me understand this?

    Edit: just realized that they all got put on the same line after pressing submit. I have entered .. everywhere there is a line break.

    – PQ- Jul 13 '22 at 21:11
  • @PQ- I added an explanation. – egreg Jul 13 '22 at 21:19