Open zorkow opened 1 year ago
I note that I can't choose reviewers. So here's an explicit ping: @rbeezer @davidfarmer @davidaustinm
Very nice, @zorkow! We need some PreTeXt markup for this. Without HTML-centric data-*
etc.
I see an SVG image. Good, we already do that. In fact, we prefer that.
We need a PDF for LaTeX. I'll try a manual conversion in Inkscape, that would be a good start.
Annotations. Silly question - can they be embedded in the SVG somehow? A super-SVG? If not, what is cml
short for? We could have an attribute for that, and it could be a signal that the image should be handled differently. Could we assume that foo.svg
would always be paired with foo.xml
?
In any event, I should be able to make quick progress with what is here, and we can streamline workflow as you and @davidaustinm get further along.
Knowls: this is @davidfarmer's baby. Also, @bnmnetp has a lot of hard-won experience, especially with MathJax. Tuesday drop-in is at Noon Pacific if you want to pop in.
PS: paper looks great!
From Drop-In discussion:
latex-image
we will know that it is different from other images.image
element with some extra attribute indicating it is different.@rbeezer you mentioned a way to add a link to the keyboard commands for the diagrams. Can you point me to the relevant code, so I can add them?
That will be a one-off deal, and a first! So I'm not sure.
Put commands here, and I may work on this in the AM.
Put commands here, and I may work on this in the AM.
Found commands at CDN, will work on integrating.
OK, getting close on doing this PreTeXt-style. Have "experimental" markup, and have hooked this into the usual processing.
Knowls are a bigger problem, and am not dancing around that right now.
We have to get JS from a CDN. We don't expect authors to put certain files in certain places. ;-)
Using network.*
as experiment. So, I put the following into the HEAD:
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/diagcess@1.1.1/dist/diagcess.js" defer=""></script>
<script type="text/javascript" defer="">
document.addEventListener("DOMContentLoaded", function() {
diagcess.Base.init();
});
</script>
Console shows:
Molecule Structure initialisation failed with: Loading of components failed. diagcess.js:1:38592
d https://cdn.jsdelivr.net/npm/diagcess@1.1.1/dist/diagcess.js:1
Failed to initialize element ChemAccess-element0 diagcess.js:1:37305
d https://cdn.jsdelivr.net/npm/diagcess@1.1.1/dist/diagcess.js:1
Beta here, Subsection 9.1: https://pretextbook.org/beta/diagcess/graphics.html
Holler if it goes missing, I am experimenting with rsync
at that site. I'll be at Drop-In this afternoon.
Keyboard Control Knowl constructed. We can adjust styling (it needs it!).
Wonky ToC and Header is just the screenshot tool messing around.
An Inkscape conversion of network.svg
to PDF lost all the labels. I didn't try very hard. But maybe labels are non-standard in some way?
In the plus column, the rsvg-convert
did just fine, which @alexeikolesnikov will find comforting. ;-)
We've had good luck embedding braille fonts in SVG, converting to PDF with rsvg-convert, and embossing. Automating that process is the next thing on my to-do list.
On Fri, Mar 10, 2023 at 10:14 PM Rob Beezer @.***> wrote:
An Inkscape conversion of network.svg to PDF lost all the labels. I didn't try very hard. But maybe labels are non-standard in some way?
In the plus column, the rsvg-convert did just fine, which @alexeikolesnikov https://github.com/alexeikolesnikov will find comforting. ;-)
— Reply to this email directly, view it on GitHub https://github.com/PreTeXtBook/pretext/pull/1944#issuecomment-1464808273, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTLXTGYJLULFGGEURCQQX3W3PUZDANCNFSM6AAAAAAVRW2MCE . You are receiving this because you were mentioned.Message ID: @.***>
Here's a page with the instructions https://progressiveaccess.com/physics/instructions/
I can also send you the markdown for the page.
You can navigate through the diagrams with various keys. Reading the diagram is possible on every platform and browser. Below is a list of keys that you can use for navigation, some more detailed instructions on how to navigate inside a diagram, and some tips on working with some selected screen readers.
Key | Effect |
---|---|
Enter, Left-Click, or A | Activate keyboard driven exploration |
B | Activate menu driven exploration |
Escape | Leave exploration mode |
Key | Result |
---|---|
Cursor down | Explore next lower level |
Cursor up | Explore next upper level |
Cursor right | Explore next element on level |
Cursor left | Explore previous element on level |
Key | Result |
---|---|
D | Explore next lower level |
E | Explore next upper level |
F | Explore next element on level |
S | Explore previous element on level |
Key | Result |
---|---|
N | No magnification |
M | Step magnification |
Comma | Direct magnification |
Key | Result |
---|---|
X | Toggle expert mode |
L | Next language (if available) |
Z | Toggle subtitles |
V | Toggle screenread style subtitle |
C | Next high contrast color |
T | Toggle monochrome display |
Key | Result |
---|---|
K | Kill sound |
O | Start sonification (if available) |
P | Repeat sonification |
Y | Stop self-voicing (if available) |
U | Repeat last utterance |
Space | Repeat last sound |
If you focusing a diagram you screen reader should announce ‘Navigatable Diagram’ or ‘Navigatable Molecule’. Press ‘Return’ or ‘A’ to start navigation. This will present the name or caption of the diagram or a simple top-level description.
Here are some tips on what you might need to do to make it easier to work with the accessible diagrams with your particular screen reader or platform.
Voice-over on Mac OS
Do you work with voice-over on the Mac? Before you start using the website, you must do a number of things:
Windows with Jaws
If you work with Jaws, navigate to the diagram with Jaws and press space and then A to enter navigation mode. To exit navigation mode, press the plus on the numeric keypad twice.
Windows with NVDA
With NVDA you can enter the diagram by focusing on it pressing Tab. Then press A to enter navigation mode. To exit navigation mode, press ctrl + NVDA + space.
Oops, I seem to be late to the party. I did not see the whole thread. I am sitting in the Santa Cruz with power and Internet outages...
Keyboard Control Knowl constructed. We can adjust styling (it needs it!).
That looks great!
OK, getting close on doing this PreTeXt-style. Have "experimental" markup, and have hooked this into the usual processing.
- Knowls are a bigger problem, and am not dancing around that right now.
- We have to get JS from a CDN. We don't expect authors to put certain files in certain places. ;-)
Using
network.*
as experiment. So, I put the following into the HEAD:<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/diagcess@1.1.1/dist/diagcess.js" defer=""></script> <script type="text/javascript" defer=""> document.addEventListener("DOMContentLoaded", function() { diagcess.Base.init(); }); </script>
The latest released version of diagcess is 1.1.4
. That should get around most of the errors you see.
But it won't work with the knowls.
We need to make a release from the latest version. But since this is part of our production environment we first need to test it thoroughly. I can spend some time on this Monday, when the hopefully the storm here is over.
Thanks, @zorkow, for the updates. Thanks for working through this during the power cuts. And your battery charger dilemma.
The latest released version of diagcess is 1.1.4. That should get around most of the errors you see.
Ok, good. I'll wait on that.
But it won't work with the knowls.
This is a bigger problem that we should stop trying to fix with Band-Aids. So it can wait, I'd say.
The latest released version of diagcess is 1.1.4. That should get around most of the errors you see.
Ok, good. I'll wait on that.
Just to clarify: The 1.1.4
version is already out there and works with diagrams not in knowls.
The upcoming 1.2.0
version will work with knowls as well.
This PR introduces the possibility of integrating interactive SVG diagrams into Pretext's HTML output. The basic idea is specify diagrams via their SVG image and XML annotation files
They are then translated into elements that can be picked up by the diagcess library of the form:
In addition, if images of this nature exist in a page (or knowl), the
diagcess.js
library is loaded and initialised, which replaces the above tag with interactive diagrams.Note, that at the moment it is expected that the
diagcess.js
file is in the same directory. This is due to the fact that I had to make some changes to the library, mainly to get the knowls workingfrom the npm CDN.
There are still some other issues we might need to discuss:
I might also have misunderstood some of the xsl code.
Anyway, for the time being, I've put a temporary version of our W4A paper here: https://githubraw.com/zorkow/pretext/w4a2023/w4a2023/ In particular, interactive diagrams are on this page: https://githubraw.com/zorkow/pretext/w4a2023/w4a2023/sec_intro.html