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


Python Latex._get_publi_info方法代码示例

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


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

示例1: test_get_publi_info_from_publication_info_a_list_of_two_elements

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_publi_info [as 别名]
def test_get_publi_info_from_publication_info_a_list_of_two_elements():
    publication_info_a_list_of_two_elements = Record({
        'publication_info': [
            {
                'journal_title': 'Int.J.Theor.Phys.',
                'journal_volume': '38',
                'page_start': '1113',
                'page_end': '1133',
                'year': 1999
            },
            {
                'journal_title': 'Adv.Theor.Math.Phys.',
                'journal_volume': '2',
                'page_start': '231',
                'page_end': '252',
                'year': 1998
            }
        ]
    })
    latex = Latex(publication_info_a_list_of_two_elements, 'latex_eu')

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

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

示例2: test_get_publi_info_from_publication_info_an_empty_list

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

    expected = []
    result = latex._get_publi_info()

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

示例3: test_get_publi_info_from_publication_info_with_journal_title_a_list_of_one_element

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_publi_info [as 别名]
def test_get_publi_info_from_publication_info_with_journal_title_a_list_of_one_element():
    journal_title_a_list_of_one_element = InspireRecord({
        'publication_info': [
            {'journal_title': ['foo']}
        ]
    })
    latex = Latex(journal_title_a_list_of_one_element, 'latex_eu')

    expected = ['foo']
    result = latex._get_publi_info()

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

示例4: test_get_publi_info_from_publication_info_with_journal_title_a_list_of_two_elements

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

    expected = ['bar']
    result = latex._get_publi_info()

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

示例5: test_get_publi_info_from_pubinfo_freetext

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_publi_info [as 别名]
def test_get_publi_info_from_pubinfo_freetext():
    pubinfo_freetext = Record({
        'publication_info': [
            {'pubinfo_freetext': 'Phys. Lett. 12 (1964) 132-133'}
        ]
    })
    latex = Latex(pubinfo_freetext, 'latex_eu')

    expected = 'Phys. Lett. 12 (1964) 132-133'
    result = latex._get_publi_info()

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

示例6: test_get_publi_info_from_publication_info_with_journal_title_an_empty_list

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

    expected = []
    result = latex._get_publi_info()

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

示例7: test_get_publi_info_from_publication_info_with_journal_title_not_a_list

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

    expected = ['Nucl.\\ Phys.\\ ']
    result = latex._get_publi_info()

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

示例8: test_get_publi_info_from_publication_info_with_journal_issue_latex_us

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_publi_info [as 别名]
def test_get_publi_info_from_publication_info_with_journal_issue_latex_us():
    journal_issue = Record({
        'publication_info': [
            {
                'journal_title': 'Class.Quant.Grav.',
                'journal_issue': '10'
            }
        ]
    })
    latex_us = Latex(journal_issue, 'latex_us')

    expected = ['Class.\\ Quant.\\ Grav.\\ , no. 10']
    result = latex_us._get_publi_info()

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

示例9: test_get_publi_info_from_publication_info_with_journal_issue_latex_eu

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_publi_info [as 别名]
def test_get_publi_info_from_publication_info_with_journal_issue_latex_eu():
    journal_issue = Record({
        'publication_info': [
            {
                'journal_title': 'Int.J.Mod.Phys.',
                'journal_issue': '29'
            }
        ]
    })
    latex_eu = Latex(journal_issue, 'latex_eu')

    expected = ['Int.\\ J.\\ Mod.\\ Phys.\\  29, ']
    result = latex_eu._get_publi_info()

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

示例10: test_get_publi_info_from_publication_info_with_year_a_list_of_two_elements

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_publi_info [as 别名]
def test_get_publi_info_from_publication_info_with_year_a_list_of_two_elements():
    year_a_list_of_two_elements = Record({
        'publication_info': [
            {
                'journal_title': 'Phys.Rev.Lett.',
                'year': ['1999', '2000']
            }
        ]
    })
    latex = Latex(year_a_list_of_two_elements, 'latex_eu')

    expected = ['Phys.\\ Rev.\\ Lett.\\  (2000)']
    result = latex._get_publi_info()

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

示例11: test_get_publi_info_from_publication_info_with_year_a_list_of_one_element

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_publi_info [as 别名]
def test_get_publi_info_from_publication_info_with_year_a_list_of_one_element():
    year_a_list_of_one_element = Record({
        'publication_info': [
            {
                'journal_title': 'JHEP',
                'year': ['1999']
            }
        ]
    })
    latex = Latex(year_a_list_of_one_element, 'latex_eu')

    expected = ['JHEP (1999)']
    result = latex._get_publi_info()

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

示例12: test_get_publi_info_from_publication_info_with_year_an_empty_list

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_publi_info [as 别名]
def test_get_publi_info_from_publication_info_with_year_an_empty_list():
    year_an_empty_list = Record({
        'publication_info': [
            {
                'journal_title': 'Phys.Rev.',
                'year': []
            }
        ]
    })
    latex = Latex(year_an_empty_list, 'latex_eu')

    expected = ['Phys.\\ Rev.\\ ']
    result = latex._get_publi_info()

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

示例13: test_get_publi_info_from_publication_info_with_page_artid_an_empty_list

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_publi_info [as 别名]
def test_get_publi_info_from_publication_info_with_page_artid_an_empty_list():
    page_artid_an_empty_list = Record({
        'publication_info': [
            {
                'journal_title': 'Phys.Lett.',
                'page_artid': []
            }
        ]
    })
    latex = Latex(page_artid_an_empty_list, 'latex_eu')

    expected = ['Phys.\\ Lett.\\ ']
    result = latex._get_publi_info()

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

示例14: test_get_publi_info_from_publication_info_with_journal_volume

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

    expected = ['eConf C {\\bf 050318}']
    result = latex._get_publi_info()

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

示例15: test_get_publi_info_from_publication_info_with_page_artid_a_list_of_one_element

# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_publi_info [as 别名]
def test_get_publi_info_from_publication_info_with_page_artid_a_list_of_one_element():
    page_artid_a_list_of_one_element = Record({
        'publication_info': [
            {
                'journal_title': 'Eur.Phys.J.',
                'page_artid': ['2466']
            }
        ]
    })
    latex = Latex(page_artid_a_list_of_one_element, 'latex_eu')

    expected = ['Eur.\\ Phys.\\ J.\\  2466']
    result = latex._get_publi_info()

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


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