![[1,3-7] 형식의 인용 설명](https://rvso.com/image/421147/%5B1%2C3-7%5D%20%ED%98%95%EC%8B%9D%EC%9D%98%20%EC%9D%B8%EC%9A%A9%20%EC%84%A4%EB%AA%85.png)
일부 참조가 연속적일 때 제목에 있는 것과 같이 인용을 얻는 방법(예: 코드)
\cite{ref1,ref3-ref7}
작동하지 않습니다. 그러나 나는 이것을 많은 신문에서 본다.
그것을 할 수 있는 간단한 방법이 있나요?
다음과 같은 간단한 코드를 사용하고 있다고 가정해 보겠습니다.
\documentclass{article}
\begin{document}
\cite{a, d,e,f,g,h}
\begin{thebibliography}{99}
\bibitem{a} Ref1
\bibitem{b} Ref2
\bibitem{d} Ref3
\bibitem{e} Ref4
\bibitem{f} Ref5
\bibitem{g} Ref6
\bibitem{h} Ref7
\end{thebibliography}
\end{document}
그런 다음 \cite{a, d,e,f,g,h}
[1,3,4,5,6,7]을 제공합니다.
답변1
설계상, bib 파일의 항목 순서는 의미가 없습니다. 그러므로,
\cite{ref1,ref3-ref7}
가지다아무 기회도 없어일하는 중. 실제로 BibTeX는 ref3-ref7
bib 파일에서 키가 포함된 항목을 찾을 수 없다는 경고를 표시합니다.
패키지 cite
는 단일 \cite
명령에 여러 인수를 허용하고 정렬 및 압축을 수행합니다(그러지 않도록 지시하지 않는 한). 패키지 cite
가 로드되면
\cite{ref1,ref3,ref4,ref5,ref6,ref7}
실제로 생성됩니다
[1, 3--7]
ref2
항목이 문서 어딘가에 인용되어 있는 한 . (분명히 이 간단한 예가 작동하려면 ref1
through가 ref7
조판된 참고문헌의 순서대로 정렬될 것이라고 가정해야 합니다.)
\documentclass{article}
\begin{filecontents*}[overwrite]{mybib.bib}
@misc{a,author="A",title="Thoughts",year=3001}
@misc{b,author="B",title="Thoughts",year=3002}
@misc{c,author="C",title="Thoughts",year=3003}
@misc{d,author="D",title="Thoughts",year=3004}
@misc{e,author="E",title="Thoughts",year=3005}
@misc{f,author="F",title="Thoughts",year=3006}
@misc{g,author="G",title="Thoughts",year=3007}
\end{filecontents*}
\usepackage{cite}
\bibliographystyle{plain}
\begin{document}
\cite{b}
\cite{a,c,d,e,f,g}
\bibliography{mybib}
\end{document}