-
Notifications
You must be signed in to change notification settings - Fork 1
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
Web UI handling of em and strong #217
Comments
So two separate options? One to leave out For books that don't have |
If we reconsider implementing emphasis in Liblouis instead of XSLT (nlbdev/pipeline-mod-nlb#20), the toggling could be easily implemented in CSS. It's also easily implemented in XSLT of course, but the less XSLT code the better I think. |
We'd be fine with using liblouis. Controlling it with CSS would be great. I think the issue was the ordering of the open- and close "tags" in braille. |
Ah yes, indeed, this can not be controlled at the moment. |
Two separate options, yes. And if we leave out em in a production, still treat strong as em. I don't know how much we will use the option, but then we can controle every situation without editing the source file (which can be quite a job). |
I need a name/description of the options (Norwegian). |
I have made the text formatting fully configurable in CSS. For now there is no option yet but it's very easy to add. The CSS now looks like this: /* -------------------------------------------------------------------------- */
/* Text formatting */
/* -------------------------------------------------------------------------- */
@text-transform strong {
system: -nlb-indicators;
open: "⠠⠄";
close: "⠠⠄";
}
@text-transform em {
system: -nlb-indicators;
open: "⠆";
close: "⠰";
}
@text-transform u {
system: -nlb-indicators;
open: "⠸";
close: "⠸";
}
@text-transform strike {
system: -nlb-indicators;
open: "⠐⠂";
close: "⠐⠂";
}
strong, b {
text-transform: strong;
:root:not(:has(em, i)) & {
text-transform: em;
}
}
em, i {
text-transform: em;
}
u {
text-transform: u;
}
strike, s {
text-transform: strike;
}
sub {
text-transform: -louis-emph-4;
}
sup {
text-transform: -louis-emph-5;
} As you can see there are now the text-transform values The When we are ready to handle emphasis in Liblouis, we only need a very small modification in the CSS, namely |
Name of options: Second option strong: Description: For both options (don't need to be numbered in GUI) there will be a cheked box as standard, and if you uncheck the box, the em (or strong) will be left out of the production. I think the right place to put these options is under "Tekstelementer". |
Updated the CSS to the following. Hope I got it right. @if ($include-strong) {
strong, b {
@if ($include-em) {
text-transform: strong;
:root:not(:has(em, i)) & {
text-transform: em;
}
} @else {
text-transform: em;
}
}
}
@if ($include-em) {
em, i {
text-transform: em;
}
} |
The option works, but the two are mixed up. When you choose to leave out em, strong is left out and vice versa. When you choose to leave out strong, em is left out. The braille representation for the highlighting is wrong in the test versjon of PIP (should be em: 23 before and 56 after and strong: 6-3 before and 6-3 after). This is correct in production-PIP. |
I would like an option that leave out strong i a production and an option that leave out em in production. E.g. under Tekstelementer. Nice to use in cooking books who always have a lot of em and strong that is only related to layout.
The text was updated successfully, but these errors were encountered: