From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Valentin_W=C3=BCstholz?= Subject: [PATCH] Checkboxes: LaTeX export Date: Fri, 6 Nov 2009 13:20:09 +0100 Message-ID: <69e68c6e0911060420m1d16467awa06da32f0102b03@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N6Nnw-00074x-IG for emacs-orgmode@gnu.org; Fri, 06 Nov 2009 07:20:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N6Nnr-0006xt-MI for emacs-orgmode@gnu.org; Fri, 06 Nov 2009 07:20:36 -0500 Received: from [199.232.76.173] (port=57407 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N6Nnr-0006xc-IX for emacs-orgmode@gnu.org; Fri, 06 Nov 2009 07:20:31 -0500 Received: from mail-ew0-f228.google.com ([209.85.219.228]:43528) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N6Nnr-00038x-2K for emacs-orgmode@gnu.org; Fri, 06 Nov 2009 07:20:31 -0500 Received: by ewy28 with SMTP id 28so1059846ewy.42 for ; Fri, 06 Nov 2009 04:20:29 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, I would like to suggest two smaller changes to the way checkboxes are exported in LaTeX. This is my patch: diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 6fbb06c..fa340a4 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -97,6 +97,7 @@ \\usepackage{float} \\usepackage{wrapfig} \\usepackage{soul} +\\usepackage{amssymb} \\usepackage{hyperref}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") @@ -112,6 +113,7 @@ \\usepackage{float} \\usepackage{wrapfig} \\usepackage{soul} +\\usepackage{amssymb} \\usepackage{hyperref}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") @@ -127,6 +129,7 @@ \\usepackage{float} \\usepackage{wrapfig} \\usepackage{soul} +\\usepackage{amssymb} \\usepackage{hyperref}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") @@ -290,7 +293,7 @@ string should be like \"\\end{itemize\"." (string :tag "Use a section string" :value "\\subparagraph{%s}"))) (defcustom org-export-latex-list-parameters - '(:cbon "\\texttt{[X]}" :cboff "\\texttt{[ ]}") + '(:cbon "$\\boxtimes$" :cboff "$\\Box$") "Parameters for the LaTeX list exporter. These parameters will be passed on to `org-list-to-latex', which in turn will pass them (combined with the LaTeX default list parameters) to diff --git a/lisp/org-list.el b/lisp/org-list.el index f17cde5..7a74964 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -1305,6 +1305,8 @@ Valid parameters PARAMS are (setq sublist (replace-match cbon t t sublist))) (if (string-match "\\[CBOFF\\]" sublist) (setq sublist (replace-match cboff t t sublist))) + (if (string-match "\\[-\\]" sublist) + (setq sublist (replace-match "$\\boxminus$" t t sublist))) (setq rtn (concat rtn istart term ddstart sublist ddend iend isep))) (t (setq rtn (concat rtn ;; previous list Cheers, Valentin