当前位置: 首页>>代码示例>>Python>>正文


Python Latex._format_output_row方法代码示例

本文整理汇总了Python中inspirehep.utils.latex.Latex._format_output_row方法的典型用法代码示例。如果您正苦于以下问题:Python Latex._format_output_row方法的具体用法?Python Latex._format_output_row怎么用?Python Latex._format_output_row使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在inspirehep.utils.latex.Latex的用法示例。


在下文中一共展示了Latex._format_output_row方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_format_output_row_between_one_and_eight_authors

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_between_one_and_eight_authors():
    record = Record({})
    latex = Latex(record, 'latex_eu')

    expected = u'  F.~Englert and R.~Brout,\n'
    result = latex._format_output_row('author', ['F.~Englert', 'R.~Brout'])

    assert expected == result
开发者ID:bittirousku,项目名称:inspire-next,代码行数:10,代码来源:test_utils_latex.py

示例2: test_format_output_row_unknown_field

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_unknown_field():
    record = Record({})
    latex = Latex(record, 'latex_eu')

    expected = ''
    result = latex._format_output_row('unknown_field', 'foo')

    assert expected == result
开发者ID:bittirousku,项目名称:inspire-next,代码行数:10,代码来源:test_utils_latex.py

示例3: test_format_output_row_one_author

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_one_author():
    record = Record({})
    latex = Latex(record, 'latex_eu')

    expected = u'  S.~L.~Glashow,\n'
    result = latex._format_output_row('author', ['S.~L.~Glashow'])

    assert expected == result
开发者ID:bittirousku,项目名称:inspire-next,代码行数:10,代码来源:test_utils_latex.py

示例4: test_format_output_row_arxiv_without_publi_info

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_arxiv_without_publi_info():
    without_publi_info = Record({})
    latex = Latex(without_publi_info, 'latex_eu')

    expected = u'  arXiv:1512.01296 [hep-th].\n'
    result = latex._format_output_row('arxiv', 'arXiv:1512.01296 [hep-th]')

    assert expected == result
开发者ID:bittirousku,项目名称:inspire-next,代码行数:10,代码来源:test_utils_latex.py

示例5: test_format_output_row_report_number

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_report_number():
    record = Record({})
    latex = Latex(record, 'latex_eu')

    expected = u'  CMS-PAS-TOP-13-007.\n'
    result = latex._format_output_row('report_number', 'CMS-PAS-TOP-13-007')

    assert expected == result
开发者ID:bittirousku,项目名称:inspire-next,代码行数:10,代码来源:test_utils_latex.py

示例6: test_format_output_row_publi_info_not_a_list

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_publi_info_not_a_list():
    record = Record({})
    latex = Latex(record, 'latex_eu')

    expected = u'  Phys. Lett. 12 (1964) 132-133.\n'
    result = latex._format_output_row('publi_info', 'Phys. Lett. 12 (1964) 132-133')

    assert expected == result
开发者ID:bittirousku,项目名称:inspire-next,代码行数:10,代码来源:test_utils_latex.py

示例7: test_format_output_row_title

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_title():
    record = Record({})
    latex = Latex(record, 'latex_eu')

    expected = u"  %``Partial Symmetries of Weak Interactions,''\n"
    result = latex._format_output_row('title', 'Partial Symmetries of Weak Interactions')

    assert expected == result
开发者ID:bittirousku,项目名称:inspire-next,代码行数:10,代码来源:test_utils_latex.py

示例8: test_format_output_row_more_than_eight_authors_collaboration_an_empty_list

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_more_than_eight_authors_collaboration_an_empty_list():
    collaboration_an_empty_list = Record({'collaboration': []})
    latex = Latex(collaboration_an_empty_list, 'latex_eu')

    expected = '  0 {\\it et al.}'
    result = latex._format_output_row('author', [str(i) for i in range(9)])

    assert expected == result
开发者ID:bittirousku,项目名称:inspire-next,代码行数:10,代码来源:test_utils_latex.py

示例9: test_format_output_row_publi_info_a_list_with_one_element

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_publi_info_a_list_with_one_element():
    record = Record({})
    latex = Latex(record, 'latex_eu')

    expected = u'  Phys.\\ Rev.\\ D {\\bf 73} (2006) 014022\n'
    result = latex._format_output_row('publi_info', [
        'Phys.\\ Rev.\\ D {\\bf 73} (2006) 014022'
    ])

    assert expected == result
开发者ID:bittirousku,项目名称:inspire-next,代码行数:12,代码来源:test_utils_latex.py

