How to use the betterbib.tools._translate_title function in betterbib

To help you get started, we’ve selected a few betterbib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nschloe / betterbib / test / test_bibtex_title.py View on Github external
def test():
    assert (
        betterbib.tools._translate_title(
            "The Magnus expansion and some of its applications"
        )
        == "The {Magnus} expansion and some of its applications"
    )

    assert (
        betterbib.tools._translate_title("VODE: a variable-coefficient ODE solver")
        == "{VODE:} {A} variable-coefficient {ODE} solver"
    )

    assert (
        betterbib.tools._translate_title(
            "Peano's kernel theorem for vector-valued functions"
        )
        == "{Peano's} kernel theorem for vector-valued functions"
    )

    assert (
        betterbib.tools._translate_title(
            "Exponential Runge-Kutta methods for parabolic problems"
        )
        == "Exponential {Runge}-{Kutta} methods for parabolic problems"
    )
github nschloe / betterbib / test / test_bibtex_title.py View on Github external
def test():
    assert (
        betterbib.tools._translate_title(
            "The Magnus expansion and some of its applications"
        )
        == "The {Magnus} expansion and some of its applications"
    )

    assert (
        betterbib.tools._translate_title("VODE: a variable-coefficient ODE solver")
        == "{VODE:} {A} variable-coefficient {ODE} solver"
    )

    assert (
        betterbib.tools._translate_title(
            "Peano's kernel theorem for vector-valued functions"
        )
        == "{Peano's} kernel theorem for vector-valued functions"
    )

    assert (
        betterbib.tools._translate_title(
            "Exponential Runge-Kutta methods for parabolic problems"
        )
        == "Exponential {Runge}-{Kutta} methods for parabolic problems"
    )

    assert (
        betterbib.tools._translate_title(
            "GMRES: A generalized minimal residual algorithm"
        )
github nschloe / betterbib / test / test_bibtex_title.py View on Github external
assert (
        betterbib.tools._translate_title(
            "GMRES: A generalized minimal residual algorithm"
        )
        == "{GMRES:} {A} generalized minimal residual algorithm"
    )

    assert (
        betterbib.tools._translate_title(
            "On generalized averaged Gaussian formulas, II"
        )
        == "On generalized averaged {Gaussian} formulas, {II}"
    )

    assert (
        betterbib.tools._translate_title("Gaussian Hermitian Jacobian")
        == "{Gaussian} {Hermitian} {Jacobian}"
    )

    assert (
        betterbib.tools._translate_title("Dash-Dash Double--Dash Triple---Dash")
        == "Dash-Dash Double--Dash Triple---Dash"
    )

    assert betterbib.tools._translate_title("x: {X}") == "x: {X}"

    assert (
        betterbib.tools._translate_title("{Aaa ${\\text{Pt/Co/AlO}}_{x}$ aaa bbb}")
        == "{Aaa {${\\text{Pt/Co/AlO}}_{x}$} aaa bbb}"
    )

    assert betterbib.tools._translate_title("z*") == "z*"
github nschloe / betterbib / test / test_bibtex_title.py View on Github external
== "{Gaussian} {Hermitian} {Jacobian}"
    )

    assert (
        betterbib.tools._translate_title("Dash-Dash Double--Dash Triple---Dash")
        == "Dash-Dash Double--Dash Triple---Dash"
    )

    assert betterbib.tools._translate_title("x: {X}") == "x: {X}"

    assert (
        betterbib.tools._translate_title("{Aaa ${\\text{Pt/Co/AlO}}_{x}$ aaa bbb}")
        == "{Aaa {${\\text{Pt/Co/AlO}}_{x}$} aaa bbb}"
    )

    assert betterbib.tools._translate_title("z*") == "z*"
github nschloe / betterbib / test / test_bibtex_title.py View on Github external
assert (
        betterbib.tools._translate_title(
            "Peano's kernel theorem for vector-valued functions"
        )
        == "{Peano's} kernel theorem for vector-valued functions"
    )

    assert (
        betterbib.tools._translate_title(
            "Exponential Runge-Kutta methods for parabolic problems"
        )
        == "Exponential {Runge}-{Kutta} methods for parabolic problems"
    )

    assert (
        betterbib.tools._translate_title(
            "GMRES: A generalized minimal residual algorithm"
        )
        == "{GMRES:} {A} generalized minimal residual algorithm"
    )

    assert (
        betterbib.tools._translate_title(
            "On generalized averaged Gaussian formulas, II"
        )
        == "On generalized averaged {Gaussian} formulas, {II}"
    )

    assert (
        betterbib.tools._translate_title("Gaussian Hermitian Jacobian")
        == "{Gaussian} {Hermitian} {Jacobian}"
    )
