From: firstname.lastname@example.org To: email@example.com Cc: Help Emacs Orgmode <firstname.lastname@example.org> Subject: Re: displaying equations with ob-latex Date: Fri, 7 May 2021 00:08:50 +0200 [thread overview] Message-ID: <trinity-a93d1dc2-40b9-4e8f-8077-17205d4ef5b9-1620338930202@3c-app-mailcom-bs12> (raw) In-Reply-To: <8E0D781F-7947-4616-BA73-1B6F7C45442A@health.ucsd.edu> Did you manage to get the equations displayed, I have tried again and could not do it. It might be beneficial to give more details and some more examples on what to do. Can I export on a window that is to right window of the code window? I can one use plain tex commands. Texinfo mainly supports plain tex, org mode in basically latex, so the two programs do not currently work well together. Texinfo has the good feature to show equations (but only for plain tex) whereas org is good with latex (but not very adept at displaying the output in an emacs window). > Sent: Friday, May 07, 2021 at 6:14 AM > From: "Berry, Charles via General discussions about Org-mode." <email@example.com> > To: "firstname.lastname@example.org" <email@example.com> > Cc: "Help Emacs Orgmode" <firstname.lastname@example.org> > Subject: Re: displaying equations with ob-latex > > > > > On May 6, 2021, at 12:50 AM, email@example.com wrote: > > > > > > I am trying to use ob-latex but equations are not being displayed in emacs > > when I try to execute with "C-c C-c". > > Right. This is because `:results latex replace' is the default for latex src blocks and the leads to wrapping everything in a latex export block. > > The context inside that block is `export-block' - i.e. it is not a `greater-element' and cannot contain other elements. AFAIK, there is not previewer for export blocks - latex or otherwise. > > The context for an equation inside a greater-element is latex-fragment. And those can be rendered via `org-latex-preview'. > > If you want to render equations for previewing, you could put them into a drawer that is not repeated in the export. > > To make this work, you probably want something like this > > #+begin_src org > > ,#+name: eqn1 > ,#+begin_src latex :exports none :results drawer > \(y = x\beta + \epsilon\) > ,#+end_src > > > Here is the equation for export: > > ,#+call: eqn1() :results latex > > #+end_src > > Evaluating the latex src block (C-c C-c) will create a `results' drawer line this: > > #+RESULTS: eqn1 > :results: > \(y = x\beta + \epsilon\) > :end: > > but the `:exports none' will strip that out on export. The call line will create this on export: > > #+RESULTS: > #+begin_export latex > \(y = x\beta + \epsilon\) > #+end_export > > > HTH, > > Chuck > > > > >
next prev parent reply other threads:[~2021-05-06 22:10 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-06 7:50 michael-franzese 2021-05-06 18:14 ` Berry, Charles via General discussions about Org-mode. 2021-05-06 21:54 ` Christopher Dimech 2021-05-06 22:08 ` michael-franzese [this message] 2021-05-06 22:52 ` Berry, Charles via General discussions about Org-mode. 2021-05-06 23:20 ` michael-franzese 2021-05-07 1:36 ` Berry, Charles via General discussions about Org-mode. 2021-05-07 2:33 ` michael-franzese 2021-05-07 2:39 ` michael-franzese 2021-05-07 3:14 ` Ihor Radchenko 2021-05-07 3:20 ` michael-franzese 2021-05-07 3:36 ` michael-franzese 2021-05-07 4:40 ` Displaying " Christopher Dimech 2021-05-07 3:18 ` displaying " Berry, Charles via General discussions about Org-mode. 2021-05-07 3:22 ` michael-franzese 2021-05-06 23:31 ` michael-franzese 2021-05-06 9:54 michael-franzese 2021-05-06 12:37 ` Christopher Dimech 2021-05-06 12:44 ` pietru
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://www.orgmode.org/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=trinity-a93d1dc2-40b9-4e8f-8077-17205d4ef5b9-1620338930202@3c-app-mailcom-bs12 \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: displaying equations with ob-latex' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this 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).