beamer目录无法编译

发布于 2024-12-08 14:01:25

我使用的是vscode中latexworkshop插件进行编译,编译方式xelatex*2,目录显示不了,目前怀疑是setting.json配置错误。因为使用terminal进行xelatex两次编译可以出结果。
最小工作样例如下

\documentclass{beamer}
\mode<presentation>{
    \usetheme{Madrid}
    }
\usepackage{ctex}

% -------------------------------------------------------------------
% TITLE PAGE
% -------------------------------------------------------------------
\title[About Beamer]{About the Beamer class in presentation making}
\subtitle{A short story}
\author[Arthure, Doe]{A. ~B. ~Arthur\inst{1} \and J. ~Doe\inst{2}}
\institute[VFU]{
    \inst{1}
    Faculty of Physics\\
    Very Famous University
    \and
    \inst{2}
    Faculty of Physics\\
    Very Famous University
}
% \date[VLC 2020]{Very Large Conference, April 2013}

% -------------------------------------------------------------------
% Highlight the title of the current section
% -------------------------------------------------------------------
\AtBeginSection{
    \begin{frame}
        \frametitle{目录}
        \tableofcontents[currentsection]
    \end{frame}
}

\begin{document}
% insert title page
\frame{\titlepage}

% insert contents
\begin{frame}
    \frametitle{目录}
    \tableofcontents
\end{frame}



\section{异构融合信息网络定义}
\begin{frame}
    \frametitle{你才}
    这是一个页面
    \begin{itemize}
        \item 你好
        \item 你好啊
        \item 你好呃呃呃呃
        \item 
    \end{itemize}
\end{frame}

\subsection{123123}
\subsubsection{asdsadf dsf}
\section{2}
\begin{frame}
    \frametitle{你好我是谁}
    \begin{itemize}
        \item<1-> 啊
        \item<2-> 博
        \item<3-> 兹
        \item<4-> 的
    \end{itemize}
\end{frame}
\section{3}
\section{4}


\end{document}

setting.json配置如下,这个代码是在csdn抄的

    "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": "xelatex-shell-escape",
            "command": "xelatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-shell-escape",
                "%DOCFILE%"
            ]
        },
        {
            "name": "pdflatex",
            "command": "pdflatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOCFILE%"
            ]
        },
        {
            "name": "pdflatex-shell-escape",
            "command": "pdflatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-shell-escape",
                "%DOCFILE%"
            ]
        },
        {
            "name": "latexmk",
            "command": "latexmk",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-pdf",
                "-outdir=%OUTDIR%",
                "%DOCFILE%"
            ]
        },
        {
            "name": "latexmk-shell-escape",
            "command": "latexmk",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-pdf",
                "-outdir=%OUTDIR%",
                "-shell-escape",
                "%DOCFILE%"
            ]
        },
        {
            "name": "bibtex",
            "command": "bibtex",
            "args": [
                "%DOCFILE%"
            ]
        },
        {
            "name": "biber",
            "command": "biber",
            "args": [
                "%DOCFILE%"
            ]
        }
    ],
    "latex-workshop.latex.recipes": [
        {
            "name": "XeLaTeX",
            "tools": [
                "xelatex"
            ]
        },
        {
            "name": "XeLaTeX-shell-escape",
            "tools": [
                "xelatex-shell-escape"
            ]
        },
        {
            "name": "PDFLaTeX",
            "tools": [
                "pdflatex"
            ]
        },
        {
            "name": "PDFLaTeX-shell-escape",
            "tools": [
                "pdflatex-shell-escape"
            ]
        },
        {
            "name": "BibTeX",
            "tools": [
                "bibtex"
            ]
        },
        {
            "name": "Biber",
            "tools": [
                "biber"
            ]
        },
        {
            "name": "LaTeXmk",
            "tools": [
                "latexmk"
            ]
        },
        {
            "name": "XeLaTeX -> BibTeX-> XeLaTeX*2",
            "tools": [
                "xelatex",
                "bibtex",
                "xelatex",
                "xelatex"
            ]
        },
        {
            "name": "XeLaTeX-shell-escape -> BibTeX-> XeLaTeX-shell-escape*2",
            "tools": [
                "xelatex-shell-escape",
                "bibtex",
                "xelatex-shell-escape",
                "xelatex-shell-escape"
            ]
        },
        {
            "name": "XeLaTeX -> Biber -> XeLaTeX*2",
            "tools": [
                "xelatex",
                "biber",
                "xelatex",
                "xelatex"
            ]
        },
        {
            "name": "XeLaTeX-shell-escape -> Biber -> XeLaTeX-shell-escape*2",
            "tools": [
                "xelatex-shell-escape",
                "biber",
                "xelatex-shell-escape",
                "xelatex-shell-escape"
            ]
        },
        {
            "name": "PDFLaTeX -> BibTeX -> PDFLaTeX*2",
            "tools": [
                "pdflatex",
                "bibtex",
                "pdflatex",
                "pdflatex"
            ]
        },
        {
            "name": "PDFLaTeX-shell-escape -> BibTeX -> PDFLaTeX-shell-escape*2",
            "tools": [
                "pdflatex-shell-escape",
                "bibtex",
                "pdflatex-shell-escape",
                "pdflatex-shell-escape"
            ]
        },


    ],
    "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"
    ],
    "latex-workshop.latex.autoClean.run": "never",
    "latex-workshop.latex.recipe.default": "lastUsed",
    "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
    // "latex-workshop.view.pdf.viewer": "external",
    "latex-workshop.view.pdf.external.viewer.command": "/Applications/Skim.app/Contents/SharedSupport/displayline",
    "latex-workshop.view.pdf.external.viewer.args": [
        "0",
        "%PDF%"
    ],
    "latex-workshop.view.pdf.external.synctex.command": "/Applications/Skim.app/Contents/SharedSupport/displayline",
    "latex-workshop.view.pdf.external.synctex.args": [
        "-r",
        "-b",
        "%LINE%",
        "%PDF%",
        "%TEX%",
    ],

查看更多

关注者
0
被浏览
147
1 个回答
D·Kris
D·Kris 2024-12-08
这家伙很懒,什么也没写!

问题解决了latex-workshop.latex.tools中缺少"env": {}字段

    "latex-workshop.latex.tools": [
        {
            "name": "xelatex",
            "command": "xelatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOCFILE%"
            ],
            "env": {}
        },

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览