\documentclass{beamer}
\begin{document}
\newcommand{\origintext}[??]{?????} %<-------------How ?
\section{aaa}
\subsection{bbb}
%%%%%%%%%%%%%%%%%%% frame 1
\frame{test frame 1}
%%%%%%%%%%%%%%%%%%%%%%% frame 2
\origintext{
\section*{sec title}
\subsection*{subsec title}
sadsadf
asfsaf
asfasf
}
%%%%%%%%%%%%%%%%%%%%%%%% frame
\frame{test frame 3}
\end{document}
thanks a lot! @cfr @barbara beeton @Christian Hupfer. Yes, I want show sth. from another .tex file use \documentclass{article}, hope looks like the result pdf file. the \section*{} generate bold large font ... Barbara Beeton gives a way, but I want generate it directively
\documentclass{article}
\begin{document}
\section*{sec title}
\subsection*{subsec title}
sadsadf
asfsaf
asfasf
\end{document}
\origintext? LaTeX code displayed as LaTeX code? – Sep 06 '15 at 11:51\thispagestyle{empty}), then insert the result in thebeamerfile with\includegraphics. some techniques for cropping the image are suggested in answers to this question: Compile a LaTeX document into a PNG image that's as short as possible – barbara beeton Sep 06 '15 at 12:25