github nschloe / betterbib / test / test_bibtex_title.py View on Github external
)

    assert (
        betterbib.tools._translate_title("Gaussian Hermitian Jacobian")
        == "{Gaussian} {Hermitian} {Jacobian}"
    )

    assert (
        betterbib.tools._translate_title("Dash-Dash Double--Dash Triple---Dash")
        == "Dash-Dash Double--Dash Triple---Dash"
    )

    assert betterbib.tools._translate_title("x: {X}") == "x: {X}"

    assert (
        betterbib.tools._translate_title("{Aaa ${\\text{Pt/Co/AlO}}_{x}$ aaa bbb}")
        == "{Aaa {${\\text{Pt/Co/AlO}}_{x}$} aaa bbb}"
    )

    assert betterbib.tools._translate_title("z*") == "z*"
github nschloe / betterbib / test / test_bibtex_title.py View on Github external
assert (
        betterbib.tools._translate_title(
            "Exponential Runge-Kutta methods for parabolic problems"
        )
        == "Exponential {Runge}-{Kutta} methods for parabolic problems"
    )

    assert (
        betterbib.tools._translate_title(
            "GMRES: A generalized minimal residual algorithm"
        )
        == "{GMRES:} {A} generalized minimal residual algorithm"
    )

    assert (
        betterbib.tools._translate_title(
            "On generalized averaged Gaussian formulas, II"
        )
        == "On generalized averaged {Gaussian} formulas, {II}"
    )

    assert (
        betterbib.tools._translate_title("Gaussian Hermitian Jacobian")
        == "{Gaussian} {Hermitian} {Jacobian}"
    )

    assert (
        betterbib.tools._translate_title("Dash-Dash Double--Dash Triple---Dash")
        == "Dash-Dash Double--Dash Triple---Dash"
    )

    assert betterbib.tools._translate_title("x: {X}") == "x: {X}"
github nschloe / betterbib / test / test_bibtex_title.py View on Github external
)

    assert (
        betterbib.tools._translate_title("VODE: a variable-coefficient ODE solver")
        == "{VODE:} {A} variable-coefficient {ODE} solver"
    )

    assert (
        betterbib.tools._translate_title(
            "Peano's kernel theorem for vector-valued functions"
        )
        == "{Peano's} kernel theorem for vector-valued functions"
    )

    assert (
        betterbib.tools._translate_title(
            "Exponential Runge-Kutta methods for parabolic problems"
        )
        == "Exponential {Runge}-{Kutta} methods for parabolic problems"
    )

    assert (
        betterbib.tools._translate_title(
            "GMRES: A generalized minimal residual algorithm"
        )
        == "{GMRES:} {A} generalized minimal residual algorithm"
    )

    assert (
        betterbib.tools._translate_title(
            "On generalized averaged Gaussian formulas, II"
        )
github nschloe / betterbib / test / test_bibtex_title.py View on Github external
"On generalized averaged Gaussian formulas, II"
        )
        == "On generalized averaged {Gaussian} formulas, {II}"
    )

    assert (
        betterbib.tools._translate_title("Gaussian Hermitian Jacobian")
        == "{Gaussian} {Hermitian} {Jacobian}"
    )

    assert (
        betterbib.tools._translate_title("Dash-Dash Double--Dash Triple---Dash")
        == "Dash-Dash Double--Dash Triple---Dash"
    )

    assert betterbib.tools._translate_title("x: {X}") == "x: {X}"

    assert (
        betterbib.tools._translate_title("{Aaa ${\\text{Pt/Co/AlO}}_{x}$ aaa bbb}")
        == "{Aaa {${\\text{Pt/Co/AlO}}_{x}$} aaa bbb}"
    )

    assert betterbib.tools._translate_title("z*") == "z*"