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

Option to change the encoding of furigana #1195

Closed
ElaineGilstrom opened this issue Jul 10, 2024 · 7 comments
Closed

Option to change the encoding of furigana #1195

ElaineGilstrom opened this issue Jul 10, 2024 · 7 comments
Labels
area/anki The issue or PR is related to Anki integration kind/enhancement The issue or PR is a new feature or request

Comments

@ElaineGilstrom
Copy link

I've been noticing that it can be quite difficult to add additional formatting (like text color or bold) on top of fields with furigana formatted using the html/ruby tags compared furigana encoded using braces, so I would like to suggest adding an option to change how yomitan does the encoding in options.

Examples of what I mean are these:

html tag formatting:
image

brace formatting:
image

what I'm doing with it is adding color to represent pitch accent:
image

If this already exists as an option, please let me know. If it doesn't, I can work on adding it in August. I'm not very familiar with node so it might end up taking a bit though.

@ElaineGilstrom ElaineGilstrom added the kind/enhancement The issue or PR is a new feature or request label Jul 10, 2024
@ElaineGilstrom
Copy link
Author

now that I think about it, having auto pitch accent coloring would be awesome too. No idea how much of a pain that would be to implement, but I might look into it.

@Kuuuube
Copy link
Member

Kuuuube commented Jul 11, 2024

Is there any reason you cant use css selectors for this? You should be able to select the rt tag in the ruby text.

@Kuuuube Kuuuube added the area/anki The issue or PR is related to Anki integration label Jul 11, 2024
@ElaineGilstrom
Copy link
Author

ElaineGilstrom commented Jul 11, 2024

That would target all of the furigana, which isn't what I'm after. Each word has its own pitch accent and so needs to have the color that I associate with that pitch accent.

Here is an example of the intended effect in the card itself:
image

in this example, the words in red have the atamadaka pitch accent, blue is heiban and pink/magenta is nakadaka

@Kuuuube
Copy link
Member

Kuuuube commented Jul 11, 2024

Are you manually editing the colors? Not sure how this is harder with html as opposed to brackets. It seems like you would be making the exact same additions.

@ElaineGilstrom
Copy link
Author

I am manually editing the colors, but I am using a plugin to set the color with a hotkey. Because of that, it is significantly less work with the brace encoding as I don't have to make sure the font tags surround the entire span tag, as I do with the html encoded furigana (the plugin also doesn't function in the html editor for the fields)

@emanuelps2708
Copy link

Hi @ElaineGilstrom I think something easier for you so you don't have to edit the card manually is to install AJT Japanese, it adds furigana in the format that you want and can add color depending the pitch accent of words. For more info https://tatsumoto.neocities.org/blog/anki-japanese-support#color-coding

@Kuuuube
Copy link
Member

Kuuuube commented Nov 25, 2024

Closing in favor of #1596 being much clearer in intent

@Kuuuube Kuuuube closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/anki The issue or PR is related to Anki integration kind/enhancement The issue or PR is a new feature or request
Projects
None yet
Development

No branches or pull requests

3 participants