2

I have a non indented paragraph that I want to put a box around it. Do you know how to do it?

\documentclass[openany]{book}

\usepackage{amsbsy}
\usepackage{changepage}
\usepackage{geometry}
\geometry{paperheight=9.8125in,paperwidth=8in, left=.5in, 
right=.5in,top=.75in,bottom=.4375in }

\usepackage{fancyhdr}
\fancypagestyle{plain}{\fancyhf{} \fancyhead[EL,OR]{\textbf 
{\thepage}}\renewcommand{\headrulewidth}{0pt}}
\pagestyle{plain}

\renewcommand{\rmdefault}{pag}

\usepackage[utf8]{inputenc}
\usepackage[hyphens]{url}
\usepackage[authoryear,round]{natbib}
\newcommand{\titlefontarash}{%
\usefont{OT1}{pag}{b}{n}\fontsize{25}{30} \selectfont
}
\newcommand{\basefontarash}{\usefont{OT1}{pag}{b}{n}\fontsize{18} 
{\baselineskip} \selectfont}
\newcommand{\datefontarash}{\usefont{OT1}{pag}{m}{n}\fontsize{12} 
{\baselineskip} \selectfont}


\begin{document}

\title{\titlefontarash  respect respect respect respect respect respect 
  respect respect respect respect respect respect respect respect respect 
  respect respect respect respect respect respect respect respect }
 \author{\basefontarash good boy}
\date{\datefontarash April 21, 2019}
{ 
\maketitle
\let\cleardoublepage\relax
\frontmatter
} 
\vspace*{\fill}
\begin{center}
\basefontarash To beauty...
\linebreak 
\linebreak
\basefontarash To nice...
\end{center}
\vspace*{\fill}
\tableofcontents

\begin{adjustwidth}{2.25in}{0pt}
\mainmatter
Introduction

\chapter{beauty}

fish (\citet{fox(1994)})  number $\pi +15 \pi + \sqrt{145} \Omega +v\pi + 
a^2 +2ab + b^2 + \pi +v\pi +\pi +\pi 
+\pi +\pi +v\pi +v\pi +\pi +\pi +\pi +\pi +\pi +\pi +\pi +\pi +$ fish 
\textbf{RIVER ${\boldsymbol{\pi+\pi+\pi+\pi+\pi+\pi+\pi+\pi+\pi}}$}  
(\citet{chicken(1807)})
following .

\noindent \textbf{I WANT TO PUT THE BOX AROUND HERE}\hspace{.1875in}  THE 
BOX INCLUDES THIS TOO.
THE BOX INCLUDES THIS TOO. THE BOX INCLUDES THIS TOO.THE BOX INCLUDES THIS 
TOO.THE BOX INCLUDES THIS TOO.
THE BOX INCLUDES THIS TOO.THE BOX INCLUDES THIS TOO.THE BOX INCLUDES THIS 
TOO.
 \section{fox1}
\subsection{fox2}
\subsection{fox3}
\subsection{fox4}
\subsection{fox5}
\subsection{fox6}
\subsection{fox7}
  Now we are fox...
Let us see what happens
\section{fish}
fish fox dog catfish fox dog catfish fox dog catfish fox dog catfish fox dog 
catvfish fox dog catvfish fox dog catfish fox dog catfish fox dog catfish 
fox dog catfish fox dog catfish fox dog catfish fox dog catfish fox dog 
catfish fox dog catfish fox dog catfish fox dog catfish fox dog catfish fox 
dog catfish fox dog catfish fox dog catfish fox dog catfish fox dog catfish 
fox dog catfish fox dog catfish fox dog catfish fox dog catfish fox dog 
catfish fox dog cat

 \section{fish5}
fish fox dog catfish fox dog catfish fox dog catfish fox dog catfish fox dog 
catvvfish fox dog catfish fox dog catfish fox dog catfish fox dog catfish 
fox dog cat
\section{dog}
fish fox dog catvvvfish fox dog catfish fox dog catfish fox dog catfish fox 
dog catfish fox dog cat
\subsection{dog  ${\boldsymbol{\pi}}$}
 \section{mouse}
 \section{milk}
