Other articles


  1. No need for overly verbose typedefs in C

    I used typedefs like this one for my ADTs (Abstract Data Types, also known as "opaque pointers") because I copied that syntax from somewhere:

    typedef struct Node_T Node;

    But you don’t need to do so, a simpler

    typedef struct Node Node;

    will do. C doesn’t confuse a structs …

    read more
  2. How this blog is made

    Asciidoc

    All text sources for this blog are written in Asciidoc. Not only the blog posts, but also the static pages. To use Asciidoc, you have to install and enable the Asciidoc plugin for Pelican. Put this lines into your pelicanconf.py:

    ...
    PLUGINS = ['asciidoc_reader']
    ...
    ASCIIDOC_CMD = 'asciidoctor'
    ...

    I use Asciidoctor here …

    read more
  3. Why Pelican?

    There are a bunch of static site generators which you can use to create a static website (as opposed to something dynamic like WordPress, Joomla or Drupal, for example). I chose Pelican for my website. The main advantages of Pelican[1] from my point of view are:

    • It’s written …

    read more
  4. Use a custom font with Asciidoctor-PDF

    I wanted to show to myself that it works, and it does. Here’s how: Set the font in a theme file (this one’s called nik-theme.yml):

    font:
      catalog:
        merge: false
        Garamond:
          normal: EBGaramond12-Regular.ttf
          italic: EBGaramond12-Italic.ttf
          bold: EBGaramond12-Bold.ttf
          bold_italic: EBGaramond12-Bold.ttf
    
    base:
      font-family: Garamond

    Note that …

    read more

links

social