emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* latex export: can I add an optional argument to an item?
@ 2016-12-01  9:04 Alan Schmitt
  2016-12-01 19:36 ` Richard Lawrence
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Schmitt @ 2016-12-01  9:04 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

Hello,

I would like to generate the following latex export:

\begin{itemize}
\item[\Checkmark] foo
\end{itemize}

I tried both

-[\Checkmark]

and

- [\Checkmark]

but neither works.

Is this possible with org-mode?

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-10: 401.57, 2015-10: 398.29

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]

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

* Re: latex export: can I add an optional argument to an item?
  2016-12-01  9:04 Alan Schmitt
@ 2016-12-01 19:36 ` Richard Lawrence
  2016-12-02  8:28   ` Alan Schmitt
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Lawrence @ 2016-12-01 19:36 UTC (permalink / raw)
  To: Alan Schmitt, Org list

Hi Alan,

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> I would like to generate the following latex export:
>
> \begin{itemize}
> \item[\Checkmark] foo
> \end{itemize}

It's not exactly pretty, but you can use a description list while
resetting it to the itemize environment, like:

#+ATTR_LATEX: :environment itemize  
  - \Checkmark :: foo

That produces:

\begin{itemize}
\item[{\Checkmark}] foo
\end{itemize}

At least, that works for me (I have not yet upgraded to Org 9.0;
so I don't know if this will continue to work, though I don't know of
any reason why it shouldn't). 

Hope that helps!

Best,
Richard

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

* Re: latex export: can I add an optional argument to an item?
  2016-12-01 19:36 ` Richard Lawrence
@ 2016-12-02  8:28   ` Alan Schmitt
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Schmitt @ 2016-12-02  8:28 UTC (permalink / raw)
  To: Richard Lawrence; +Cc: Org list

[-- Attachment #1: Type: text/plain, Size: 856 bytes --]

Hello Richard,

On 2016-12-01 11:36, Richard Lawrence <richard.lawrence@berkeley.edu> writes:

>> I would like to generate the following latex export:
>>
>> \begin{itemize}
>> \item[\Checkmark] foo
>> \end{itemize}
>
> It's not exactly pretty, but you can use a description list while
> resetting it to the itemize environment, like:
>
> #+ATTR_LATEX: :environment itemize  
>   - \Checkmark :: foo
>
> That produces:
>
> \begin{itemize}
> \item[{\Checkmark}] foo
> \end{itemize}
>
> At least, that works for me (I have not yet upgraded to Org 9.0;
> so I don't know if this will continue to work, though I don't know of
> any reason why it shouldn't). 

It works great (on current org), thanks a lot!

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-10: 401.57, 2015-10: 398.29

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]

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

* Re: latex export: can I add an optional argument to an item?
       [not found] <df7a186cf8154c80951a8ceeec0a07f2@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-12-02  9:52 ` Eric S Fraga
  2016-12-02 10:35   ` Alan Schmitt
       [not found]   ` <d262ae9e32b54fd9aefcfc9a95dadf0e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Eric S Fraga @ 2016-12-02  9:52 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

On Thursday,  1 Dec 2016 at 09:04, Alan Schmitt wrote:
> Hello,
>
> I would like to generate the following latex export:
>
> \begin{itemize}
> \item[\Checkmark] foo
> \end{itemize}
>
> I tried both
>
> -[\Checkmark]
>
> and
>
> - [\Checkmark]
>
> but neither works.
>
> Is this possible with org-mode?

I know you've had some answers but if you want exactly what you
specified in LaTeX, the following will do it:

--8<---------------cut here---------------start------------->8---
* intro
This is a list
- @@latex:[\(\checkmark\)]@@ and so on
- normal item
--8<---------------cut here---------------end--------------->8---


(I don't have Checkmark defined so used checkmark instead)

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.1-83-g305ff7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 180 bytes --]

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

* Re: latex export: can I add an optional argument to an item?
  2016-12-02  9:52 ` latex export: can I add an optional argument to an item? Eric S Fraga
@ 2016-12-02 10:35   ` Alan Schmitt
       [not found]   ` <d262ae9e32b54fd9aefcfc9a95dadf0e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  1 sibling, 0 replies; 6+ messages in thread
From: Alan Schmitt @ 2016-12-02 10:35 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 507 bytes --]

Hi Eric,

On 2016-12-02 09:52, Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> I know you've had some answers but if you want exactly what you
> specified in LaTeX, the following will do it:
>
> * intro
> This is a list
> - @@latex:[\(\checkmark\)]@@ and so on
> - normal item

Thank you for the suggestion. With macros that makes for a quite elegant
solution.

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-10: 401.57, 2015-10: 398.29

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]

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

* Re: latex export: can I add an optional argument to an item?
       [not found]   ` <d262ae9e32b54fd9aefcfc9a95dadf0e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-12-02 11:45     ` Eric S Fraga
  0 siblings, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2016-12-02 11:45 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

On Friday,  2 Dec 2016 at 10:35, Alan Schmitt wrote:
> Thank you for the suggestion. With macros that makes for a quite elegant
> solution.

You're welcome.  And, yes, with macros, many LaTeX aspects can be
incorporated easily without making everything look a mess.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.1-83-g305ff7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 180 bytes --]

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

end of thread, other threads:[~2016-12-02 16:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <df7a186cf8154c80951a8ceeec0a07f2@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-12-02  9:52 ` latex export: can I add an optional argument to an item? Eric S Fraga
2016-12-02 10:35   ` Alan Schmitt
     [not found]   ` <d262ae9e32b54fd9aefcfc9a95dadf0e@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-12-02 11:45     ` Eric S Fraga
2016-12-01  9:04 Alan Schmitt
2016-12-01 19:36 ` Richard Lawrence
2016-12-02  8:28   ` Alan Schmitt

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