def add_man_header(text: str, name, section, title) -> str:
    """ Add a header string to markdown that can be converted by Pandoc to a man page header.

    :param text: Original text..
    :param name: Name for this manpage.
    :param section: Man pages section for this page.
    :param title: Title for this page.
    :return: Text with header added.
    """
    # % cifra(1) | cifra usage documentation
    header = f"% {name}({section}) | {title}"
    new_text = "\n".join([header, text])
    return new_text