{"id":13863055,"url":"https://github.com/et2010/org-edit-latex","last_synced_at":"2025-07-14T13:33:19.204Z","repository":{"id":94452449,"uuid":"85771415","full_name":"et2010/org-edit-latex","owner":"et2010","description":"Edit LaTeX fragments like editing src blocks","archived":false,"fork":false,"pushed_at":"2017-09-08T15:25:14.000Z","size":1006,"stargazers_count":67,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-05T06:06:38.469Z","etag":null,"topics":["edit","emacs","emacs-mode","latex","latex-fragment","org-mode","orgmode"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/et2010.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-03-22T01:29:42.000Z","updated_at":"2024-07-07T14:12:16.000Z","dependencies_parsed_at":"2023-03-02T06:00:27.818Z","dependency_job_id":null,"html_url":"https://github.com/et2010/org-edit-latex","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/et2010%2Forg-edit-latex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/et2010%2Forg-edit-latex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/et2010%2Forg-edit-latex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/et2010%2Forg-edit-latex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/et2010","download_url":"https://codeload.github.com/et2010/org-edit-latex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225980898,"owners_count":17554919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["edit","emacs","emacs-mode","latex","latex-fragment","org-mode","orgmode"],"created_at":"2024-08-05T06:02:00.876Z","updated_at":"2024-11-22T23:30:40.565Z","avatar_url":"https://github.com/et2010.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"[![MELPA](http://melpa.milkbox.net/packages/org-edit-latex-badge.svg)](http://melpa.milkbox.net/#/org-edit-latex)\n\n## Org Edit LaTeX\n\nWith this package, you can edit a latex fragment/environment in an edit\nbuffer, and you can even complete and preview LaTeX in the edit buffer.\n\nThe latest release of Org (version 9.1) provides a similar feature, i.e. edit\na latex environment in an edit buffer. But there are still some features\noffered here are not in org yet. Some of them are:\n\n- **Complete based on your latex header.**\n\n  With org-edit-latex, you can complete your latex commands according to the\n  #+latex_header: lines in your main org buffer (powered by AucTeX). This is not\n  possible in vanilla org.\n\n- **Preview in the edit buffer.**\n\n  You don't have to quit your edit buffer to do the preview. You can just\n  preview at point! With the fantastic AucTeX working behind, you can cache\n  your preamble and preview really fast (faster than org-preview).\n\n- **Edit and preview latex fragments in edit buffer.**\n\n  Besides LaTeX environments, you can also edit/preview latex fragments in edit\n  buffer. This may not count as a feature. but in case you need it, it's there.\n\nThis package has been tested on Org 8.0 and above. Feel free to use it on\nOrg mode shipped with emacs.\n\n![org-edit-latex](./screenshots/demo.gif)\n\n### Install\n\nFirst, download `org-edit-latex` and add following to your init file:\n\n```\n(require 'org-edit-latex)\n```\n\nYou should add `latex` to your `org-babel-load-languages`:\n\n```\n(org-babel-do-load-languages\n 'org-babel-load-languages\n '((emacs-lisp . t)\n   (latex . t)   ;; \u003c== add latex to the list\n   (python . t)\n   (shell . t)\n   (ruby . t)\n   (perl . t)))\n```\n\n### Basic Usage\nTurn on `org-edit-latex-mode` and use following commands to start/exit/abort a\nedit buffer.\n\n- `org-edit-special`: enter a dedicated LaTeX buffer.\n- `org-edit-src-exit`: exit LaTeX buffer when you finished editing.\n- `org-edit-src-abort`: quit editing without saving changes.\n\nNote that all above commands are built-in Org commands and your current\nkeybindings will probably do the job.\n\n### Inline Math\nInline latex is also supported, but I don't recommend using this package on\nsimple inline math, such as math symbols, SI units, etc. For that use case, you\nmay check cdlatex, which is more than enough to handle that. The setup of\ncdlatex is pretty straightforward, see\n\u003chttps://github.com/jkitchin/scimax/issues/117\u003e to get a general idea.\n\n### Entry Point\nTo get started, you may also want to check out\n[yasnippet](https://github.com/joaotavora/yasnippet) to fast insert a latex\nenvironment before you can use `org-edit-special` to enter the edit buffer.\n\nFor instance, try `M-x yas-new-snippet` and insert a snippet like this:\n```\n# -*- mode: snippet -*-\n# name: eqn\n# key: eqn\n# --\n\\begin{equation}\n  \\label{eq:1}\n  $0\n\\end{equation}\n```\nAfter you loaded the snippet, type `eqn` and press tab to insert the snippet.\nThen you can call `org-edit-special` to enter the edit buffer.\n\n### TeX Master\nBy default, `org-edit-latex` will generate a TeX-master file automatically. The\nmaster file is used for:\n\n- Completion in edit buffer via AucTeX\n- Preview in the edit buffer\n\nThe LaTeX preamble used by the master file is the same as\n[org-preview](http://orgmode.org/worg/org-tutorials/org-latex-preview.html)\nsettings. \n\nThe master file locates in the same directory as the org file does. You can\nupdate the master file via `org-edit-latex-update-master` after changing the\npreview settings.\n\nYou can use `org-edit-latex-preview-at-point` to preview in a edit buffer. By\ndefault, the keybinding of `preview-at-point` (AucTeX) is remapped to this\nfunction.\n\n#### Demo\n**w/o master:**\n![without master](./screenshots/without-master.gif)\n\n**with master:**\n![with master](./screenshots/with-master.gif)\n\n### Change Log\n- 0.8.0 Add support for TeX-master; provide preview function.\n- 0.7.0 Fix a few bugs regarding latex fragment/environment with name/caption/attrib.\n- 0.6.3 Fix inline math issue caused by a bug from org.\n- 0.6.2 src blocks will be untouched.\n- 0.6.1 Fix inline src block not recognized.\n- 0.6.0 Editing of inline latex (including non math latex fragments) is supported.\n...\n\n### TODO\n- [x] Mention cdlatex\n- [x] Mention yasnippet\n- [x] Add more demo gifs\n- [x] Add support for inline math.\n- [x] Turn this feature into a minor mode. (by purcell)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fet2010%2Forg-edit-latex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fet2010%2Forg-edit-latex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fet2010%2Forg-edit-latex/lists"}