Skip to content

Conversation

@dominikun
Copy link
Contributor

I configured furigana-markdown-it such that it is usable in vitepress. The syntax would be [kanji]{furigana}, e.g. [今何時ですか]{いま なん じ ですか}?. The plugin is also kind of smart and can match whole sentences, but then only applies the furigana to the kanji and skips the rest. Its documentation gives an overview on its possible usage.

I applied it to chapter one as an example. If it is acceptable, I can work on other chapters as well.

I'm not sure about the readability, though.

@Kellenok
Copy link
Owner

Kellenok commented Feb 2, 2025

image

we have bold selections in the sentences, so i don't think that it's a good think for us

image

can you show me a screenshot of what it would look like?

@dominikun
Copy link
Contributor Author

I made a screenshot with the updated CSS, which fixes the furigana inside <code> tags.
2025-02-02_18-40

Formatting markers like ** around the whole furigana construct, e.g. **[漢字]{かん じ}** seem to render as expected:
2025-02-02_18-51

But <code>[漢字]{かん じ}</code> should be used instead of backticks, `[漢字]{かん じ}`, otherwise the furigana syntax would be escaped. But this is the case with any formatting inside backticks, as it is seen in chapter 11 regarding the asterisks:
2025-02-02_19-06

Formatting markers inside the furigana construct are not working. But it should always be possible to put the formatting outside.

@dominikun
Copy link
Contributor Author

In your example bold formatting is inside <code> tags. You are right in this case, but I still managed to render the expected result, by using <b>foo</b> instead of **foo** inside the code tags.
2025-02-02_19-31
In the code it looks like this:

**But fundamentally they're nouns.** So it's always a good guess when you don't know what a word is, that it's quite likely to be a noun. <code>空っぽ</code> is a noun, <code>empty</code>.
<code>でも, びんは<b>[]{から}っぽ</b>だった</code> – <code>However, the jar was **empty**</code>.
<code>アリスは空っぽのびんでも下へ落としては悪いと思った.</code>
Here again, we're going to see some other uses of the て-form.

## でも / ても

@Kellenok
Copy link
Owner

Kellenok commented Feb 2, 2025

looks good. but again i'll have to batch change the formatting from markdown to html tags. the last time when i did this i had to manually search for tag errors in 50 files, otherwise vitepress wouldn't render them

i'll try it later

@dominikun
Copy link
Contributor Author

It's a manual process to add the furigana anyways. I wouldn't change tags unless really necessary.

At the moment we only have two cases:

  • ` to <code> when furigana is added.
  • ** to <b> when the kanji with furigana is bold, but only inside <code> tags.

I could work on a branch, until all chapters are done. This way the website won't be in a work-in-progress state.

@dominikun
Copy link
Contributor Author

So I converted chapters 1-3. It's not too bad using vim. If you like the changes I can further format the text as I read through the script.

@dominikun dominikun force-pushed the furigana-proposal branch 2 times, most recently from 1a8e389 to ab0768f Compare February 2, 2025 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants