使用latex撰写实验报告
各位亲爱的CQUPTers,是否还因为写实验报告而感到枯燥?还在为word排版而感到苦恼吗?快来试试用latex排版实验报告吧! 学会latex益处良多,大到毕业论文、竞赛论文,小到个人简历、日常作业笔记,都能轻松应对。学会使用latex不仅不需要担心格式问题,漂亮的格式也能让文章更加加分。
效果图
首先上结论。成果展示,有图有真相。
使用latex排版出来的报告公式精美,代码格式优雅,图片与正文交叉引用。
如果大家有需要的话,未来我也可以开源部分报告的latex源码,供大家参考学习。
需要具备哪些东西/能力?
-
step 1) Latex环境安装——texlive清华镜像源下载安装即可。
-
step 2) 舒适的latex开发环境——使用Vscode(Texstudio也可以,但是没有VScode那么丰富的插件库),下载安装LaTex Workshop插件。
-
step 3 ) 设置Vscode用户配置文件(User Settings(JSON))——网上的教程有很多坑,文末会附上我的配置文件供大家参考。我的配置文件是在我的电脑上完全能work,大家用的时候需要看清注释修改几个路径。
-
step 4 ) 从一个好用的模板开始学起latex基本语法——推荐从我编写的CQUPT_Courese_Report用起(王婆卖瓜)
鉴于以上每一个步骤,根据关键词网上一搜就是一大把教程,我就不重复赘述了。所以还请大家自行搜索。
我更多的会关注具体使用过程中的小技巧,整理整理日后继续分享。
以上操作一天即可顺利入门latex用于撰写实验报告,接下来便是不断地尝试和探索更加丰富和优美的排版了。
推荐必备工具:公式编辑器(Axmath、Mathtype等)、表格转latex(excel2latex)、Vscode插件(easy snippet)、各路AI工具等。
VScode配置文件
{
"liveServer.settings.donotVerifyTags": true,
"liveServer.settings.donotShowInfoMsg": true,
"explorer.confirmDelete": false,
"files.autoSave": "afterDelay",
"explorer.confirmDragAndDrop": false,
"latex-workshop.showContextMenu": true,
"latex-workshop.intellisense.package.enabled": true,
"latex-workshop.message.error.show": false,
"latex-workshop.message.warning.show": false,
"latex-workshop.latex.tools": [
{
"name": "xelatex",
"command": "xelatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "pdflatex",
"command": "pdflatex",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
]
},
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"-pdf",
"-outdir=%OUTDIR%",
"%DOCFILE%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOCFILE%"
]
}
],
"latex-workshop.latex.recipes": [
{
"name": "XeLaTeX",
"tools": [
"xelatex"
]
},
{
"name": "XeLaTeX -> XeLaTeX",
"tools": [
"xelatex",
"xelatex"
]
},
{
"name": "PDFLaTeX",
"tools": [
"pdflatex"
]
},
{
"name": "BibTeX",
"tools": [
"bibtex"
]
},
{
"name": "LaTeXmk",
"tools": [
"latexmk"
]
},
{
"name": "xelatex -> bibtex -> xelatex*2",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
},
{
"name": "pdflatex -> bibtex -> pdflatex*2",
"tools": [
"pdflatex",
"bibtex",
"pdflatex",
"pdflatex"
]
},
],
"workbench.colorTheme": "Default Light Modern",
"tabnine.experimentalAutoImports": true,
"files.autoSaveDelay": 30000,
"workbench.editorAssociations": {
"{git,gitlens}:/**/*.{md,csv,svg}": "default",
"file:/**/*.xlsx": "jupyter-data-wrangler",
"file:/**/*.csv": "jupyter-data-wrangler",
"*.pdf": "cweijan.officeViewer"
},
"vscode-office.editorTheme": "Light",
"jupyter.interactiveWindow.creationMode": "perFile",
// latex-workshop设置
"latex-workshop.latex.autoClean.run": "onBuilt", //删除中间过程文件
"latex-workshop.latex.autoBuild.run": "onSave",
"latex-workshop.view.pdf.ref.viewer":"external", //外部PDF设置
"latex-workshop.view.pdf.external.viewer.command": "C:/Program Files/SumatraPDF.exe",
"latex-workshop.view.pdf.external.viewer.args": ["%PDF%"],
"latex-workshop.view.pdf.external.synctex.command":"C:/Program Files/SumatraPDF.exe", //定位
"latex-workshop.view.pdf.external.synctex.args":[
"-forward-search",
"%TEX%",
"%LINE%",
"-reuse-instance",
"-inverse-search",
"code \"D:VScode/Microsoft VS Coderesources/app/out/cli.js\" -r -g \"%f:%l\"", // 注意修改路径
"%PDF%"
],
"editor.wordWrap": "on",
"python.createEnvironment.trigger": "off",
}
实验模板链接
Su-anAcid/CQUPT-Course-Report: CQUPT的实验报告(正文)latex模板 (github.com)
【免费】CQUPT-Course-Report资源-CSDN文库