 separated by a ynb-output-marker line."
   (interactive)
   (let ((cell)
-        (pt))
+        (pt)
+        (pt2))
     (ynb-delete-output)
     (setq pt (point))
     (setq cell (ynb-get-cell-contents))

    (open-line 1)
    (insert "\\outputtex")
    (forward-line 1)		 ; ..
    (while (string-match "[^ \t\n]" cell)
      (setq end (yacas-find-command-end-string cell))
      (yacas-single-command (substring cell 0 end))
      (yacas-single-command ynb-tex-string)
      (setq cell (substring cell end))
      (insert "\\ys " (yacas-tex-output) "\\\\\n"))
    (goto-char pt)))

(defun ynb-replace-line-with-tex ()

separated by a ynb-output-marker line."
  (interactive)
  (let ((cell)
        (pt)
        (pt2)
        (out))
    (ynb-delete-output)
    (setq pt (point))
    (setq cell (ynb-get-cell-contents))
