blog

Welcome to my blog!

How to make CaoChongChengXiang Template

ab's Avatar 2026-01-22 Tutorial

  1. 1. 文件夹内容
  2. 2. 不变的内容
    1. 2.1. algorithm.sty
    2. 2.2. algorithmic.sty
    3. 2.3. fancyhdr.sty
    4. 2.4. icml2026.bst
    5. 2.5. icml2026.sty
  3. 3. icml2026.sty
  4. 4. nabib.sty
  5. 5. main.tex
    1. 5.1. Unit 01
    2. 5.2. Unit 02
    3. 5.3. Unit 03
    4. 5.4. Unit 04
    5. 5.5. Unit 05
    6. 5.6. Unit 06
    7. 5.7. Unit 07
    8. 5.8. Unit 08
    9. 5.9. Unit 09
    10. 5.10. Unit 10

文件夹内容

icml2026:

1
2
3
4
5
6
7
8
9
├── algorithm.sty
├── algorithmic.sty
├── example_paper.bib
├── example_paper.pdf
├── example_paper.tex
├── fancyhdr.sty
├── icml_numpapers.pdf
├── icml2026.bst
└── icml2026.sty

cao_chong_cheng_xiang_template_icml_2026:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
├── _0_vars.tex
├── _1_maths.tex
├── _2_body.tex
├── _3_app.tex
├── 00_abstract.tex
├── 01_intro.tex
├── 02_preli.tex
├── 48_impact_statement.tex
├── 50_roadmap.tex
├── algorithm.sty
├── algorithmic.sty
├── fancyhdr.sty
├── icml2026.bst
├── icml2026.sty
├── main.tex
├── natbib.sty
└── ref.bib

不变的内容

cao_chong_cheng_xiang_template_icml_2026文件夹中的文件,对于 _1_maths.tex, _2_body.tex, 00_abstract.tex, 01_intro.tex, 02_preli.tex, 50_roadmap.texref.bib是默认不变的东西。

_0_vars.tex需要将某些注释修改为ICML的内容,48_impact_statement.tex是ICML要求加的东西,不是icml2026文件夹中的东西。

对于algorithm.sty, algorithmic.sty, fancyhdr.styicml2025.bsticml2026文件夹中完全一样的内容

algorithm.sty

调用位置:

  • ArXiv 版本main.tex 第19行
1
\usepackage{algorithm}
  • 会议版本icml2026.sty 第121行(间接调用)
1
\RequirePackage{algorithm}

algorithmic.sty

调用位置:

  • 已被注释icml2026.sty 第122行
1
% \RequirePackage{algorithmic} % Yang Cao: Commented it out on Jan 21, 2026 due to conlicts with \usepackage{algpseudocode}.
  • 原因:与 algpseudocode 包冲突,因此被注释掉
  • 当前状态:文件存在但未被使用

fancyhdr.sty

调用位置:

  • 会议版本icml2026.sty 第119行(间接调用)
1
\RequirePackage{fancyhdr}
  • 用途:用于设置页眉页脚(运行标题等)

icml2026.bst

调用位置:

  • 会议版本main.tex 第222行
1
\bibliographystyle{icml2026}
  • ArXiv 版本:使用 alpha 样式(第219行),不使用此文件

icml2026.sty

调用位置:

  • 会议版本main.tex 第52行
1
\usepackage{icml2026}
  • ArXiv 版本:不使用此文件

icml2026.sty

icml2026.sty 注释掉了 algorithmic 包,以避免与 algpseudocode 冲突

1
2
3
4
5
6
7
8
9
10
% Use fancyhdr package
\RequirePackage{fancyhdr}
\RequirePackage{xcolor} % changed from color to xcolor (2021/11/24)
\RequirePackage{algorithm}
% \RequirePackage{algorithmic} % Commented it out on Jan 21, 2026 due to conlicts with \usepackage{algpseudocode}.
\RequirePackage{natbib}
\RequirePackage{eso-pic} % used by \AddToShipoutPicture
\RequirePackage{forloop}
\RequirePackage{url}
\RequirePackage{caption}

