
Cómo dibujar dos líneas entre texto como se muestra en esta imagen. este es mi codigo
\documentclass{article}
\thispagestyle{empty}
\usepackage{lipsum}
\begin{document}
\noindent\rule[0.5ex]{\linewidth}{1pt}
Algorithm Use iteration to find general solution
\noindent\rule[0.5ex]{\linewidth}{1pt}
fator $a$,$b$
$y=a+bx$
\noindent\rule[0.5ex]{\linewidth}{1pt}
\end{document}
Respuesta1
¿Puedo sugerir una alternativa? Utilice algorithmic
el paquete donde puede encontrar más información aquí.Algoritmos. Se generan dos imágenes: una a partir de su código y la otra es un ejemplo basado en la imagen OP.
\documentclass[10pt,a4paper]{article}
\usepackage{algorithmic}
\usepackage{algorithm}
\begin{document}
% Your code
\noindent\rule[0.5ex]{\linewidth}{1pt}
Algorithm Use iteration to find general solution
\noindent\rule[0.5ex]{\linewidth}{1pt}
factor $a$,$b$
$y=a+bx$
\noindent\rule[0.5ex]{\linewidth}{1pt}
% alternative
\begin{algorithm}
\caption{Use iteration to find the general solution of the ODE in Example 1.4}\label{abc}
\begin{algorithmic}[1]
\STATE factor \textbf{a,b};
\STATE {\textbf {y:=a+b*x}};
\FOR {\textbf{n:=1:4 do write}}
\STATE {\textbf{y:=a+b*x-int(int(y,x),x)}}
\ENDFOR
\end{algorithmic}
\end{algorithm}
\end{document}