def latexify_l3col(obj, **kwargs):
    """Convert an object to special LaTeX for limit tables.

    This conversion is meant for limit values in a table. The return value
    should span three columns. The first column is the limit indicator: <, >,
    ~, etc. The second column is the whole part of the value, up until just
    before the decimal point. The third column is the decimal point and the
    fractional part of the value, if present. If the item being formatted does
    not fit this schema, it can be wrapped in something like
    '\multicolumn{3}{c}{...}'.

    """
    if hasattr(obj, '__pk_latex_l3col__'):
        return obj.__pk_latex_l3col__(**kwargs)

    if isinstance(obj, bool):
        # isinstance(True, int) = True, so gotta handle this first.
        raise ValueError('no well-defined l3col LaTeXification of bool %r' % obj)

    if isinstance(obj, float):
        return '&' + latexify_n2col(obj, **kwargs)

    if isinstance(obj, int):
        return '& $%d$ &' % obj

    raise ValueError('can\'t LaTeXify %r in 3-column limit format' % obj)
Convert an object to special LaTeX for limit tables.

    This conversion is meant for limit values in a table. The return value
    should span three columns. The first column is the limit indicator: <, >,
    ~, etc. The second column is the whole part of the value, up until just
    before the decimal point. The third column is the decimal point and the
    fractional part of the value, if present. If the item being formatted does
    not fit this schema, it can be wrapped in something like
    '\multicolumn{3}{c}{...}'.