Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
rl-introduction
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
wangchenglong
rl-introduction
Commits
3e4a1b88
Commit
3e4a1b88
authored
Sep 11, 2026
by
wangchenglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update.
parent
7f8cee0c
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
126 行增加
和
0 行删除
+126
-0
scripts/build_chapter_pdfs.ps1
+126
-0
没有找到文件。
scripts/build_chapter_pdfs.ps1
0 → 100644
查看文件 @
3e4a1b88
param
(
[
string
]
$OutputDir
=
"chapter-pdfs"
)
$ErrorActionPreference
=
"Stop"
$repoRoot
=
Resolve-Path
(
Join-Path
$PSScriptRoot
".."
)
Set-Location
$repoRoot
$buildDir
=
Join-Path
$repoRoot
".chapter-build"
$outDir
=
Join-Path
$repoRoot
$OutputDir
New-Item
-ItemType Directory -Force
$buildDir
| Out-Null
New-Item
-ItemType Directory -Force
$outDir
| Out-Null
$main
=
Get-Content
-Raw -Encoding UTF8
"rl-introduction.tex"
$preamble
=
[
regex]::Match
(
$main
,
"(?s)^.*?\\begin\{document\}"
)
.Value
$preamble
=
$preamble
-replace
"(?m)^\\def\\bibdata#1\{\}\r?\n"
,
""
$preamble
=
$preamble
-replace
"(?m)^\\def\\bibstyle#1\{\}\r?\n"
,
""
$introMatch
=
[
regex]::Match
(
$main
,
"(?s)\\section\{Introduction\}.*?(?=\r?\n\\input\{section2/section2\})"
)
if
(
-not
$introMatch
.Success
)
{
throw
"Could not extract the Introduction section from rl-introduction.tex"
}
$chapters
=
@
(
@
{
Job
=
"chapter-01-introduction"
Title
=
"Chapter 1: Introduction"
Counter
=
$null
Body
=
$introMatch
.Value
}
,
@
{
Job
=
"chapter-02-preliminary"
Title
=
"Chapter 2: Preliminary"
Counter
=
1
Body
=
"\input{section2/section2}"
}
,
@
{
Job
=
"chapter-03-understanding-rl-in-llm-training"
Title
=
"Chapter 3: Understanding RL in LLM Training"
Counter
=
2
Body
=
"\input{section3/section3}"
}
,
@
{
Job
=
"chapter-04-improved-rl-for-llms"
Title
=
"Chapter 4: Improved RL for LLMs"
Counter
=
3
Body
=
"\input{section4/section4}"
}
,
@
{
Job
=
"chapter-05-rl-for-llm-reasoning"
Title
=
"Chapter 5: RL for LLM Reasoning"
Counter
=
4
Body
=
"\input{section5/section5}"
}
,
@
{
Job
=
"chapter-06-agentic-rl"
Title
=
"Chapter 6: Agentic RL"
Counter
=
5
Body
=
"\input{section6/section6}"
}
,
@
{
Job
=
"chapter-07-multimodal-rl"
Title
=
"Chapter 7: Multimodal RL"
Counter
=
6
Body
=
"\input{section7/section7}"
}
,
@
{
Job
=
"chapter-08-conclusions-and-future-directions"
Title
=
"Chapter 8: Conclusions and Future Directions"
Counter
=
7
Body
=
"\input{section8/section8}"
}
,
@
{
Job
=
"appendix-datasets-and-systems"
Title
=
"Appendix: Datasets and Systems"
Counter
=
$null
Body
=
"\input{appendix/appendix}"
}
)
foreach
(
$chapter
in
$chapters
)
{
$counterLine
=
""
if
(
$null
-ne
$chapter
.Counter
)
{
$counterLine
=
"\setcounter{section}{
$(
$chapter
.Counter
)
}"
}
$tex
=
@
"
$preamble
\title{RL without Tears:\\
$(
$chapter
.Title
)
}
\begin{CJK*}{UTF8}{gbsn}
\maketitle
$counterLine
$(
$chapter
.Body
)
\clearpage
\bibliography{rl-introduction}
\bibliographystyle{rl-introduction}
\end{CJK*}
\end{document}
"
@
$texPath
=
Join-Path
$buildDir
"
$(
$chapter
.Job
)
.tex"
Set-Content
-Path
$texPath
-Value
$tex
-Encoding UTF8
& latexmk -pdf -bibtex -interaction
=
nonstopmode -halt-on-error
`
"-outdir=
$buildDir
"
`
$texPath
$pdfPath
=
Join-Path
$buildDir
"
$(
$chapter
.Job
)
.pdf"
if
(
-not
(
Test-Path
$pdfPath
))
{
throw
"Expected PDF was not generated:
$pdfPath
"
}
Copy-Item
-Path
$pdfPath
-Destination
(
Join-Path
$outDir
"
$(
$chapter
.Job
)
.pdf"
)
-Force
}
Write-Host
"Chapter PDFs written to:
$outDir
"
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论