From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rafael Subject: Theorems in org-mode? Date: Fri, 04 May 2012 19:05:07 -0500 Message-ID: <87aa1n332k.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQSUu-0007ER-Og for emacs-orgmode@gnu.org; Fri, 04 May 2012 20:05:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQSUs-0002OZ-Dn for emacs-orgmode@gnu.org; Fri, 04 May 2012 20:05:16 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:56066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQSUs-0002O3-5L for emacs-orgmode@gnu.org; Fri, 04 May 2012 20:05:14 -0400 Received: by obbwd18 with SMTP id wd18so5751527obb.0 for ; Fri, 04 May 2012 17:05:11 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: org-mode list Motivated by the side note by Nicolas in http://www.mail-archive.com/emacs-orgmode@gnu.org/msg55225.html, I tried the example at the end of this message, which requires org-special-blocks.el. It exports nicely to LaTeX->PDF with the new exporter (not so much with the old), so thanks! I wonder what I would need to add to make it export nicely to HTML with either the old or the new exporter. The old exporter inserts the labels with the text of the theorems, and the new inserts stuff like \begin{theorem} .. \end{theorem} with the text of the theorems. Now, the org-special-blocks documentation says: When #+begin_foo is encountered by the html exporter, a div with class foo is inserted into the HTML file. It is up to the user to add this class to his or her stylesheet if this div is to mean anything. I have used #+STYLE: but if somebody with actual HTML knowledge could suggest something prettier I would appreciate it. Best regards, Rafael #+begin_src org #+title: Theorems in org-mode #+latex_header: \usepackage{amsthm} #+latex_header: \newtheorem{theorem}{Theorem} #+latex_header: \newtheorem{definition}{Definition} #+options: ^:nil * Some theory #+begin_definition <> A /right triangle/ is a triangle with a right angle. #+end_definition #+begin_theorem <> We have that $a^2+b^2=c^2$. #+end_theorem This is an equation: #+begin_equation <> a^2+b^2=c^2 #+end_equation * Some references Theorem [[thm-1]] deals with triangles as in Definition [[def-1]], and satisfies equation ([[eq-1]]). #+end_src