![]() |
#1 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jul 2014
Location: Sundridge, ON, CA
Device: Nexus4
|
Some characters (* + - /) not displaying
I have a book about coding that puts the code examples in a different font (mono-spaced). The code examples show up fine - except the math operators are not visible. The dead-tree version of the book does not use a different colour for the symbols. I know the symbols are actually there because if I copy/paste out of Calibre the correct symbols are pasted. I used the book editor to view the html source - I can't find anything in the html that would cause the operators to display any differently.
Any ideas? Calibre 2.37.1 Windows 7 |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,884
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
As they say:
Show me the code: (for a bad paragraph or Div) show the portions CSS for that code Please use a spoiler tag if more than a dozen lines |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jul 2014
Location: Sundridge, ON, CA
Device: Nexus4
|
First let me say that none of this is my own - in case it sounded like it was a book I wrote.
The NoOperatorsScreen.png attached is a piece of a screenshot showing how it displays. The NoOperatorsLiveCSS.png is the LiveCSS view produced from the editor (I've also copied the CSS below the HTML). Here is the HTML for the paragraph Code:
<p class="pre">> 4 * 6 + 5<br class="calibre5"/><br class="calibre5"/>[1] 29<br class="calibre5"/><br class="calibre5"/>> (4 * 6) + 5<br class="calibre5"/><br class="calibre5"/>[1] 29<br class="calibre5"/><br class="calibre5"/>> 4 * (6 + 5)<br class="calibre5"/><br class="calibre5"/>[1] 44</p> Code:
<p class="pre">> 4 * 6 + 5<br class="calibre5"/> <br class="calibre5"/> [1] 29<br class="calibre5"/> <br class="calibre5"/> > (4 * 6) + 5<br class="calibre5"/> <br class="calibre5"/> [1] 29<br class="calibre5"/> <br class="calibre5"/> > 4 * (6 + 5)<br class="calibre5"/> <br class="calibre5"/> [1] 44</p> CSS for class="pre" Code:
.pre { display: block; font-family: "Courier New"; font-size: 0.75em; text-align: left; margin: 10pt 0 10pt 20pt } Code:
.calibre { display: block; font-size: 1em; padding-left: 0; padding-right: 0; margin: 0 5pt } Code:
.calibre5 { display: block } Last edited by JavaJim; 09-11-2015 at 08:42 AM. |
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,884
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I made 1 change (just for a fallback if the named font is unavailable, a good practice
![]() Where are you seeing colored/missing symbols? Your device? Code editors (like used in the editor) Encode Syntax of various parts for readability display ONLY The code is simple, basic HTML (no color calls) for the OUTPUT |
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jul 2014
Location: Sundridge, ON, CA
Device: Nexus4
|
I tried your fix - no go. I've also played with background and foreground colours, as well as different fonts. Still not displaying.
(Your file displays though.) This is occurring in Calibre reader, on Windows 7, laptop. Nothing exotic. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,884
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I don't think there is any differences between Calibres for various Windows versions
I suspect you have a ebook-viewer configuration override in place Use the Restore Defaults button at the bottom of the viewer config screen ![]() Could the monospaced font on your system be damaged (modified)? |
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jul 2014
Location: Sundridge, ON, CA
Device: Nexus4
|
BINGO!
Haven't investigated yet to see if the "Courier New" font is damaged, but forcing a different mono-spaced font (via the stylesheet) shows the characters. Thanks for your help. Jim |
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jul 2014
Location: Sundridge, ON, CA
Device: Nexus4
|
Previously I was making changes in the reader settings (to try a new font, etc.) but didn't realize a stylesheet was overriding it. (I've learned a lot about what an epub is over the last couple of days).
Thanks again, Jim |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Displaying Chinese characters | John123 | Workshop | 11 | 05-05-2015 09:50 AM |
Displaying Chinese? Characters | Rand Brittain | ePub | 8 | 04-05-2014 01:51 PM |
Displaying french characters on Japanese Kindle PW | Tekeur | Amazon Kindle | 6 | 05-04-2013 10:12 AM |
KoboTouch displaying boxes instead of cyrillic characters | mewakitty | Kobo Reader | 8 | 07-29-2012 07:05 AM |
CE characters not displaying | citac | Sigil | 18 | 10-08-2010 08:07 AM |