[Books] [Bug 456375] Invalid link to download the book

David C. Bryant bugzilla_noreply at kde.org
Mon Jul 11 00:26:48 BST 2022


https://bugs.kde.org/show_bug.cgi?id=456375

--- Comment #8 from David C. Bryant <davidbryant at gvtc.com> ---
I have been digging into the CMAKE files for project kf5book
(https://invent.kde.org/documentation/kf5book). I finally got the .pdf file to
generate using "kdesrc-build kf5book". I had to do several things to get it to
go.

-- I had to install "pandocs" and also "snippetextractor". "pandocs" is part of
my distro (Gentoo), so that was easy. "snippetextractor" is sort of obscure, so
I had to clone the source for snippetextractor, after which "qmake -o Makefile
snippetextractor.pro && make" generated the object program. I then moved the
object program from the build directory into my PATH, so it woud be usable.

-- I had to change a command line in the CMakeLists.txt file:

add_custom_command(OUTPUT KDE-Frameworks-Cookbook.pdf
    COMMAND ${PANDOC} --toc --number-sections ${files} -o
KDE-Frameworks-Cookbook.pdf
    --template=${CMAKE_SOURCE_DIR}/pdf-template.tex
    --chapters
    DEPENDS ${files} pdf-template.tex
)

The "pandocs" program no longer supports  a "--chapters" option. It works OK if
"--chapters" is changed to "--top-level-division=chapter".

-- I had to add some customization to the "pdf-template.tex" file from the
repo.
(add after line 131)
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}

because "pandocs" throws a "\tightlist" command into every itemized list it
generates, and \tightlist is not a standard LaTeX function.

-- With these changes, kdesrc-build can create an html file, and a pdf file.
The "epub" command is still not working correctly. Maybe I can get that fixed
tomorrow.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the kde-doc-english mailing list