Skip to content

Quickly insert and change latex environments within math blocks in Obsidian.

License

Notifications You must be signed in to change notification settings

raineszm/obsidian-latex-environments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

obsidian-latex-environments

License: MIT

Quickly insert and change latex environments within math blocks in Obsidian.

The internals have been rewritten for version 0.3.0. See Version 0.3.0 rewrite below.

Installation

If you have Obsidian version 0.9.8 or greater:

  1. Open the options pane
  2. Go to Third-party plugins
  3. Ensure that safe-mode is off. (WARNING: Please verify for yourself the safety of any plugins before using them.)
  4. Click Browse next to Community Plugins
  5. Search for Latex Environments
  6. Click Install
  7. Go back to the Third-party plugins page and enable Latex Environments

To update simply go back to the Third-Party plugins page for Latex Environments and click Update.

Manual Installation

To manually install

  1. download the latest zipfrom the latest Github Release
  2. unzip the contents into the .plugins/obsidian-latex-environments subdirectory of your vault.
  3. reload obsidian
  4. go into settings > third party plugins and activate obsidian-latex-environments

For details see the forums.

Usage

Commands

This plugin currently provides 3 commands, which do not have default bindings. Both commands only work when the cursor is inside a math block. Both commands will also query for the name of the environment.

Insert Environment

Insert a new LaTeX environment at the cursor.

With a selection inserts a new LaTeX environment around the selection. 0.

Change Environment

Change the name of the surrounding LaTeX environment.

If the cursor is on a \begin or \end, it is the corresponding environment that will be changed.

Delete Environment

Remove the innermost LaTeX environment enclosing the cursor.

Version 0.3.0 Rewrite

In order to support the Live Preview feature of obsidian the internals of this plugin needed to be rewritten. The aim is to leave functionality unaffected but there may be some differences from previous versions. Please file a bug report if you discover something that worked with 0.2.0 but not 0.3.0

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT