啸行
啸行
这家伙很懒,什么也没写!

注册于 5年前

回答
127
文章
4
关注者
18

chp03.tex 开始处加了一句 \renewcommand{\thesection}{\thechapter.\arabic{section}}
image.png

我将你的 tex 文件改名为 mwe.tex 并将其放入文件夹中。
接下来,在不改变你的文件的前提下,在命令行中分别执行

latexmk -pdf mwe
makeindex mwe.nlo -s nomencl.ist -o mwe.nls
pdflatex mwe

就出现了想要的结果。
image.png

  "latex-workshop.latex.tools": [
    {
      "name": "latexmkpdf",
      "command": "latexmk",
      "args": [
        "-synctex=1",
        "-interaction=nonstopmode",
        "-halt-on-error",
        "-file-line-error",
        "-pdf",
        "%DOCFILE%"
      ]
    },
    {
        "name": "latexmkxe",
        "command": "latexmk",
        "args": [
          "-synctex=1",
          "-interaction=nonstopmode",
          "-halt-on-error",
          "-file-line-error",
          "-pdfxe",
          "%DOCFILE%"
        ]
      },
  ],
  "latex-workshop.latex.recipes": [
    {
      "name": "latexmkpdf",
      "tools": [
        "latexmkpdf"
      ]
    },
    {
        "name": "latexmkxe",
        "tools": [
          "latexmkxe"
        ]
      },
  ],
  "latex-workshop.latex.autoBuild.run": "never",
  // "latex-workshop.view.pdf.viewer": "tab"
  "latex-workshop.view.pdf.viewer": "external",
  "latex-workshop.view.pdf.ref.viewer": "external",
  "latex-workshop.view.pdf.external.viewer.command": "<SumatraPDFROOT>/SumatraPDF.exe",
  "latex-workshop.view.pdf.external.viewer.args": [
    "-inverse-search",
    "\"<VSCodeROOT>/bin/code.cmd\" -r -g \"%f:%l\"",
    "%PDF%"
  ],
  "latex-workshop.view.pdf.external.synctex.command":"<SumatraPDFROOT>/SumatraPDF.exe",
  "latex-workshop.view.pdf.external.synctex.args":[
    "-forward-search",
    "%TEX%",
    "%LINE%",
    "%PDF%",
  ],

实际配置时,
用户需要结合自身安装情况更换 <SumatraPDFROOT><VSCodeROOT>,
即 SumatraPDF 和 VS Code 各自的安装路径.

这个代码看得有点累。看起来像自己想做模板,可是思维好像不是 latex 的。
目前我仅能看出来的问题是 \usepackage{amsrefs}\usepackage{cite} 应该和 \usepackage{gbt7714} 互相矛盾,所以建议你删除其中的两个。
然而在我这样删除之后,\citet 命令会报错,我查了 aux 文件,感觉是和前面的一些设置相关。
请恕我实在没有精力细细检查,一旦细细检查,那还不如重做模板了。

我个人会先推荐你在命令行查下环境变量,比如 cmd 里执行

echo %path:;=&echo.%

看一下返回结果中有没有 system32 和 texlive 的相关内容。
如果有,那继续在 texstudio 中 restore default settings,恢复到默认设置,然后 check latex installation,如果它反馈正常,那么大概率你可以用了。

+_+ 请允许我用颜文字表达内心的真实感受。你看看别人怎么提交最小工作示例的,尤其是回答的人。学会用代码块,否则复制粘贴代码容易出问题。

套个盒子吧。

\documentclass{ctexart}
\usepackage{xcolor}
\usepackage{xeCJKfntef}
\newcommand{\ans}[1]{\CJKunderline[hidden=false, skip=true, thickness=1pt]{\mbox{\textcolor{cyan}{#1}}}}

\begin{document}
  这就是\ans{答案答案答案答案答案答案答案答案}。
\end{document}

The optional argument inner-pos controls the placement of content inside the parbox.

Its default is the value of position.

Its possible values are: t to put the content at the top of the box, c to put it in the vertical center, b to put it at the bottom of the box, and s to stretch it out vertically (for this, the text must contain vertically stretchable space).

我觉得这段话的描述应该是准确的。

把目录清空之后,用命令行来安装

嗯……尝试用纯粹的命令行安装吧。install-latex-guide-zh-cn有方法

查了一下,在 cas-comman.sty 中,有这样的代码

\cs_new:Npn \__make_tbl_caption:nn #1#2
{
  \l_tbl_align_tl
  \skip_vertical:N \l_tbl_abovecap_skip 
  {\parbox{ \dimexpr(\l_tbl_width_dim)}
    {\rightskip=0pt\sffamily\small\textbf{\color{scolor}#1}\par#2\par\vskip4pt }}
  \skip_vertical:N \l_tbl_belowcap_skip
}

这大约就是对表格 caption 的设置。你如果有这样的需求,可以用 caption 包把 longtable 的 caption 样式改成类似的

默认安装 TeX Live 的话,应该可以直接用。另外,你在命令行中执行

tlmgr info array

系统会回复

tlmgr.pl: cannot find package array

由此可见,array 并不是单独的包

首先,我默认你用了 pdflatex 来编译。
其次,我觉得投稿模板不等于刊行模板,所以经常会有不一样的事情发生。
最后,希望提供最小工作示例。

发布
问题