class Rouge::Formatters::Tex

def stream(tokens, &b)

def stream(tokens, &b)
  # surround the output with \begin{RG*}...\end{RG*}
  yield "\\begin{#{@prefix}*}%\n"
  # we strip the newline off the last line to avoid
  # an extra line being rendered. we do this by yielding
  # the \newline tag *before* every line group except
  # the first.
  first = true
  token_lines tokens do |line|
    if first
      first = false
    else
      yield "\\newline%\n"
    end
    render_line(line, &b)
  end
  yield "%\n\\end{#{@prefix}*}%\n"
end