
논문을 각주에 참고문헌을 넣어서 썼는데, 논문 말미에 참고문헌으로 정리하고 싶습니다(Lyx 사용).
각주 하나하나를 복사해서 그런 문서에 붙여넣을 수는 있지만 시간이 많이 걸릴 것 같아요.
모든 각주의 내용을 하나의 문서에 자동으로 넣어 참고문헌으로 표시할 수 있도록 구성할 수 있는 방법을 알고 계십니까?
도와 주셔서 정말로 고맙습니다!
답변1
내부 명령을 재정의하여 \@footnotetext
해당 내용을 파일에 쓸 수 있습니다.
다음은 파일에 각주를 쓰는 간단한 솔루션입니다. 여기서 참고문헌 참조로 파일 이름은 file.ftn
다음과 같습니다.file
.tex
\documentclass{article}
\newwrite\footaux
\immediate\openout\footaux\jobname.ftn
\immediate\write\footaux{\string\begin{thebibliography}{99}}
\AtEndDocument{
\immediate\write\footaux{\string\end{thebibliography}}
\closeout\footaux
}
\makeatletter
\let\@footnotetextorig\@footnotetext
\long\def\@footnotetext#1{\@footnotetextorig{#1}\immediate\write\footaux
{\string\bibitem: #1}}
\makeatother
\begin{document}
This is the text\footnote{First footnote}.
\clearpage
This is the text\footnote{Second footnote}.
\end{document}
파일 은 다음과 같습니다 .ftn
.
\begin{thebibliography}{99}
\bibitem: First footnote
\bibitem: Second footnote
\end{thebibliography}
답변2
솔루션 아이디어
\footnote
참고문헌 형식의 파일에 각주 텍스트를 저장하도록 명령을 재정의합니다 .- 마지막에 저장된 참고문헌을 사용하세요.
해결책
\documentclass{article}
\usepackage{lipsum}
\usepackage{url}
\let\originalfootnote\footnote
\newwrite\footnotelist
\immediate\openout\footnotelist\jobname.bls
\immediate\write\footnotelist{\unexpanded{\begin{thebibliography}{99}}}
\def\savefootnote#1{\immediate\write\footnotelist{\unexpanded{\bibitem}{fn\thefootnote}\unexpanded{#1}}}
\def\footnote#1{%
\originalfootnote{#1}%
\savefootnote{#1}}
\AtEndDocument{\immediate\write\footnotelist{\unexpanded{\end{thebibliography}}}%
\immediate\closeout\footnotelist%
\IfFileExists{\jobname.bls}{\input{\jobname.bls}}{\relax}}
\begin{document}
\lipsum[1-10]
Put a footnote here.\footnote{\url{http://www.acm.org}}
\lipsum[11-20]
Put another footnote here.\footnote{\url{http://ieeexplore.ieee.org}}
\lipsum[21-30]
\end{document}
각주 목록 파일 생성
\begin {thebibliography}{99}
\bibitem {fn1}\url {http://www.acm.org}
\bibitem {fn2}\url {http://ieeexplore.ieee.org}
\end {thebibliography}
출력