我有这样的事情:
Section 1
...
Section 2
...
Section 3
Subsection 3.1
...
Section 4
...
Run Code Online (Sandbox Code Playgroud)
我希望有这样的事情:
Section 1
...
Section 2
...
Section A
Subsection A.1
...
Section 4
...
Run Code Online (Sandbox Code Playgroud)
换句话说 - 将一个部分编号更改为其他部分3 == A我需要这个用于我的论文,这是在文章课上写的,当我试图添加附录时,hyperref包破了,并且"链接"到第1部分指向附录一个
编辑:我在描述问题时犯了一个错误,我的意思是目录不起作用,因为LaTeX生成代码(*.toc文件):
\contentsline {section}{\numberline {1}}{1}{section.1}
\contentsline {section}{\numberline {2}}{1}{section.2}
\contentsline {section}{\numberline {A}}{1}{section.1}
Run Code Online (Sandbox Code Playgroud) 我有以下用于发出 POST 请求的代码。我对这里的错误处理不是 100% 确定,但对我来说,当请求不成功时获取正文很重要。
我仍然遇到的一个问题是 - 如果服务器响应 200 OK 但无效 json - 我可以记录该有效负载吗?Fetch 的正确记录方式是什么?
Fetch(data.notificationUrl, {
method: 'POST',
body: post_data,
headers: {
'Content-Type': 'application/json'
}
}).then((res) => {
if (!res.ok) {
// Could reject the promise here but than response text wouldn't be available
//return Promise.reject(`Response was not OK. Status code: ${res.status} text: ${res.statusText}`);
return res.text().then((txt) => `Response was not OK. Status code: ${res.status} text: ${res.statusText}.\nResponse: ${txt}`);
}
// response ok so we should return json, could follow https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch …Run Code Online (Sandbox Code Playgroud)