Logical symbols and accessibility

@christina.hendricks to make some additional suggestions for SVGs

  • you can export Tikz diagrams to SVG using “real” LaTeX, cf. this guide
  • there are other human readable authoring tools for diagrams that might be easier to learn. For example, I like mermaid – there’s even a nice live editor to play around .
1 Like

If you haven’t come across these resources already, you may also want to check over the following:

Looking forward to seeing how your “Logic” book turns out! :+1:

2 Likes

Okay, let me think about what to do about the Graham theme. I don’t want to change the theme of all the books at this point (especially if this is a temporary issue), so whatever we do would just be for the Logic book. There is a bit of LaTeX/MathJax in the Philosophy of Mind book, but only a little bit in one chapter so I’m going to leave that one as is.

I could change the Crimson Text font in the Graham theme but am not sure what font would work as standard serif to avoid this issue. Other parts of the Graham theme use a sans-serif font (I think it’s Lato), which I could switch to but I don’t know if it would have the same issue.

Thanks so much for checking with the Pressbooks folks on this!

Thank you, Peter! I looked at Mermaid but it seems to be something that runs directly in the browser with a script one adds through html, yes? Honestly, I don’t know if I have that right…much of this is very new to me. At any rate, I couldn’t figure out how to create a diagram and save it as an svg to import into the book, and I think that’s not exactly what it does …?

Thank you, Christopher! I was not aware of these resources and am going to check them out now!

@christina.hendricks the live editor I linked to will provide you with a link to download the SVG (and also a PNG for good measure). So there’s no need to add another script (unless you want to :wink: )

I agree about sticking with the Graham theme for the time being. And by standard serif, I meant simply the default serif font that the browser supplies. I’ve confirmed with the Pressbooks team that altering the Web CSS Stylesheet like so will temporarily resolve the error without any adverse effects on the book:
.front-matter, .part, .chapter, .back-matter, body#tinymce.wp-editor {
font-family: serif; }

I’ll let you know when the permanent fix has been deployed by Pressbooks, so you can remove this manual addition to the web Custom Styles. Also, just a note in case you were looking into other themes: this bug also has been found to affect the Atwood and Baker themes.

Thanks also to everyone who is contributing to this discussion and sharing resources! :smiley: I’ve saved a whole bunch, and know I will be coming back to this thread for reference in future.

Thanks, @apurva, adding the above to the custom CSS is working just fine, so now the LaTeX output on Firefox on my Mac looks like the right size.

Another question! I noticed on the original document for one of the chapters that some of the logical symbols are both bold and italics, so I tried the following, which I found through a web search:

$latex \neg \textbf{\textit{A}}$

It resulted in:
Screen Shot 2020-01-17 at 10.23.10 PM

So it did the bold but not the italics. I also switched the order of the bold and italics commands, and also tried \emph instead of \textit, and the same issue–it would only do one of the styles but not both.

Is there something I’m doing wrong here?

I am certainly learning a lot, and really appreciate the help!

Oh, and @pkra, thank you so much for the info about the live editor with Mermaid. I will check that out!

1 Like

MathJax (currently) doesn’t parse text-mode macros (since it’s traditionally been focused on math mode). There’s a pending feature addition to do this but that’s probably not happening soon (especially not for MathJax v2).

If it’s just a single letter, then you can probably leave things in math-mode. For historic reasons (in both MathJax and TeX), bold italic is a not a default feature – you can use \boldsymbol{A} to get a bold-italic A (which is part of the amsmath TeX package which MathJax supports).

It’s possible to write a macro for bold-italic text but that probably has to be integrated on the Pressbook side.

1 Like

Thank you for the explanation, Peter. Some of the bold & italics text, if we use it, would need to be not just single letters but also letters with logical connectives like A \rightarrow B. I’m not sure it’s absolutely necessary to have the text in bold; it’s for headers for truth tables, and the header row is fairly clear even if it’s not bolded. Maybe that’s the easiest thing to do at this point. And not a big deal!

Wow, thanks for the clear explanation, Peter! :smiley:

Christina, if the truth table headers are pretty clear sans bolding, better to stick with that for now. Good luck with the rest of the formatting. Hopefully it’s smoother sailing from now on.