Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inner mode for latex environments #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add inner mode for latex environments #17

wants to merge 2 commits into from

Conversation

jethrokuan
Copy link

This enables latex-mode for raw latex environments, which are common where we want exports to md/html to also have the latex equation. E.g.

foo bar baz

\begin{equation}
  x^y
\end{equation}

@vspinu
Copy link
Contributor

vspinu commented Jul 6, 2019

Thanks. This makes sense indeed. Would you mind defining the poly-org-root-innermode and deriving the two innermodes from it? You can use poly-markdown as an example.

:fallback-mode 'host
:head-mode 'host
:tail-mode 'host
(define-innermode poly-org-latex-innermode poly-org-root-innermode
:mode 'latex-mode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am actually no longer sure about this change. It looks like there is little support from org for latex chunks so most of configuration options cannot be reused. Also, shouldn't head be of body type here?

Copy link
Author

@jethrokuan jethrokuan Jul 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the same fashion as src chunks, latex chunks are typically edited by entering the indirect buffer environment with C-c ', so I thought equivalent treatment would make sense.

most of configuration options cannot be reused

what kind of configuration options?

Also, shouldn't head be of body type here?

honestly not sure what each of them entail, but this had worked for me

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I thought equivalent treatment would make sense.

I see. Ok. If latex is a first class environment in org then yes.

most of configuration options cannot be reused
what kind of configuration options?

Object's slots like head-mode, regexp etc. So it doesn't make much sense to inherit the latex from org src.

I will play with this as soon as I can. I am having limited computer access these weeks.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it doesn't make much sense to inherit the latex from org src.

I don't think I had made it inherit from the org-src ones.

I will play with this as soon as I can. I am having limited computer access these weeks.

np, take your time.

@maikol-solis
Copy link
Contributor

maikol-solis commented Oct 6, 2020

Hi!

It would super useful if you could merge this into the master.

Also if it's possible implement it on poly-R.

Definitely this PR is a must to have a complete smooth experience with literate documents with mixed latex and R.

Thanks for your great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants