Ethics [ed: George Matthews]

No worries Allison! There were just a couple of small things to input so I went ahead and did it. We are almost ready to publish. Thank you so much for you help!

@christina.hendricks — I’ve heard back from the Pressbooks team, and it appears that it’s the entire image and caption itself that doesn’t follow the constraints of the textbox in a number of formats. The team is looking into implementing a permanent solution but have offered us a temporary fix. For now, they’ve suggested we add some padding to the bottom of the problematic textboxes. Alternatively, they noted that we could add non-breaking spaces after the text in the textbox, but I decided against this option as it would introduce unnecessary whitespaces in the webbook.

What I’ve done is create a custom class for the textbox, and modify the CSS for the PDF and ebook outputs. This class has the same styling as the Examples textbox, with the only change being some added space at the bottom to fit the full caption text. You can see my additions in the Custom Styles menu in the dashboard (PDF and ebook stylesheets), and on the textbox, in the Text Editor of Chapter 2. The custom class will also be easy to remove and delete once a permanent fix has been deployed by the Pressbooks team.

Please take a look at a new PDF and ebook export, and let me know if everything looks good!

Looks great–thank you, @apurva Apurva!

One other thing that came to mind while I was looking at the print PDF…there are lots of hyperlinks in various parts of the text (not so much in the chapters, but in frontmatter and backmatter) that of course don’t show up in the print version. There are nicely URLs listed for the google forms that aren’t in the print PDF (the adoption form, e.g.), but for other things there is just plain text where there should be a hyperlink (e.g., the accessibility assessment page has a hyperlink to an accessibility suggestions form, but in the print text it will say to use that form but won’t give people any way to find it.

I realize this is also true for the already-published Philosophy of Mind book too!

I’m wondering what best practice is for things like this. For accessibility one doesn’t want to list out all the urls in the digital versions because hyperlinks are better. How have other books addressed this sort of issue?

Thanks for your thoughts!

No worries. Credit to the Pressbooks team for their support on this issue. :slight_smile:

As for the hyperlinks in the print PDF, I know that on the Media Innovation and Entrepreneurship text (MIE), the team had created a footnote for each hyperlink that contained the full URL. This footnote was displayed in the print version so that readers could see text that was linked and access these links if they wished. I’m not sure whether we can employ the same method here, given that we’re already using footnotes minimally for in-text citations and since this would list out the full URL in digital formats as well (which you have noted is not good practice for accessibility). @liz, did you look at other options for the MIE text before landing on the one I described? @allisonbrown, do you know of any best practices for dealing with this question or examples from other SUNY projects that you could share?

1 Like

Hi Apurva,
I don’t know of any way around what we did at the time. One other option I can think of might be to make bit.lys for everything? I’ll note that in our case the URL was not a replacement for the hyperlink. The hyperlinks are still included in the text body. However, I am pretty sure we did the URL footnotes as “endnotes” for each chapter (which might be used modularly) as opposed to on each page, which might be more distracting / interruptive.

1 Like

Hi, Christina!

@allisonbrown brought your post to my attention; I make all of the print-ready and accessible PDFs for SUNY OER Services and have run into this issue in the past. Allison found a really handy CSS trick that will automatically reveal all hyperlinks in a PDF to the right of the word in parentheses.

Here is the code:

a::after {
  content: " (" attr(href) ")";
}

This code can be added to whatever stylesheet you use to create your PDF; if you use Pressbooks you’d just plop it right into their Custom Styles page.

Here’s an example of how this looks on one of our PDF pages:


I hope this option might work for you!

3 Likes

Thanks Liz, Amanda, and Allison! These are some helpful options. I like the simplicity of adding the URL text after the hyperlinked word in the PDF option, and how it doesn’t affect the web or ebook formats.

@christina.hendricks — let me know how you’d like to move forward, and if you needed any assistance with adding the CSS code if you decided to go with this route.

Thank you to everyone here! @liz @wentworth @allisonbrown @apurva!

I like the idea of adding the CSS to the print PDF custom styles. I will try that and see what it looks like. I think there might need to be some combination of that plus a link shortener for some of the links, though (e.g., if there are links to google docs they are horrible to try to type by hand!).

I am deep in working on other things for the series at the moment and will get to this as soon as I can. Thanks again!

Let us know how you get on, and if you need anything else. :slight_smile:

I’ll be posting the release announcement as a guest blog post on the Rebus blog today. The next Rebus Community newsletter goes out this Wednesday, I’ll share the announcement there and on twitter.

The other thing I’d ask you to do, @christina.hendricks, would be to post about the book in the New Releases category. It’s a good record. The post can be super short if you’d like, and you can link to the announcement from there. I’ll share the link shortly

2 Likes

Release Announcement blog post: https://rebus.foundation/2019/12/09/book-release-introduction-to-philosophy-ethics-ed-george-matthews/

1 Like

Wonderful! Posting in the new releases thread now.

1 Like

Thanks, Christina! Happy to note that I’ve submitted the resource to the Open Textbook Library, B.C. Open Textbook Collection, OER Commons, and MERLOT. :slight_smile: You should see both the Ethics and Mind books in these collections when searching for philosophy resources!

1 Like

Hi @apurva, I know you’re on vacation right now but I have a question and I want to put it out here before I forget.

I’m working on putting the CSS into custom styles to get the URL in parentheses after hyperlinks for PDFs. But I’d really rather it only put in the URLs for print PDFs, not digital ones. If we have hyperlinks plus the URLs in parentheses in digital PDFs, then that means screen readers will go through the URLs in the digital PDFs as well as find the hyperlinks. Which causes a new issue!

Is there a way to have the custom CSS only apply to print PDF exports?

Alternatively, we could go the route of putting URLs in footnotes, but right now we are using footnotes rather than endnotes because of an accessibility issue in PDF exports with endnotes. Thus, all URLs would be in footnotes at the bottom of each page where there are URLs, which is okay but maybe not ideal.

Seems when we fix one issue we create another! :slight_smile: Complicated, but interesting and important stuff!

Hi Christina, apologies for the late response.

You could add a .print before the CSS rule in the PDF Custom Styles sheet. Looking at the existing rules in the stylesheet, this ought to do the trick. Let me know how this goes, and if needed, I can look into this further.

There are possible alternatives, as you’ve noted, but let’s start with giving the above solution a try first and seeing how we go.

Couldn’t have said it better myself! :smiley:

Excellent, that worked! Thanks @apurva. Now it turns out I need to eliminate the hyperlinks in the references and footnotes where I’ve added hyperlinks to URLs, because what happens is something like this:

Kirk, Chris, Charanya Krishnaswami, Katie Mesner-Hage, Skye Nickalls. 2013. “Reproductive Rights Around the World.” Slate. May 30. http://www.slate.com/articles/news_and_politics/ map_of_the_week/2013/05/abortion_and_birth_control_a_global_map.html (http://www.slate.com/articles/news_and_politics/map_of_the_week/2013/05/ abortion_and_birth_control_a_global_map.html)

Annoying! I’ll go through and delete the hyperlinks from the references lists so this doesn’t happen. And I’ll add this to the growing doc of how to input and format the books into Pressbooks!

Hmmm…now that I think about this more, I have a conundrum.

  1. If I leave the hyperlinks in references like the example above then on print PDFs the link text gets printed twice, which is not ideal.

  2. But if I don’t have hyperlinks in the references, then this isn’t so great from an accessibility perspective. If I do have hyperlinks there, then I can add aria labels (as per this suggestion on the Rebus Forum) and screen readers won’t read out the annoying URL text. If I don’t have hyperlinks, screen readers will read out the annoying URL text.

Gonna have to give this one more thought. Any ideas/suggestions @apurva? In the meantime, I’ve already gone ahead and removed all the hyperlinks in the references in the Ethics and Philosophy of Mind books (there was only one in the latter). It’s not a problem to go back and add them back in with aria labels if that seems the best way to go.

Hmm, that’s not ideal! I’ve come up with a solution that would work, though it does require a bit more manual work than I might have liked.

We can simply add a class in the <a> tag to the links in the References and Further readings list, like so:
<p class="hanging-indent">Bourget, David and David J. Chalmers. 2014. “What Do Philosophers Believe?” <em>Philosophical Studies</em> 170(3): 465-500. <a class="reference" href="https://philpapers.org/rec/BOUWDP">https://philpapers.org/rec/BOUWDP</a></p>

This class will need to be added to any URL that you don’t want repeated/displayed twice in the print PDF. Once you’ve done so for each of the desired URLs, you can adapt the CSS rule you have previously entered which forced the display the full url of hyperlinks in the print PDF. Edit the rule as follows:

.print a:not(.reference)::after {
      content: " (" attr(href) ")";   }

And to ensure that the URLs in the print PDF are not clickable, I would suggest adding a rule like so:

.print a, .reference {
  prince-link: none;
  text-decoration: none;
  color: black;
}

This final rule simply specifies that the URLs/hyperlinks in the print PDF will not be clickable. It does not affect the digital PDF, where any internal or external hyperlinks or URLs will be active. For those using the print PDF on their devices, they can enable the Adobe function to ‘make URLs active.’ (Note: this function may need to be disabled on your end to test that the rules above are working as expected). This rule is also helpful as it preserves the URLs and hyperlinks as active in all the digital formats, including web, though from my understanding of Baldur’s explanation in the Rebus Forum, aria-labels for hyperlinks in the bibliographies/readings sections might still be helpful.

Please let me know if any of this is unclear, or if it doesn’t work out when applied to the books.

Lastly, while I was testing these solutions in the Ethics book, I noticed some instances of code in the Text editor that could be removed, mainly the import-Normal class. You can go ahead and delete this class from the text editor, along with any spare div tags, stray span tags in chapters.

Also: this is a fantastic resource! Thanks for putting it together, and slowly adding to it as we learn more things whilst formatting these books. :smiley:

Fantastic–can’t wait to give this a try! I will let you know how it goes.

And the stray codes…I don’t know how those things get in there but I can clean them up in both of the published books, as well as the Logic book. That may take a little longer for me to get around to, though!