justinmeiners / efficient-programming-with-components

Course notes for Alexander Stepanov's teachings on design and usage of C++ STL.
https://www.jmeiners.com/efficient-programming-with-components/
75 stars 6 forks source link

Warnings on epub build with pandoc #5

Closed yuroller closed 3 years ago

yuroller commented 3 years ago

I built an epub version of your notes with commandline below and it succeeded, but it also gave me some warnings. I opened this issue in case you want to investigate, but I am happy with the result. I have taken base.css from https://github.com/onlurking/category-theory-for-programmers Note that with the below commanline, links to cpp source files are broken, because they are not included in the final epub.

pandoc --toc --toc-depth=2 --epub-metadata=metadata.xml --css=base.css --highlight-style pygments --epub-cover-image=img/cover.png -o build/epub/efficient-programming-with-components.epub title.txt 00_foreword.md 01_data_structures.md 02_regular_types.md 03_singleton.md 04_instrumented.md 05_swap.md 06_min_max.md 07_min_range.md 08_lisp.md 09_iterators.md 10_binary_counter.md 11_min_1_2.md 12_merge_sort.md 13_searching.md 14_binary_search.md 15_merge_inplace.md 16_optimizing_stable_sort.md 17_adaptive_merge_sort.md 18_binary_insertion_sort.md 19_insertion_sort.md
[WARNING] Note with key 'about-bjarne' defined at 02_regular_types.md line 287 column 1 but not used.
[WARNING] Note with key 'design-of-cpp' defined at 18_binary_insertion_sort.md line 138 column 1 but not used.
[WARNING] Note with key 'paul' defined at 14_binary_search.md line 188 column 1 but not used.
[WARNING] Note with key 'shift-vs-divide' defined at 14_binary_search.md line 200 column 1 but not used.
[WARNING] Note with key 'without-goto' defined at 12_merge_sort.md line 439 column 1 but not used.
[WARNING] Duplicate link reference '[knuth]' at 10_binary_counter.md line 68 column 1
[WARNING] Duplicate note reference 'eop' at 13_searching.md line 361 column 1
[WARNING] Duplicate note reference 'pc-info' at 16_optimizing_stable_sort.md line 83 column 1
[WARNING] Duplicate note reference 'pc-info' at 17_adaptive_merge_sort.md line 187 column 1
[WARNING] Duplicate link reference '[moore]' at 19_insertion_sort.md line 42 column 1
justinmeiners commented 3 years ago

Thanks! that is helpful

yuroller commented 3 years ago

Thank you for studying the videos and taking such accurate notes: due to time constraints probably I will never be able to watch the whole videos, but now I can fast forward to the parts I find most interesting based on your notes.

justinmeiners commented 3 years ago

Most of these should now be fixed. I almost left some good content out! A few were left because they were the same reference on multiple pages. If this causes trouble for you, let me know.

I'm curious if you are integrating the referenced code files in your epub somehow?

yuroller commented 3 years ago

I think source code has to be converted first to markdown syntax in order to be included, but I am not a pandoc/epub expert so I can be wrong. Anyway I suspect it will not 'read' well on the small screens of ebook readers, so I did not try including them. I converted the book again, this time without css and it still read well, and we have the following warning remaining:

pandoc --toc --toc-depth=2 --epub-metadata=metadata.xml --epub-cover-image=img/cover.png -o build/epub/efficient-programming-with-components.epub title.txt 00_foreword.md 01_data_structures.md 02_regular_types.md 03_singleton.md 04_instrumented.md 05_swap.md 06_min_max.md 07_min_range.md 08_lisp.md 09_iterators.md 10_binary_counter.md 11_min_1_2.md 12_merge_sort.md 13_searching.md 14_binary_search.md 15_merge_inplace.md 16_optimizing_stable_sort.md 17_adaptive_merge_sort.md 18_binary_insertion_sort.md 19_insertion_sort.md
[WARNING] Duplicate link reference '[knuth]' at 10_binary_counter.md line 68 column 1
[WARNING] Duplicate note reference 'pc-info' at 16_optimizing_stable_sort.md line 83 column 1
[WARNING] Duplicate note reference 'pc-info' at 17_adaptive_merge_sort.md line 187 column 1