0

In the adoc file I define a chapter header like:

== [big-number]#2064# Das Spiele-Labor

For HTML that translates to

<span class="big-number">2064</span>

For the epub-Version, converted with asciidoctor-epub, apparently the class is omitted. The code line in the converter.rb:

<h1 class="chapter-title">#{title_upper}#{subtitle ? %[ <small class="subtitle">#{subtitle_formatted_upper}</small>] : nil}</h1>

(/var/lib/gems/1.9.1/gems/asciidoctor-epub3-1.5.0.alpha.7.dev/lib/asciidoctor-epub3/converter.rb)

How can I get the class information over to the chapter-title to format the first number in a special way?

Or is there another way to solve this? (The first number of the chapter title should be large and CSS hasn't got a 'first-word' attribute)

lifeisfoo
  • 15,478
  • 6
  • 74
  • 115
Michael
  • 6,823
  • 11
  • 54
  • 84
  • If you just want the number, there is a `:first-letter` selector in CSS. Alternatively you can wrap the first word in a span or include it via a `::before` pseudo-element. – TylerH Oct 07 '16 at 15:49
  • It's not a digit, it's a four digit number. That would need a :first-word selector. For the ::before element I think I would have to change the code of the epub generator, and that's not what I want to do first ;-) – Michael Oct 07 '16 at 17:52

0 Answers0