示例10: test_format_output_row_more_than_eight_authors_no_collaboration

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_more_than_eight_authors_no_collaboration():
    without_collaboration = Record({})
    latex = Latex(without_collaboration, 'latex_eu')

    expected = u'  L.~Cadamuro {\it et al.},\n'
    result = latex._format_output_row('author', [
        'L.~Cadamuro', 'M.~Calvi', 'L.~Cassina', 'A.~Giachero', 'C.~Gotti',
        'B.~Khanji', 'M.~Maino', 'C.~Matteuzzi', 'G.~Pessina'
    ])

    assert expected == result
开发者ID:bittirousku,项目名称:inspire-next,代码行数:13,代码来源:test_utils_latex.py

示例11: test_format_output_row_arxiv_with_publi_info

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_arxiv_with_publi_info():
    with_publi_info = Record({
        'publication_info': [
            {'journal_title': ''}
        ]
    })
    latex = Latex(with_publi_info, 'latex_eu')

    expected = u'  [arXiv:1512.01381 [hep-th]].\n'
    result = latex._format_output_row('arxiv', 'arXiv:1512.01381 [hep-th]')

    assert expected == result
开发者ID:bittirousku,项目名称:inspire-next,代码行数:14,代码来源:test_utils_latex.py

示例12: test_format_output_row_publi_info_a_list_with_two_elelemts

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_publi_info_a_list_with_two_elelemts():
    record = Record({})
    latex = Latex(record, 'latex_eu')

    expected = u'''  Int.\\ J.\\ Theor.\\ Phys.\\  {\\bf 38} (1999) 1113
    [Adv.\\ Theor.\\ Math.\\ Phys.\\  {\\bf 2} (1998) 231]
'''

    result = latex._format_output_row('publi_info', [
        'Int.\\ J.\\ Theor.\\ Phys.\\  {\\bf 38} (1999) 1113',
        '[Adv.\\ Theor.\\ Math.\\ Phys.\\  {\\bf 2} (1998) 231]'
    ])

    assert expected == result
开发者ID:bittirousku,项目名称:inspire-next,代码行数:16,代码来源:test_utils_latex.py

示例13: test_format_output_row_more_than_eight_authors_collaboration_in_collaboration

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_more_than_eight_authors_collaboration_in_collaboration():
    collaboration_in_collaboration = Record({
        'collaboration': [
            {'value': 'The ATLAS Collaboration'}
        ]
    })
    latex = Latex(collaboration_in_collaboration, 'latex_eu')

    expected = u'  G.~Aad {{\it et al.}} [The ATLAS Collaboration],\n'
    result = latex._format_output_row('author', [
        'G.~Aad', 'B.~Abbott', 'J.~Abdallah', 'O.~Abdinov', 'B.~Abeloos',
        'R.~Aben', 'M.~Abolins', 'O.~AbouZeid', 'H.~Abramowicz'
    ])

    assert expected == result
开发者ID:bittirousku,项目名称:inspire-next,代码行数:17,代码来源:test_utils_latex.py

示例14: test_format_output_row_more_than_eight_authors_collaboration

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_more_than_eight_authors_collaboration():
    with_collaboration = Record({
        'collaboration': [
            {'value': 'Supernova Search Team'}
        ]
    })
    latex = Latex(with_collaboration, 'latex_eu')

    expected = u'  A.~G.~Riess {{\\it et al.}} [Supernova Search Team Collaboration],\n'
    result = latex._format_output_row('author', [
        'A.~G.~Riess', 'A.~V.~Filippenko', 'P.~Challis', 'A.~Clocchiattia',
        'A.~Diercks', 'P.~M.~Garnavich', 'R.~L.~Gilliland', 'C.~J.~Hogan',
        'S.~Jha', 'R.~P.~Kirshner', 'B.~Leibundgut', 'M.~M.~Phillips',
        'D.~Reiss', 'B.~P.~Schmidt', 'R.~A.~Schommer', 'R.~C.~Smith',
        'J.~Spyromilio', 'C.~Stubbs', 'N.~B.~Suntzeff', 'J.~Tonry'
    ])

    assert expected == result
开发者ID:bittirousku,项目名称:inspire-next,代码行数:20,代码来源:test_utils_latex.py

示例15: test_format_output_row_publi_info_an_empty_list

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _format_output_row [as 别名]
def test_format_output_row_publi_info_an_empty_list():
    record = Record({})
    latex = Latex(record, 'latex_eu')

    latex._format_output_row('publi_info', [])
开发者ID:bittirousku,项目名称:inspire-next,代码行数:7,代码来源:test_utils_latex.py


注:本文中的inspirehep.utils.latex.Latex._format_output_row方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。