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

Feature Request: Support for ruby text (furigana) with markdown syntax #619

Closed
Morgawr opened this issue May 15, 2021 · 4 comments
Closed
Labels
enhancement New feature or request

Comments

@Morgawr
Copy link
Contributor

Morgawr commented May 15, 2021

So, I admit I am not very familiar with markdown or what kind of markdown engine neuron uses/supports, however I maintain a neuron site that deals with a lot of Japanese text and I'd love to get a way to add furigana readings (see something like this as an example of what I mean if you aren't familiar with it).

Is there a simple way to do this?

It might be possible to maybe add some special CSS rules or something (I'm not good with CSS) to the head.html file, but I'd like to avoid that if possible, does anyone know? Any ideas?

@srid
Copy link
Owner

srid commented May 15, 2021

With #363 - it can be done using a pandoc filter, eg: https://github.com/konn/pandoc-japanese-filters/blob/master/Spec.md

You can use raw html in your Markdown; failing that, perhaps some JS that replaces the DOM like https://github.com/samwalls/neuron-citation does ....

@srid
Copy link
Owner

srid commented May 15, 2021

what kind of markdown engine

It uses commonmark-hs to parse, and produces a Pandoc AST.

parseMarkdown extraSpec fn s = do

@Morgawr
Copy link
Contributor Author

Morgawr commented May 15, 2021

Oh this is interesting, it might be worth looking more into it.

At the moment I have found a solution just using direct HTML with <ruby>Word<rt>furigana</rt></ruby> tags which appear like this: Wordfurigana.

I guess this fits my needs for the time being, so we can probably close this feature request? Unless there is actual interest to implement something more ad-hoc/user-friendly down the line.

@srid
Copy link
Owner

srid commented May 15, 2021

Yea, let's close this because a more general feature can be done as #363

@srid srid closed this as completed May 15, 2021
@srid srid added the enhancement New feature or request label May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants