Logic [ed: Benjamin Martin]

Awesome, thank you for confirming.

Let me know what you find! If others had any thoughts, please jump in and join the conversation. :slight_smile:

@apurva I have managed to make one of the diagrams for the Logic book so far, using Inkscape. I used the Media Library to add it to the book and I can view it through the URL. What I don’t know how to do is have it show up in the chapter itself. Adding it like a normal picture doesn’t seem to work, so there is probably some other way to do it that I don’t know. Thanks for any help you can provide!

Oh, and I also just saw this github issue with SVG in Pressbooks, which says that as of November 2019 there were some issues with exporting SVG to epub and mobi. Is that still a problem, and if so, what might be the best course of action?

Hmm, thanks for sharing a link to the GitHub issue about SVGs in Pressbooks. I’ll need to do a little more digging to confirm whether that is still active or has been resolved, and will get in touch with the Pressbooks team about the display issue with SVGs.

The easiest alternative/solution I can see to both right now would be switching to JPEG files instead. The main reason we went with SVGs was to ensure good quality of the diagrams in the printed format, but this can also be achieved with large dimension JPEG images.

Let me take a look and reach out to the Pressbooks team, and report back.

Hi Christina, after chatting with the Pressbooks team, it’s clear that we should be switching tack to a file type that is better supported in Pressbooks: JPG, JPEG, GIF or PNG. Right now, the SVG format is only supported in images rendered via the MathJax plugin. The Pressbooks team has noted our interest in working with SVG files and will take this into consideration for future development. For now, they recommend we go with one of four file types (JPG, JPEG, GIF or PNG) for static images, which are fully supported in the Pressbooks webbook and export formats.

Please let me know if you have any questions, and thanks for your patience as we inquired about this issue.

Thank you, @apurva–this is very helpful information! I will work on creating the diagrams in one of those file types. No worries…this is all new for many of us!

Yes, it’s been quite the learning experience! Thanks for working on converting the diagrams to one of those 4 file types. Let us know if you need a hand with anything.

@metatechne The book editor has recently uploaded a few more items to the “publishing copies” folder for the Logic book: the Acknowledgements (which I’ve added my part to), a short description of the book, and a list of bios for the authors and peer reviewers. Would you be able to take a look at those as well, for copy editing purposes?

@christina.hendricks you got it!

@christina.hendricks All set! Here’s a run-through.

  • Solutions, References, and Suggested Further Reading copyedited in Pressbooks.

One question: Do you want the section to be titled “Suggested Further Reading” (as it is) or simply “Further Reading”? The prior texts used the latter at the ends of chapters, but since this one is formatted differently anyway, I thought I’d ask.

  • Acknowledgments/Book Blurb and Bios are all edited in gdocs. A few comments for you there.

Once the above are imported into Pressbooks, I can do a final review of the whole text whenever you’re ready. I know you’re still working on the image swaps, so no rush of course.

1 Like

Thank you so much, Colleen! I’m a bit behind on things and will respond to the questions in the docs as soon as I can.

Good question about what to call that section. I think just “Further Reading” will work great. And I will let you know when all is ready in Pressbooks!

1 Like

@apurva I have an update on how I’m working on formatting the arguments with numbered premises and conclusion and a line in between. If you recall, there was a question around whether it would be very accessible having an ordered list for the premises (e.g., 1, 2, and 3) and then an <hr>, then a new ordered list starting at the next number. I asked around a bit on social media and a librarian suggested using CSS instead of the html <hr>, and he created some code for me to try that provides a line above the conclusion:

.therefore {
  width: 100%; /* this controls the width of the line item's written text, not the horizontal line separating the conclusion from the previous assertions */
}

.therefore:before {
  border-top: 1px grey solid; /* draws and styles horizontal line */
  width: 50%; /* you can change the horizontal line to be a different length than the line of text by setting whatever percent you'd like the horizontal line to be. 
  The measurement here refers to the textual line for its percentage measurement, not the whole block that contains the text. 
  So if you want it to be even with the text, put this as 100% and it'll match whatever width you have for the written text. */
  height: 1px;
  content: "";
  display: block;
  margin-top: 10px; /* distance from the horizontal line to the text line above it */
  padding-top: 10px; /* distance from the text line with this class to the horizontal line above it */
}

This is what I am trying, with several versions of line length above the conclusion. Here is what it looks like on the web version:

And the PDF I exported looks fine too. Can you foresee any possible issues with doing it this way?

1 Like

Thanks for the explanation, and please pass along my thanks to the librarian who helped! I don’t think we’ll run into any potential problems with this solution, at least when it comes to layout and formatting. I checked the web, PDF, and EPUB files, and all seem okay. I would double-check that there are no issues with accessibility when formatting the arguments this way — my initial checks on the PDF format (via Adobe’s accessibility tool) and the web version (using the WAVE online accessibility tool) seemed to pass for this layout. I did notice via these tools that the arguments in the Exercise textbox are still formatted using the underline function, so you may also want to switch these over with the CSS styles you’ve created.