\chapter{pishi}
\end{adjustwidth}
\begin{thebibliography}{9}
\bibitem[fox(1994)]{fox(1994)}fox, T. L. (1994) \textit{fox.} New York: fox.  
\bibitem[chicken(1807)]{chicken(1807)}chicken, Z. L. (1807) \textit{fox.} 
Boston: cat fish.  
\end{thebibliography}
 \end{document}
3

Welcome to TeX.SX! For this sort of thing, my favourite tool these days is the tcolorbox package. Specifically, you can use:

  \begin{tcolorbox}
    \noindent \textbf{I WANT TO PUT THE BOX AROUND
    HERE}\hspace{.1875in}  THE BOX INCLUDES THIS TOO.  THE BOX
    INCLUDES THIS TOO. THE BOX INCLUDES THIS TOO.THE BOX INCLUDES
    THIS TOO.THE BOX INCLUDES THIS TOO.  THE BOX INCLUDES THIS
    TOO.THE BOX INCLUDES THIS TOO.THE BOX INCLUDES THIS TOO.
  \end{tcolorbox}

to produce:

enter image description here

Btw, when asking questions it is better if you can reduce your code down to a minimal working example. This should be the smallest amount of code that you need to demonstrate your problem such that it also compiles. In this case, the MWE the produces the screenshot above is:

\documentclass[openany]{book}
\usepackage{tcolorbox}
\begin{document}

  fish number $\pi +15 \pi + \sqrt{145} \Omega +v\pi +
  a^2 +2ab + b^2 + \pi +v\pi +\pi +\pi
  +\pi +\pi +v\pi +v\pi +\pi +\pi +\pi +\pi +\pi +\pi +\pi +\pi +$ fish
  \textbf{RIVER ${\pi+\pi+\pi+\pi+\pi+\pi+\pi+\pi+\pi}$}
  following .

  \begin{tcolorbox}
    \noindent \textbf{I WANT TO PUT THE BOX AROUND
    HERE}\hspace{.1875in}  THE BOX INCLUDES THIS TOO.  THE BOX
    INCLUDES THIS TOO. THE BOX INCLUDES THIS TOO.THE BOX INCLUDES
    THIS TOO.THE BOX INCLUDES THIS TOO.  THE BOX INCLUDES THIS
    TOO.THE BOX INCLUDES THIS TOO.THE BOX INCLUDES THIS TOO.
  \end{tcolorbox}
  \section{fox1}
\end{document}

There are many many options for controlling the colours, titles etc etc. See the tcolorbox manual for more details.

As mentioned in the comments, another option is to use the mdframed package. In this case, the MWE

\documentclass[openany]{book}
\usepackage{mdframed}
\begin{document}

  fish number $\pi +15 \pi + \sqrt{145} \Omega +v\pi +
  a^2 +2ab + b^2 + \pi +v\pi +\pi +\pi
  +\pi +\pi +v\pi +v\pi +\pi +\pi +\pi +\pi +\pi +\pi +\pi +\pi +$ fish
  \textbf{RIVER ${\pi+\pi+\pi+\pi+\pi+\pi+\pi+\pi+\pi}$}
  following .

  \begin{mdframed}
    \noindent \textbf{I WANT TO PUT THE BOX AROUND HERE}\hspace{.1875in}  THE
    BOX INCLUDES THIS TOO.
    THE BOX INCLUDES THIS TOO. THE BOX INCLUDES THIS TOO.THE BOX INCLUDES THIS
    TOO.THE BOX INCLUDES THIS TOO.
    THE BOX INCLUDES THIS TOO.THE BOX INCLUDES THIS TOO.THE BOX INCLUDES THIS
    TOO.
  \end{mdframed}
  \section{fox1}
\end{document}

produces

enter image description here

As before, there are many many options; see the mdframed manual.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.