def gen_title(title, special_issue=None):
    """
    Generates article title in APA format.

    :param title:           original title
    :type title:            str
    :param special_issue:   special issue number of article, default is None
    :type special_issue:    str or None
    :return:                title plus special issue (if any) printed in APA format
    :rtype:                 str
    """

    ret = ''
    if title:
        ret += ' %s' % title.capitalize()
        if special_issue:
            ret += ' [%s]' % special_issue
        if not ret.endswith('.'):
            ret += '.'
    return ret