The accessibility checks also flagged a few other things to fix:

  • In the webbook:
    • Add row and column headers to the table in the chapter
    • Adjust the table caption colour to improve the contrast (I’d suggest changing this to black via CSS, let me know if you need any help)
  • In the PDF:
    • Fix how footnotes are labelled or structured, as they are currently assumed to be a ‘list item’ and fail the List item label and List item Body tag tests (typically applied only to lists). I can follow up with Pressbooks about this and get back to you.

I appreciate you following-up about this. Hopefully we’re in the home stretch!

Thank you for following up and doing the checks!

I will try to figure out how to use CSS to change the table caption colours. As for the row and column headers, I thought I had created the tables in chapters 2, 3 and 5in a way that they would have column headers (and the one in chapter 2 has row headers too I think). Row headers are harder for truth tables because most rows would be “truth value” over and over. For example, in the truth table for material conditional, the first row might be called something like “statements” (I’ll have to check with the book editor on whether that’s an accurate label), and the rest of the rows would each have a header saying “truth value” repeated for each row:

My understanding from this W3 page on accessible tables (and linked pages) is that it might be okay to have a relatively simple table with just column headers and not row headers. I also included the scope for each header cell. Apparently something isn’t working if the headers aren’t showing up on checks?

Thank you for following up on the footnotes issue in PDFs. We had issues with footnotes in PDFs earlier where, if we checked the button to make them endnotes (in the PDF settings) then they broke the accessibility of the bookmarks in the PDF. So we made them “regular footnotes” instead. I hope that isn’t itself causing a different problem! :slight_smile:

Hmmm…having some issues with italics in latex and MathJax and wondering if @apurva or @pkra might help.

I need to render some formulas with some italics font and some letters in non-italics, such as:

(D2) N(q,p)≡(p→q)

Not sure if it shows up well here but the p’s and q’s should be in italics but the N should not. When I use the following in Latex I can’t seem to stop the N from being in italics:

(D2) $latex N(q, p) \equiv (p \rightarrow q)$

Also at issue is the following, where the x’s should be italics and the other letters not:

x is K x ≡ x is J x & x is T x & x is B x

But when I try to put it into latex the whole thing is italicized. For that one I could just use latex for the equivalence symbol and leave the rest alone, but that seems a bit strange and possibly inaccessible.

I think that what happens is all is italicized in LaTeX going through MathJax, which is usually okay but in this case I need to have some letters not italicized.

Any thoughts/advice are appreciated!

It depends a bit on the context but the short answer is probably \mathrm{...} (“math roman”). If it’s more of an operator, then you probably want \operatorname{} to get proper spacing (for multi-character strings and for subsequent parenthetical expressions).

In case it wasn’t mention elsewhere: math.stackexchange’s tutorial gathers a ton of community-maintained examples, i.e., the perfect cheat sheet.

1 Like

Thank you very much, @pkra! I will try these options. And I haven’t seen the tutorial before; I just took a quick look and it appears to be super helpful. Thanks!

Hope you’ve been able to test out some of the options and get a handle on the italics issues. Keep us posted!

Thanks for checking in! I ended up using \mathrm{...} and that worked great. For the formula above with “x is Kx” etc., I just ended up using basic text for most of it and LaTeX only for the logical symbol in the middle. It was getting really complicated to have the various italicized and non-italicized elements, plus getting the “&” to show up correctly with good spacing (I had to use \, every time I wanted a space before or after the symbol, for example). And I wasn’t sure that the accessibility would be better with having the whole thing in LaTeX vs just the symbol.

In other news, the diagrams are all done (the ones I created in Inkscape and exported as png…they all have alt text too). And I think everything else is pretty much ready to go on this book. I need to read it over again and then Colleen, our copy editor, offered to read it once more too. Then I need to send to Ben & the authors for their checks (I may have messed something up in the logical notation or exercise solutions here or there that they can catch). Then we’ll be good to go!

1 Like

Good to hear it! You’ve really gotten a good grasp of LaTeX now, from the sounds of how you’ve been handling the different formulae in the book. :smiley:

Great news about the diagrams!

As for the final reads — it sounds like that’s one of the last thing to do before we’re all set to publish, which is very exciting. If I recall, we may also need to reach out to reviewers about blurbs and get those into the book, and write up an announcement. Christina, please let @LeighKP know if you’d like to coordinate on the announcement. With all those in place, I think we should be set!

If there’s anything in particular you need from me at this final stage, please let me know.