gregturn / asciidoctor-packt

Backend and theme to convert Asciidoctor files into Packt Publishing OpenOffice doc
http://greglturnquist.com/category/learning-spring-boot
46 stars 13 forks source link

Title #22

Closed Fale closed 8 years ago

Fale commented 9 years ago

Hi, Thanks a lot for this tool :). I've noticed that the titles do not appear as "Heading 1,Heading 1 [PACKT]" but as "Heading 1". Is this because Packt has "copied" standard headings or it this a bug?

Thanks again for creating a sharing this awesome tool :), you made my day.

gregturn commented 9 years ago

I'll take a peak. I didn't notice any issue, but then again, the editors took my LIbreOffice manuscript and swept over it, applying some blanket style changes. So there may be more than a handful of things not quite in sync. And...it seems that LIbreOffice templates end up getting converted into MS Word, so the width of code blocks, that I finely tuned, were wrecked. But since it resulted in me holding onto the original "source" of the manuscript, I guess that was a decent price.

BTW, are you writing a book?

Fale commented 9 years ago

Yep, I'm writing a book with Packt and I've just started. I'm using this asciidoc converter because I really like text editors :).

I'll open new bugs if I'll find and maybe I'll try to help too. I've never wrote anything in ruby and for asciidoc, but there is always a first time.

gregturn commented 9 years ago

Hmm. Looking at https://github.com/gregturn/asciidoctor-packt/blob/master/slim/packt/section.fodt.slim#L3 and https://github.com/gregturn/asciidoctor-packt/blob/master/slim/packt/document.fodt.slim#L279, this appears to match up correctly when generating the FODT file.

When I open the FODT file from the first chapter of my book (just generated now) inside LibreOffice, the chapter number and chapter title appear to tagged appropriately.

So...I don't know if you manipulated anything, exported to Word, or something else. Perhaps more details about the process you executed. Or perhaps you could create a mocked version of your project (no real content), and host it on github so I could look at it.

Fale commented 9 years ago

I've converted the README.adoc in my environment and this is the result:

https://gist.github.com/Fale/df56f4a84cb9af561c8c

The two problems I see are:

Thanks a lot :) Fabio

PS: I'm using asciidoc 8.6.8 and then I check the file (and see errors into it) with LibreOffice 4.2.7.2 420(Build:2)

gregturn commented 9 years ago

First of all, after pulling down the gist, I get an Input/Output error when I try to read the document.

Second of all, this project is for asciidoctor, not asciidoc. Initially i used asciidoc, but I since rewrote it to take advantage of the power of asciidoctor.

Fale commented 9 years ago

sorry,

I misswrote. I'm using this command:

asciidoctor -T slim -b packt ch1.adoc

so I'm using asciidoctor 1.5.1 Runtime Environment (ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux])

gregturn commented 9 years ago

Can you post a source asciidoc but of manuscript and a branch such that I can generate the fodt?

Fale commented 9 years ago

Hi, sorry for the delay.

I've used this adoc file: https://fale.fedorapeople.org/asciidoctor/test.adoc I've executed: asciidoctor -T slim -b packt test.adoc And I've received this fodt file: https://fale.fedorapeople.org/asciidoctor/test.fodt

I now see two problems:

Thanks a lot :)

gregturn commented 9 years ago

@Fale I realize that I haven't spent any time on processing your comments. Things are busy. What I'm hoping is that you have been able to make tweaks on your local clone of this project to at least keep going forward with writing your title using asciidoctor. I sounds like a good success story that I think deserves more tweeting. Definitely cc @mojavelinux in your twitter stream to increase the visibility. Who knows? Perhaps one day, Packt may support asciidoctor natively!

Fale commented 9 years ago

Hi @gregturn. I'm able to do the majority of things. The process is not perfect, but the result is compliant with the policies. I've not thought about tweeting... you know, I have one tweet since Aug 24 XD. I'll do it ;).