Text Formattingframebox break the text

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
allevo
Posts: 49
Joined: Sat Apr 11, 2009 12:09 pm

framebox break the text

Post by allevo »

hi!!!!
i put in my text a framebox using this code:

Code: Select all

\documentclass{book}
\usepackage[centering, top=1.5in, left=2.5cm, right=2.5cm, bottom=1.5in, ignoreall]{geometry}
\usepackage{graphicx}
\usepackage{calc}
\usepackage{sidecap}

\begin{document}
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq 
{ \begin{flushright} \framebox[0.5\textwidth][r]{ciao!!!}   \end{flushright}}
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
\end{document}
but the text is interrupted by the framebox. i dont want it. what can i do?!?!

EDIT: i find psboxit. can it help me?!!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
barcense
Posts: 10
Joined: Sun Jun 10, 2007 2:16 pm

framebox break the text

Post by barcense »

Try this

Code: Select all

{ \raggedleft \framebox[0.5\textwidth][r]{ciao!!!}   }
I think this is the behavior you ask
Regards
allevo
Posts: 49
Joined: Sat Apr 11, 2009 12:09 pm

framebox break the text

Post by allevo »

i edit your code in this way:

Code: Select all

\documentclass{book}
\usepackage[centering, top=1.5in, left=2.5cm, right=2.5cm, bottom=1.5in, ignoreall]{geometry}
\usepackage{calc}

\begin{document}
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
{\\ \raggedright \framebox[0.5\textwidth][l]{\parbox{0.4\textwidth}{ciao!!! \newline fdsfds vmlv lòv
ffvl òflòf lflòfdlflflflfl fd gr gr v g r r r re re g reg re gregrer g reg re }   }}
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
\end{document}
but the frame box isn't to the right. why?
and the text beside of the text isn't correct: there is a line only.
barcense
Posts: 10
Joined: Sun Jun 10, 2007 2:16 pm

framebox break the text

Post by barcense »

Sorry, my poor english didn't let me understand your question, if now i'm right try this

Code: Select all

\documentclass{book}
\usepackage[centering, top=1.5in, left=2.5cm, right=2.5cm, bottom=1.5in, ignoreall]{geometry}
\usepackage{calc}
\usepackage{wrapfig}
\begin{document}
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
\begin{wrapfigure}{r}{0.5\textwidth} \framebox[\linewidth][l]{\parbox{0.9\linewidth}{ciao!!! \\
 fdsfds vmlv lòv
ffvl òflòf lflòfdlflflflfl fd gr gr v g r r r re re g reg re gregrer g reg re }   }
\end{wrapfigure}
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
fdsji jifoij mifewoij ifewi ijfeoi op qop dpqo  opq opf op feop opkfeop opfdq
\end{document}

as you can see i use the wrapfig environment from the wrapfig package to get the box at the right and the text wrapping at left. You can customize it reading the instructions that are at the end of the wrapfig.sty file
Hope it will be useful
allevo
Posts: 49
Joined: Sat Apr 11, 2009 12:09 pm

Re: framebox break the text

Post by allevo »

oh yes!!!!
thank you!!!
I don't know that wrapfigure can to contain a text!!!
Post Reply