Questions tagged [polymode]

Polymode is an emacs package that offers generic support for multiple major modes inside a single emacs buffer.

Polymode provides a framework for editing documents that combine multiple languages in a single file. Typical uses include markdown or LaTeX documents that include source code blocks. Polymode allows the user to edit the markdown or LaTeX text in the appropriate mode (ie., markdown-mode or AucTex), and seamlessly switches to the appropriate programming mode for the source code blocks.

Polymode also provides support for compiling documents, with configurable export functions. This allows the user to export a markdown or LaTeX document, along with its embedded source code, into a pdf or html document that includes the results of running the source code.

Project hompage

34 questions
4
votes
0 answers

Styled components with polymode

Can I use polymode for styled components inside tsx or jsx files? For example: // MyComponent.tsx const x = 1; const y = 2; const myStyle = css` background-color: red; padding: ${x + y}; margin-left: ${y} `; I want the stuff inside the css…
4
votes
1 answer

Polymode with python and latex-mode

The polymode manual suggests that creating new polymodes should be very easy: Creating new polymodes typically takes a few lines of code. I wanted to set it up to make emacs to switch to python mode inside of pythontex commands and environments.…
student
  • 1,099
  • 9
  • 29
1
vote
0 answers

Polymode: customise buffer names

Polymode creates a distinct buffer for each mode involved. Some use really inconvenient names, where the mode part of the name is easily longer than the actual document name itself, e.g. foo.Rmd[poly-head-tail]. Is it possible, if not eliminate the…
antonio
  • 1,822
  • 13
  • 27
1
vote
0 answers

Does SyncTeX work with Emacs polymode?

Specifically, I want to sync an Rnoweb (Rnw) source with a PDF opened in either Skim or Evince using polymode. Note that I have no problem weaving or exporting Rnw files and viewing PDFs with Skim. Thanks.
Knightgu
  • 21
  • 5
0
votes
0 answers

Broken syntax highlighting in polymode

I defined a polymode with julia-mode as the inner mode. It works well but sometimes syntax highlighting goes wrong and it can be fixed only by restarting emacs. I haven't figured out how I can reproduce it though. When it happens, the inner mode…
shg
  • 1