ICML2019

ICML论文解析与LaTeX转换
部署运行你感兴趣的模型镜像

pmlr 下载 icml 的 bibliography.bib
用 如下代码 parse.py 预处理成 latex 段落

#!/usr/bin/python
# -*- coding: UTF-8 -*-
def getValue(s):
	return s.split("=")[1].strip().strip(',')[1:-1]

with open("bibliography.bib",'r',encoding='utf8') as fin:
	with open("output.txt",'w',encoding='utf8') as fout:

		for line in fin.readlines():
			if " title =" in line:
				fout.write("\section*{%s}\n\n" % getValue(line).replace('&','\$'))
			if " author =" in line:
				fout.write("\\textbf{Authors}: %s\n\n" %getValue(line).replace('&','\$'))
			if " url =" in line:
				fout.write("\\textbf{URL}\quad\ \ \,\,:\, \\url{%s}\n\n" %getValue(line))

得到 output.txt

\section*{{AR}e{S} and {M}a{RS} Adversarial and {MMD}-Minimizing Regression for {SDE}s}

\textbf{Authors}: Abbati, Gabriele and Wenk, Philippe and Osborne, Michael A. and Krause, Andreas and Sch{\"o}lkopf, Bernhard and Bauer, Stefan

\textbf{URL}\quad\ \ \,\,:\, \url{http://proceedings.mlr.press/v97/abbati19a.html}

\section*{Dynamic Weights in Multi-Objective Deep Reinforcement Learning}

\textbf{Authors}: Abels, Axel and Roijers, Diederik and Lenaerts, Tom and Now{\'e}, Ann and Steckelmacher, Denis

\textbf{URL}\quad\ \ \,\,:\, \url{http://proceedings.mlr.press/v97/abels19a.html}

...

使用 latex 生成 pdf

\documentclass[a4paper,12pt]{article}
\title{ICML2019}
\author{}
\date{June 9--15, 2019}
% Compile with XeLaTeX or LuaLaTeX
\usepackage[tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in]{geometry}
\usepackage{fontspec}
\usepackage{xcolor}
\usepackage{titlesec}
\usepackage[comma,numbers,square,sort&compress]{natbib}
\usepackage{epstopdf}
\usepackage{graphicx}  %% not necessary
\usepackage{amsmath,amssymb}
\usepackage{amsfonts}
\usepackage{url}
\usepackage{array,tabularx}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{pifont}
\usepackage{extarrows}
\usepackage{bm}
\usepackage{ifthen}
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage{algpseudocode}
\usepackage{amsmath,amsthm}

%\usepackage[colorlinks,linkcolor=black,anchorcolor=blue]{hyperref}
\defaultfontfeatures{Ligatures=TeX}
% Set sans serif font to Calibri
\setsansfont{Calibri}
% Set serifed font to Cambria
\setmainfont{Cambria}
% Define light and dark Microsoft blue colours
\definecolor{MSBlue}{rgb}{.204,.353,.541}
\definecolor{MSLightBlue}{rgb}{.31,.506,.741}
% Define a new fontfamily for the subsubsection font
% Don't use \fontspec directly to change the font
\newfontfamily\subsubsectionfont[Color=MSLightBlue]{Times New Roman}
% Set formats for each heading level
\titleformat*{\section}{\large\bfseries\sffamily\color{MSBlue}}
\titleformat*{\subsection}{\large\bfseries\sffamily\color{MSLightBlue}}
\titleformat*{\subsubsection}{\itshape\subsubsectionfont}

\begin{document}
\maketitle
\setlength\parindent{0em}

%\tableofcontents
\thispagestyle{empty}
\newpage
\setcounter{page}{1}%从下面开始编页码
\input{output.txt}

%\end{CJK*}
\end{document}

最终效果
在这里插入图片描述
在这里插入图片描述
pdf 下载

您可能感兴趣的与本文相关的镜像

Python3.10

Python3.10

Conda
Python

Python 是一种高级、解释型、通用的编程语言,以其简洁易读的语法而闻名,适用于广泛的应用,包括Web开发、数据分析、人工智能和自动化脚本

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

颹蕭蕭

白嫖?

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值