![]() |
#1 |
Enthusiast
![]() Posts: 29
Karma: 10
Join Date: Mar 2017
Device: Kindle Voyage
|
calibre_generated_inline_toc
|
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
just add the font-family: "xyz, serif"; to the style= list
I always consider these kinds of hacks, to be fragile. They probably will NOT get updated correctly if the TOC is regenerated automatically. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Enthusiast
![]() Posts: 29
Karma: 10
Join Date: Mar 2017
Device: Kindle Voyage
|
Quote:
<?xml version='1.0' encoding='utf-8'?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Content</title> <style type="text/css"> li { list-style-type: none } a { text-decoration: none } a:hover { color: red } </style> </head> <body id="calibre_generated_inline_toc"> <h2 style="text-align: center; font-family: Gabriel Weiss' Friends Font, sans-serif;">Content</h2> indicates this error: Parsing failed: attributes construct error, line 14, column 73 [contents.xhtml:14] What's the correct syntax? |
|
![]() |
![]() |
![]() |
#4 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,220
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
added code tags
Using a font name with spaces in a inline style requires wrapping the name in 's. The single ' in the font name also needs to be wrapped in 's.
In a stylesheet, you would use " but an inline style mandates the '. Code:
<h2 style="text-align: center; font-family: 'Gabriel Weiss''' Friends Font', sans-serif;">Content</h2> Code:
<h2>Content</h2> <h2 style="text-align: center; font-size: 2.5em; font-family: 'Gabriel Weiss''' Friends Font', sans-serif;">Content</h2> h2 { text-align: center; font-size: 4em; font-family: "Gabriel Weiss' Friends Font", sans-serif; } Last edited by DNSB; 12-31-2024 at 03:36 PM. |
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() Posts: 29
Karma: 10
Join Date: Mar 2017
Device: Kindle Voyage
|
Thanks for help!
Finally I got help from AI, here is the solution: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"/> <title>Content</title> <link rel="stylesheet" type="text/css" href="stylesheet.css"/> <style> li { list-style-type: none; } a { text-decoration: none; } a:hover { color: red; } </style> </head> <body id="calibre_generated_inline_toc"> <h2 style="text-align: center" class="calibre11">Content</h2> </body> </html> Where calibre11 is h2 style. |
![]() |
![]() |
Advert | |
|