nabib.sty

nabib.sty代表引用的格式,如果有这个文件的话,会优先加载这个。icml2026文件夹中没有这个文件,会加载系统自带的nabib.sty文件。经过对比,这个nabib.sty和iclr模版文件中的内容一样,可能是遗留物。

main.tex

接下来我们来看最关键的main.tex文件
我们遵循两个原则: (1) 每次只看一个单元的代码,比如从\ifdefinearxiv\fi之间的代码 (2)\ifdefinearxiv分支下的我们不看,只看\else分支下面的

Unit 01

这段没什么问题

1
2
3
4
5
6
7
8
9
10
\input{_0_vars}

\ifdefined\isarxiv
\documentclass[11pt]{article}
\usepackage[numbers]{natbib}
\else
\documentclass{article}


\fi

Unit 02

\else分支下面的内容来自于icml2026/example_paper.tex中第5行到第37行

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
\ifdefined\isarxiv

\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{algorithm}
\usepackage{subfig}
\usepackage{algpseudocode}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{wrapfig,epsfig}
\usepackage{url}
\usepackage{xcolor}
\usepackage{epstopdf}


\usepackage{bbm}
\usepackage{dsfont}

\else

% Recommended, but optional, packages for figures and better typesetting:
\usepackage{microtype}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{booktabs} % for professional tables

% hyperref makes hyperlinks in the resulting PDF.
% If your build breaks (sometimes temporarily if a hyperlink spans a page)
% please comment out the following usepackage line and replace
% \usepackage{icml2026} with \usepackage[nohyperref]{icml2026} above.
\usepackage{hyperref}


% Attempt to make hyperref and algorithmic work together better:
\newcommand{\theHalgorithm}{\arabic{algorithm}}

% Use the following line for the initial blind version submitted for review:
\usepackage{icml2026}

% For preprint, use
% \usepackage[preprint]{icml2026}

% If accepted, instead use the following line for the camera-ready submission:
% \usepackage[accepted]{icml2026}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{amsthm}


% if you use cleveref..
% \usepackage[capitalize,noabbrev]{cleveref}

\fi

Unit 03

1
2
3
4
5
\ifdefined\isarxiv

\else
\usepackage{algpseudocode}
\fi

Unit 04

这段内容很常规,不需要根据icml模版改变

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
\allowdisplaybreaks

\ifdefined\isarxiv

\let\C\relax
\usepackage{tikz}
\usepackage{hyperref}
\hypersetup{colorlinks=true,citecolor=blue,linkcolor=blue}
\usetikzlibrary{arrows}
\usepackage[margin=1in]{geometry}

\else
%%%Zhao: Usually the conference has default dark blue for cite/ref color. But in some year lik 2022 or 2023, we need to define color on own, the conference template no color. This year NeurIPS 2025, if you want the citation/ref to be color, you need the following lines, otherwise you can comment it out.
% \definecolor{mydarkblue}{rgb}{0,0.08,0.45}
% \hypersetup{colorlinks=true, citecolor=mydarkblue,linkcolor=mydarkblue}
\fi

Unit 05

这段也很常规,不需要根据icml模版改变

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
\graphicspath{{./figs/}}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{notation}[theorem]{Notation}
%\newtheorem{proof}[theorem]{Proof}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{assumption}[theorem]{Assumption}
\newtheorem{observation}[theorem]{Observation}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{example}[theorem]{Example}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{open}[theorem]{Open Problem}
\newtheorem{property}[theorem]{Property}
\newtheorem{hypothesis}[theorem]{Hypothesis}

\input{_1_maths}

Unit 06

\paperRTitle指的是_0_vars.tex中的\def\paperRTitle{InternProject}, 是icml2026/example_paper.tex中的第60行\icmltitlerunning{Submission and Formatting Instructions for ICML 2026}类似写法

1
2
3
4
5
6
\ifdefined\isarxiv

