LaTeX 笔记

编译,可对其设置快捷键,设置快捷键

设置、键盘快捷方式、recipe、将快捷键设置为Ctrl+Alt+R(任意)

选中tex文件的代码页面(若未选中,则无法进行编译),然后按下该快捷键,在编辑器页面上端进行编译链选择

开始编译文件。 由于进行测试的文件中涉及参考文献的引用(.bib的编译),故而选择xelatex -> bibtex -> xelatex*2编译链

选中 tex 文件中任意的代码,然后按Ctrl+Alt+V,出现编译好的 pdf 页面

现在编译的结果为内部查看器查看

正向同步测试,即从代码定位到 pdf 页面相应位置

选中需要跳转的代码所在行,按Ctrl+Alt+J,右侧就会跳转到相应行。这里的快捷键为默认设置,可自行通过上文方式设置为您想要的快捷键

反向同步测试,即从 pdf 页面定位到代码相应位置

在编译生成的 pdf 上,选中想要跳转行,鼠标左键双击ctrl+鼠标左键单击,跳转到对应代码。此处快捷键的选择为上文设置。

————————————————————————————————————

F1 进入json文件,把下面的代码放进去,保存!

编译Ctrl+Alt+R、正(Ctrl+Alt+V(tex代码页面))反(PDF页面双击)搜索即可!

{
 //------------------------------LaTeX 配置----------------------------------
    // 设置是否自动编译
    "latex-workshop.latex.autoBuild.run":"never",
    //右键菜单
    "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": "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"
            ]
        }
    ],
    //文件清理。此属性必须是字符串数组
    "latex-workshop.latex.clean.fileTypes": [
        "*.aux",
        "*.bbl",
        "*.blg",
        "*.idx",
        "*.ind",
        "*.lof",
        "*.lot",
        "*.out",
        "*.toc",
        "*.acn",
        "*.acr",
        "*.alg",
        "*.glg",
        "*.glo",
        "*.gls",
        "*.ist",
        "*.fls",
        "*.log",
        "*.fdb_latexmk"
    ],
    //设置为onFaild 在构建失败后清除辅助文件
    "latex-workshop.latex.autoClean.run": "onFailed",
    // 使用上次的recipe编译组合
    "latex-workshop.latex.recipe.default": "lastUsed",
    // 用于反向同步的内部查看器的键绑定。ctrl/cmd +点击(默认)或双击
    "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",



    //使用 SumatraPDF 预览编译好的PDF文件
    // 设置VScode内部查看生成的pdf文件
    "latex-workshop.view.pdf.viewer": "external",
    // PDF查看器用于在\ref上的[View on PDF]链接
    "latex-workshop.view.pdf.ref.viewer":"auto",
    // 使用外部查看器时要执行的命令。此功能不受官方支持。
    "latex-workshop.view.pdf.external.viewer.command": "F:/SumatraPDF/SumatraPDF.exe", // 注意修改路径
    // 使用外部查看器时,latex-workshop.view.pdf.external.view .command的参数。此功能不受官方支持。%PDF%是用于生成PDF文件的绝对路径的占位符。
    "latex-workshop.view.pdf.external.viewer.args": [
        "%PDF%"
    ],
    // 将synctex转发到外部查看器时要执行的命令。此功能不受官方支持。
    "latex-workshop.view.pdf.external.synctex.command": "F:/SumatraPDF/SumatraPDF.exe", // 注意修改路径
    // latex-workshop.view.pdf.external.synctex的参数。当同步到外部查看器时。%LINE%是行号,%PDF%是生成PDF文件的绝对路径的占位符,%TEX%是触发syncTeX的扩展名为.tex的LaTeX文件路径。
    "latex-workshop.view.pdf.external.synctex.args": [
        "-forward-search",
        "%TEX%",
        "%LINE%",
        "-reuse-instance",
        "-inverse-search",
        "\"F:/Microsoft VS Code/Code.exe\" \"F:/Microsoft VS Code/resources/app/out/cli.js\" -r -g \"%f:%l\"", // 注意修改路径
        "%PDF%"
    ]
}

————————————————————————————————

