Blog of an IT enthusiast, GNU/Linux-lover and arty idiot.

「智障」致「神經病」

倘若我有一絲慧根尚存
願以之悉數奉出
纏繞交疊
你每一縷思緒
合理或瘋狂
而後
僅剩傻傻的我
看著你痴痴地笑
Comments

Scripts for Adding Bookmarks to a PDF

As I gradually get used to reading more and more e-books, I find that it could be 100x more efficient if there were bookmarks that help you jump around the chapters for a scanned version pdf. It could be even more pleasant than reading the original paper-based book since the table of contents can be always on one side of the screen which is more accessible.

However, the true story is, those scanned pdfs usually don't come with such detailed bookmarks naturally. It is a painstaking task to use a pdf editing software to add bookmarks one after another via a graphical UI. Thus, a more desirable solution is to have a scripting-like way to add these bookmarks. Luckily, with the help of Adobe pdfmark Reference and this article, it is fairly easy to achieve:

The code above is used for generating the bookmark description according to the pdfmarks reference. Finally, we can concatenate the original pdf file with the generated bookmark file. Therefore:

Note that you need to change the variable toc in the above script to one which describes your table of contents.

/images/bookmarks.thumbnail.png
Comments

Application for PhD

Comments

所謂幸福

我想有個姑娘
能同她聽金色音樂會
亦可去吞街頭牛肉麵
狹小店裏
於盈盈熱氣中
促膝而坐
吸溜着叼滿一嘴的麵條
咕噥了聽不清什麼的話
相視一笑
這便是心中的幸福

Read more...

Comments

Code Syntax Highlight

Test music score:

/static/lilypond/lesson_in_a_minor.svg

Test syntax highlight for Python:

Test syntax highlight for C++:

Test LaTeX:

\begin{equation*} e^{ix} = \cos x + i\sin x \end{equation*}
Comments
Contents & Theme © 2017 Ted Yin
Creative Commons License BY-NC-SA