\else
\icmltitlerunning{\paperRTitle}

\fi

Unit 07

\else分支来自于icml2026/example_paper.tex的第62行到第122行

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
\begin{document}

\ifdefined\isarxiv
%%% The below part is the title and author of ArXiv version.

\date{}
\title{\paperTitle}
\author{\paperAuthor}

\else
%%% The below part is the title and author of ICML version.

\twocolumn[
\icmltitle{\paperTitle}
% It is OKAY to include author information, even for blind submissions: the
% style file will automatically remove it for you unless you've provided
% the [accepted] option to the icml2026 package.

% List of affiliations: The first argument should be a (short) identifier you
% will use later to specify author affiliations Academic affiliations
% should list Department, University, City, Region, Country Industry
% affiliations should list Company, City, Region, Country

% You can specify symbols, otherwise they are numbered in order. Ideally, you
% should not use this facility. Affiliations will be numbered in order of
% appearance and this is the preferred way.
\icmlsetsymbol{equal}{*}

\begin{icmlauthorlist}
\icmlauthor{Firstname1 Lastname1}{equal,yyy}
\icmlauthor{Firstname2 Lastname2}{equal,yyy,comp}
\icmlauthor{Firstname3 Lastname3}{comp}
\icmlauthor{Firstname4 Lastname4}{sch}
\icmlauthor{Firstname5 Lastname5}{yyy}
\icmlauthor{Firstname6 Lastname6}{sch,yyy,comp}
\icmlauthor{Firstname7 Lastname7}{comp}
%\icmlauthor{}{sch}
\icmlauthor{Firstname8 Lastname8}{sch}
\icmlauthor{Firstname8 Lastname8}{yyy,comp}
%\icmlauthor{}{sch}
%\icmlauthor{}{sch}
\end{icmlauthorlist}

\icmlaffiliation{yyy}{Department of XXX, University of YYY, Location, Country}
\icmlaffiliation{comp}{Company Name, Location, Country}
\icmlaffiliation{sch}{School of ZZZ, Institute of WWW, Location, Country}

\icmlcorrespondingauthor{Firstname1 Lastname1}{first1.last1@xxx.edu}
\icmlcorrespondingauthor{Firstname2 Lastname2}{first2.last2@www.uk}

% You may provide any keywords that you find helpful for describing your
% paper; these are used to populate the "keywords" metadata in the PDF but
% will not be shown in the document
\icmlkeywords{Machine Learning, ICML}

\vskip 0.3in
]

\printAffiliationsAndNotice{}

\fi

Unit 08

这段也很常规,不需要根据icml模版改变

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
\ifdefined\isarxiv
\begin{titlepage}
\maketitle
\begin{abstract}
\input{00_abstract}

\end{abstract}
\thispagestyle{empty}
\end{titlepage}

{\hypersetup{linkcolor=black}
\tableofcontents
}
\newpage

\else

\begin{abstract}
\input{00_abstract}
\end{abstract}

\fi

Unit 09

\input{48_impact_statement}是icml要求加的文件,\else分支中\bibliographystyle{icml2026}代表使用icml2026.bst文件,\bibliographystyle{ref}代表使用ref.bib文件; 是icml2026/example_paper.tex624,625行代码的改写

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
%%% The part below is the main body and reference

\input{_2_body}

% \input{48_ethic_statement}%%%Zhao: for safe, maybe add for all papers, make sure you read it before you add.

\input{48_impact_statement}

\ifdefined\isarxiv
\bibliographystyle{alpha}
\bibliography{ref}
\else
\bibliographystyle{icml2026}
\bibliography{ref}
\fi

Unit 10

这段也很常规,不需要根据icml模版改变

1
2
3
4
5
6
7
8
9
10
11
12
13
%%% The part below is the appendix

\newpage
\onecolumn
\appendix

\begin{center}
\textbf{\LARGE Appendix }
\end{center}

\input{_3_app}

\end{document}
本文最后更新于 天前,文中所描述的信息可能已发生改变