{
    //------------------------------LaTeX 配置----------------------------------
       // 设置是否自动编译
       "latex-workshop.latex.autoBuild.run":"never",
       //右键菜单
       "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": "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"
               ]
           }
       ],
       //文件清理。此属性必须是字符串数组
       "latex-workshop.latex.clean.fileTypes": [
           "*.aux",
           "*.bbl",
           "*.blg",
           "*.idx",
           "*.ind",
           "*.lof",
           "*.lot",
           "*.out",
           "*.toc",
           "*.acn",
           "*.acr",
           "*.alg",
           "*.glg",
           "*.glo",
           "*.gls",
           "*.ist",
           "*.fls",
           "*.log",
           "*.fdb_latexmk"
       ],
       //设置为onFaild 在构建失败后清除辅助文件
       "latex-workshop.latex.autoClean.run": "onFailed",
       // 使用上次的recipe编译组合
       "latex-workshop.latex.recipe.default": "lastUsed",
       // 用于反向同步的内部查看器的键绑定。ctrl/cmd +点击(默认)或双击
       "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
    
    
    
       //使用 SumatraPDF 预览编译好的PDF文件
       // 设置VScode内部查看生成的pdf文件
       "latex-workshop.view.pdf.viewer": "external",
       // PDF查看器用于在\ref上的[View on PDF]链接
       "latex-workshop.view.pdf.ref.viewer":"auto",
       // 使用外部查看器时要执行的命令。此功能不受官方支持。 
       "latex-workshop.view.pdf.external.viewer.command": "D:/other apps/SmartPDF/SumatraPDF/SumatraPDF.exe", // 注意修改路径   "D:\other apps\SmartPDF\SumatraPDF\SumatraPDF.exe"
       // 使用外部查看器时,latex-workshop.view.pdf.external.view .command的参数。此功能不受官方支持。%PDF%是用于生成PDF文件的绝对路径的占位符。
       "latex-workshop.view.pdf.external.viewer.args": [
           "%PDF%"
       ],
       // 将synctex转发到外部查看器时要执行的命令。此功能不受官方支持。
       "latex-workshop.view.pdf.external.synctex.command": "D:/other apps/SmartPDF/SumatraPDF/SumatraPDF.exe", // 注意修改路径
       // latex-workshop.view.pdf.external.synctex的参数。当同步到外部查看器时。%LINE%是行号,%PDF%是生成PDF文件的绝对路径的占位符,%TEX%是触发syncTeX的扩展名为.tex的LaTeX文件路径。
       "latex-workshop.view.pdf.external.synctex.args": [
           "-forward-search",
           "%TEX%",
           "%LINE%",
           "-reuse-instance",
           "-inverse-search",    // "D:\VS code\Microsoft VS Code\Code.exe"
           "\"D:/VS code/Microsoft VS Code/Code.exe\" \"D:/VS code/Microsoft VS Code/resources/app/out/cli.js\" -r -g \"%f:%l\"", // 注意修改路径 
           "%PDF%"
       ]
   }

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
LaTeX 康奈尔笔记是一种常用的笔记格式,它基于LaTeX排版系统,并使用了特定的模板和布局来创建结构化的笔记。康奈尔笔记的特点是分栏式布局,左侧列用于记录主要的概念和问题,右侧列用于记录详细的解答和补充说明。 要创建康奈尔笔记,你可以按照以下步骤进行操作: 1. 安装LaTeX:首先,你需要安装LaTeX排版系统。根据你使用的操作系统不同,可以选择安装MiKTeX(Windows)、TeX Live(Linux)或MacTeX(Mac)等。 2. 导入康奈尔笔记模板:在LaTeX,有很多现成的康奈尔笔记模板可供使用。你可以在GitHub等网站上搜索并下载合适的模板。 3. 编辑笔记内容:使用LaTeX编辑器(如TeXstudio、Overleaf等),打开康奈尔笔记模板文件,并根据你的需求编辑其的内容。通常,模板文件会提供示例内容和注释,你可以根据需要进行修改或删除。 4. 添加主要概念和问题:在左侧列添加主要的概念和问题。这些内容通常用于记录讲义或课堂讲解的重点内容。 5. 添加详细解答:在右侧列添加详细的解答和补充说明。这部分内容可以包括例题、证明过程、思考题的答案等。 6. 编译生成PDF:保存并编译LaTeX源文件,生成PDF格式的康奈尔笔记。 以上是创建LaTeX康奈尔笔记的基本步骤。你可以根据自己的需求和喜好进行进一步的个性化设置和调整。希望对你有所帮助!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值