Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 5f946fc
Author: RyotaUshio <[email protected]>
Date:   Tue Nov 28 15:40:13 2023 +0900

    Update readme

commit 1476dd6
Author: RyotaUshio <[email protected]>
Date:   Tue Nov 28 15:38:39 2023 +0900

    Update readme

commit 276b009
Author: RyotaUshio <[email protected]>
Date:   Tue Nov 28 15:33:41 2023 +0900

    Update readme
  • Loading branch information
RyotaUshio committed Nov 28, 2023
1 parent 787f1f1 commit 8cb8344
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 6 deletions.
65 changes: 59 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,61 @@
# Obsidian Sample Plugin
# Better Math in Callouts/Blockquotes

This is a modified version of https://github.com/obsidianmd/obsidian-sample-plugin.
This is an [Obsidian.md](https://obsidian.md) plugin to add a better support for math rendering inside callouts/blockquotes to Live Preview.

- `*.ts` files are put in the `src` directory
- The plugin class definition and settings-related code are separated into `main.ts` and `settings.ts`
- Release GitHub action is already there
- Don't forget to go to `Settings > Actions > General > Workflow permissions` and turn on `Read and write permissions`
> Note: The features of this plugin are originally a part of [Math Booster](https://ryotaushio.github.io/obsidian-math-booster/), another community plugin of mine. Once this plugin is approved by the Obsidian team, they will be removed from Math Booster.
## Features

### Math in Callouts

In Live Preview, the vanilla Obsidian does not render MathJax in callouts while editing them.
This plugin solves this problem.

Moreover, it also enables proper handling of multi-line math blocks; see [the next section](math-in-lockquotes) below.

This feature can be toggled in the plugin setting tab.

#### Example

Without this plugin | With this plugin
:-----------------------------------:|:----------------------------------:
![Before](fig/callout-before.png) | ![After](fig/callout-after.png)

### Math in Blockquotes

In Live Preview, the vanilla Obsidian misunderstands a ">" symbol at the beginning of a line in a blockquote or a callout as an inequality sign ("greater than") in multi-line math blocks, while Reading View properly recognizes them. This plugin makes them consistent with Reading View.

This feature also can be toggled in the plugin setting tab.

#### Example

```
> $$
> \begin{align}
> a &= b \\
> &= c
> \end{align}
> $$
```

Without this plugin | With this plugin
:-----------------------------------:|:----------------------------------:
![Before](fig/blockquote-before.png) | ![After](fig/blockquote-after.png)

## Installation

Since this plugin is still in beta, it's not on the community plugin browser yet.

But you can install the latest beta release using [BRAT](https://github.com/TfTHacker/obsidian42-brat):

1. Install BRAT and enable it.
2. Go to `Options`. In the `Beta Plugin List` section, click on the `Add Beta plugin` button.
3. Copy and paste `RyotaUshio/obsidian-math-in-callout` in the pop-up prompt and click on **Add Plugin**.
4. _(Optional but highly recommended)_ Turn on `Auto-update plugins at startup` at the top of the page.
5. Go to `Community plugins > Installed plugins`. You will find “Better Math in Callouts/Blockquotes” in the list. Click on the toggle button to enable it.

## Support development

If you find this plugin useful, please support my work by buying me a coffee!

<a href="https://www.buymeacoffee.com/ryotaushio" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
Binary file added fig/blockquote-after.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fig/blockquote-before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fig/callout-after.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fig/callout-before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8cb8344

Please sign in to comment.