Text Formatting ⇒ \newline doesn't work inside \mbox{}
\newline doesn't work inside \mbox{}
It works perfectly in main body, but inside \mbox or \caption I can't
force it to do what I ask.
I have even installed livetex-full under Ubuntu (ealier was installed default).I'm beginner so I have put that information just incase it is important.
The same problem is under windows miktex. At the begining I thought that something is mising.
Code:
\documentclass[a4paper,10pt]{report}
\usepackage[utf8x]{inputenc}
\begin{document}
Here moving to \\next line works
\mbox{Here it \\ doesn't}
\end{document}
I used pdflatex and latex command under console (I have got the same effect).
It's what i have got after pdflatex:
http://fatcat.ftj.agh.edu.pl/~pradera/xx.pdf
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
\newline doesn't work inside \mbox{}
Code: Select all
\documentclass[a4paper,10pt]{report}
\usepackage[utf8x]{inputenc}
\begin{document}
Here moving to \\next line works
\parbox[t]{3cm}{Here it \\ also does}
\end{document}
Re: \newline doesn't work inside \mbox{}
Re: \newline doesn't work inside \mbox{}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
\newline doesn't work inside \mbox{}
If so, please mark the topic accordingly as written in Section 3 of the Board Rules (to be read before posting).rogozyn wrote:Thank you. It helped.
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10