سلام
چطور میتوانم در محیط alltt (شبیه به محیط verbatim) بدون استفاده از return متن مربوط به تعدادی الگوریتم را به اندازه عرض صفحه کنم؟ نمونه کد مربوط به یک متن معمولی و یک کد الگوریتم را قرار دادهام (نمیخواهم از محیط algorithm استفاده کنم.). متاسفانه \parbox هم کار نمیکند.
\documentclass{book}
\usepackage{alltt}
\usepackage{amsmath}
\usepackage[extrafootnotefeatures]{xepersian}
\settextfont[Scale=1]{XB Niloofar}
\setlatintextfont[Scale=.95]{Times New Roman}
\setdigitfont[Scale=.9]{Yas}
\begin{document}
\parbox{\textwidth}{
\begin{latin}
this is a sample text.this is a sample text.this is a sample text.this is a sample text.this is a sample text.this is a sample text.this is a sample text.this is a sample text.this is a sample text.this is a sample text.
\end{latin}
}
\hrule
%\parbox{\textwidth}{ %Error :(
\begin{latin}
			\begin{alltt}
			\textbf{Algorithm Binary_Search} (X, n, z);
			\underline{\textbf{Input}}: X (a sorted array in the range 1 to n), and z (the search key).
			\underline{\textbf{Output}}: Position (an index i such that X[i] = z, or 0 if no such index
			exist.)
			
			begin
			Position := Find (z,1,n);
			end
			
			function Find (z, Left, Right) : integer;
			begin
			if Left = Right then
			if X[Left] = z then Find := Left
			else Find := 0
			else
			Middle := \(\lceil\)(Left + Right)/2\(\rceil\);
			if z < X[Middle] then
			Find := Find (z, Left, Middle - 1) 
			else    
			Find := Find (z, Middle, Right) 
			end
		\end{alltt}
\end{latin}
%}
\end{document}