emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Checkboxes: LaTeX export
@ 2009-11-06 12:20 Valentin Wüstholz
  2009-11-06 16:12 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Valentin Wüstholz @ 2009-11-06 12:20 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* Re: [PATCH] Checkboxes: LaTeX export
  2009-11-06 12:20 [PATCH] Checkboxes: LaTeX export Valentin Wüstholz
@ 2009-11-06 16:12 ` Carsten Dominik
  2009-11-09 20:36   ` Valentin Wüstholz
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2009-11-06 16:12 UTC (permalink / raw)
  To: Valentin Wüstholz; +Cc: emacs-orgmode

This is nice, thanks, I have applied your patch.

- Carsten

On Nov 6, 2009, at 1:20 PM, Valentin Wüstholz wrote:

> 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
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

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

* Re: [PATCH] Checkboxes: LaTeX export
  2009-11-06 16:12 ` Carsten Dominik
@ 2009-11-09 20:36   ` Valentin Wüstholz
  0 siblings, 0 replies; 3+ messages in thread
From: Valentin Wüstholz @ 2009-11-09 20:36 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Great! Thanks.

Valentin


On Fri, Nov 6, 2009 at 5:12 PM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
> This is nice, thanks, I have applied your patch.
>
> - Carsten
>
> On Nov 6, 2009, at 1:20 PM, Valentin Wüstholz wrote:
>
>> 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
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten
>
>
>
>

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

end of thread, other threads:[~2009-11-09 20:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-06 12:20 [PATCH] Checkboxes: LaTeX export Valentin Wüstholz
2009-11-06 16:12 ` Carsten Dominik
2009-11-09 20:36   ` Valentin Wüstholz

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).