emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-mode: How to render latex inside ~code~
@ 2016-02-27 20:24 Lawrence Bottorff
  2016-02-27 20:41 ` Thomas S. Dye
  0 siblings, 1 reply; 3+ messages in thread
From: Lawrence Bottorff @ 2016-02-27 20:24 UTC (permalink / raw)
  To: emacs-orgmode Mailinglist

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

This seems a catch-22: I want to render code in an org-mode export (html or
latex pdf) where the snippet below done as a ~code block

> (cons 1 nil) \to (1)

actually renders \to as a proper right arrow (yields). Of course if I do
the snippet as inline latex

$> (cons 1 nil) \to (1)$

I get the properly rendered right arrow, but now it's not in the sans mono
code font. What can I do to have my cake and eat it too?

LB

[-- Attachment #2: Type: text/html, Size: 585 bytes --]

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

* Re: Org-mode: How to render latex inside ~code~
  2016-02-27 20:24 Org-mode: How to render latex inside ~code~ Lawrence Bottorff
@ 2016-02-27 20:41 ` Thomas S. Dye
  2016-02-27 21:32   ` Lawrence Bottorff
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas S. Dye @ 2016-02-27 20:41 UTC (permalink / raw)
  To: Lawrence Bottorff; +Cc: emacs-orgmode Mailinglist

Aloha Lawrence,

Lawrence Bottorff writes:

> This seems a catch-22: I want to render code in an org-mode export (html or
> latex pdf) where the snippet below done as a ~code block
>
>> (cons 1 nil) \to (1)
>
> actually renders \to as a proper right arrow (yields). Of course if I do the
> snippet as inline latex
>
> $> (cons 1 nil) \to (1)$
>
> I get the properly rendered right arrow, but now it's not in the sans mono code
> font. What can I do to have my cake and eat it too?

\to is defined in org-entities.  Do you get what you want by setting
org-pretty-entities non nil?

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

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

* Re: Org-mode: How to render latex inside ~code~
  2016-02-27 20:41 ` Thomas S. Dye
@ 2016-02-27 21:32   ` Lawrence Bottorff
  0 siblings, 0 replies; 3+ messages in thread
From: Lawrence Bottorff @ 2016-02-27 21:32 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode Mailinglist

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

Got it set

(custom-set-variables ... '(org-pretty-entities t) ...

but nothing changed. ~> (cons 1 nil) \to (1)~ still outputs the raw \to
even though in the buffer it changes.

On Sat, Feb 27, 2016 at 8:41 PM, Thomas S. Dye <tsd@tsdye.com> wrote:

> Aloha Lawrence,
>
> Lawrence Bottorff writes:
>
> > This seems a catch-22: I want to render code in an org-mode export (html
> or
> > latex pdf) where the snippet below done as a ~code block
> >
> >> (cons 1 nil) \to (1)
> >
> > actually renders \to as a proper right arrow (yields). Of course if I do
> the
> > snippet as inline latex
> >
> > $> (cons 1 nil) \to (1)$
> >
> > I get the properly rendered right arrow, but now it's not in the sans
> mono code
> > font. What can I do to have my cake and eat it too?
>
> \to is defined in org-entities.  Do you get what you want by setting
> org-pretty-entities non nil?
>
> All the best,
> Tom
>
> --
> Thomas S. Dye
> http://www.tsdye.com
>

[-- Attachment #2: Type: text/html, Size: 1564 bytes --]

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

end of thread, other threads:[~2016-02-27 21:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-27 20:24 Org-mode: How to render latex inside ~code~ Lawrence Bottorff
2016-02-27 20:41 ` Thomas S. Dye
2016-02-27 21:32   ` Lawrence Bottorff

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