unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* outline -> latex
@ 2003-10-17 20:21 ray
  0 siblings, 0 replies; 3+ messages in thread
From: ray @ 2003-10-17 20:21 UTC (permalink / raw)


Hi,

just a question here: Isn't there an easy way to convert outline into
latex?  I am not realy sure, but I thought there was something.  Does
somebody have a clue?

Thanks, ray

-- 
		       Raimund Kohl Consulting
	       Kommunikative Praktizierungskonzepte und
	     Business-Dienstleistungen für Heilpraktiker
		 Schlesierstr. 19 * 67112 Mutterstadt
       T: 06234-929329 * F: 06234-929267 * e: info@nabuli.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: outline -> latex
       [not found] <mailman.1903.1066424745.21628.help-gnu-emacs@gnu.org>
@ 2003-10-19 14:04 ` Oliver Scholz
  2003-10-20 12:54 ` Colin Marquardt
  1 sibling, 0 replies; 3+ messages in thread
From: Oliver Scholz @ 2003-10-19 14:04 UTC (permalink / raw)


ray@nabuli.de writes:
[...]
> just a question here: Isn't there an easy way to convert outline into
> latex?  I am not realy sure, but I thought there was something.  Does
> somebody have a clue?

I am not aware of any package doing this, but unless I am
misunderstanding you, I dare say that this task is rather trivial,
since it is just about regexp matching and replacing.

Hmm, maybe:

(defconst ray-outline-to-latex-alist
  '((1 "\\section{%s}")
    (2 "\\subsection{%s}")
    (3 "\\subsubsection{%s}")))

(defun ray-outline-to-latex ()
  (interactive)
  (save-excursion
    (goto-char (point-min))
    (ray-convert-heading-maybe)
    (while (= 0 (forward-line 1))
      (ray-convert-heading-maybe))))

(defun ray-convert-heading-maybe ()
  (when (looking-at outline-regexp)
    (let ((format (cadr (assq (funcall outline-level)
			      ray-outline-to-latex-alist)))
	  str)
      (when format
	(goto-char (match-end 0))
	(skip-syntax-forward "-")
	(setq str (buffer-substring (point) (line-end-position)))
	(delete-region (line-beginning-position)
		       (line-end-position))
	(insert (format format str))))))


    Oliver
-- 
28 Vendémiaire an 212 de la Révolution
Liberté, Egalité, Fraternité!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: outline -> latex
       [not found] <mailman.1903.1066424745.21628.help-gnu-emacs@gnu.org>
  2003-10-19 14:04 ` Oliver Scholz
@ 2003-10-20 12:54 ` Colin Marquardt
  1 sibling, 0 replies; 3+ messages in thread
From: Colin Marquardt @ 2003-10-20 12:54 UTC (permalink / raw)


ray@nabuli.de writes:

> just a question here: Isn't there an easy way to convert outline into
> latex?  I am not realy sure, but I thought there was something.  Does
> somebody have a clue?

Maybe you are looking for <http://www.emacswiki.org/cgi-bin/wiki/BhlMode>?

HTH,
  Colin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-20 12:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-17 20:21 outline -> latex ray
     [not found] <mailman.1903.1066424745.21628.help-gnu-emacs@gnu.org>
2003-10-19 14:04 ` Oliver Scholz
2003-10-20 12:54 ` Colin Marquardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).