i want 2 lines to stay together... How do i do it?
This apparently doesn't work.
\mbox{ First Line \\
Second Line}
i want 2 lines to stay together... How do i do it?
This apparently doesn't work.
\mbox{ First Line \\
Second Line}
___________________________
in Comp.Text.Tex ... i only see CTAN (update) announcements
can i ask LaTeX questions?
Look up the environment minipage.
Jeff Barnett wrote:
Look up the environment minipage.
Or in this case perhaps parbox
i want 2 lines to stay together... How do i do it?
This apparently doesn't work.
\mbox{ First Line \\
Second Line}
On 19/07/2024 06:31, HenHanna wrote:
i want 2 lines to stay together... How do i do it?
This apparently doesn't work.
\mbox{ First Line \\
Second Line}
That's because \\ is for prematurely ending a line, not for combining them.
It's also used (differently) in tabular setting to signal the end of a row.
Can you explain what you want to do, with a worked example?
"want 2 lines to stay together" doesn't give enough information.
i want 2 lines to stay together... How do i do it?
I don't think crossposting to 5 groups two of which not in English will
help.
el
On 19/07/2024 07:31, HenHanna wrote:
i want 2 lines to stay together... How do i do it?
[...]
On 7/25/2024 8:37 AM, Eberhard W Lisse wrote:
I don't think crossposting to 5 groups two of which not in English will
help.
el
On 19/07/2024 07:31, HenHanna wrote:
i want 2 lines to stay together... How do i do it?
[...]
if i want 2 words to stay together... First~Second
(and/or \mbox{...} )
Shouldn't there be an easy way to do that for 2 lines?
On tor, 2024/07/18 at 22:31:29 -0700, HenHanna wrote:
i want 2 lines to stay together... How do i do it?
This apparently doesn't work.
\mbox{ First Line \\
Second Line}
WFM.
❯ cat test.tex
\documentclass[11pt,twoside,a4paper]{article}%
\begin{document}
\mbox{ Line1 \\
Line2 }
\end{document}
❯ latex test.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2024-06-01> patch level 2
L3 programming layer <2024-05-27> (/usr/local/texlive/2024/texmf-dist/tex/latex/base/article.cls
Document Class: article 2024/02/08 v1.4n Standard LaTeX document class (/usr/local/texlive/2024/texmf-dist/tex/latex/base/size11.clo)) (/usr/local/texlive/2024/texmf-dist/tex/latex/l3backend/l3backend-dvips.def) (./test.aux)
[1] (./test.aux) )
Output written on test.dvi (1 page, 256 bytes).
Transcript written on test.log.
❯ xdvi test.dvi
Shows "Line1 Line2" on the page.
https://tex.stackexchange.com/questions/146909/what-does-mbox-do
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 344 |
Nodes: | 16 (2 / 14) |
Uptime: | 33:16:30 |
Calls: | 7,521 |
Calls today: | 18 |
Files: | 12,713 |
Messages: | 5,642,724 |
Posted today: | 2 |