
색인 제목과 내용 사이에 텍스트를 쓰고 싶습니다. (참고문헌 제목과 내용 사이에도 있음)
텍스트로 제목을 재정의하려고 했지만 너무 보기 흉하기 때문에 더 나은 해결책이 있었으면 좋겠습니다.
감사해요.
답변1
의 성격이 다르기 때문에 bibliography
내 index
답변을 두 부분으로 나누었습니다.
참고문헌 제목과 내용 사이의 텍스트입니다.
이 솔루션은 다음을 기반으로 합니다.반점환경 thebibliography
(패키지를 사용하여etoolbox
및 해당 명령 )을 콘텐츠 앞에 \patchcmd
추가합니다 .Some text
나는 그것에 대한 명령을 만듭니다 \bibpreface{Text before bibliography}
.
다음은 코드 예입니다( .bib
사용 포함 filecontents
).
\documentclass{book}
%---------------------------------
% Database .bib file
\begin{filecontents}{mydatabib.bib}
@book{goossens93,
author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
title = "The Latex Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
@book{lamport94,
author = "Leslie Lamport",
title = "Latex: A Document Preparation System",
year = "1994",
edition = "Second",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
@misc{patashnik88,
author = "Oren Patashnik",
title = "{B}ib{T}e{X}ing. Documentation for General {B}ib{T}e{X} users",
year = "1988",
howpublished = "Electronic document accompanying BibTeX
distribution"
}
\end{filecontents}
%-----------------------------------------
\usepackage{etoolbox}
\newcommand{\bibpreface}[1]{\patchcmd{\thebibliography}{\list}{#1\list}{}{}}
\begin{document}
In \cite{goossens93} we can find information very useful about \LaTeX\ and in \cite{patashnik88} there is important information about \textsc{Bib}\TeX.
\nocite{*}
\bibpreface{Text before of bibliography, and some warnings to take in account when you read the books.}
\bibliographystyle{plain}
\bibliography{mydatabib}
\end{document}
결과의 일부(잘림)
이 접근 방식은 다음에서도 작동합니다 article
.report
클래스.
편집하다
참고문헌을 작성한다면수동으로그럼 이걸로 그냥
\documentclass{book}
\usepackage{etoolbox}
\newcommand{\bibpreface}[1]{\patchcmd{\thebibliography}{\list}{#1\list}{}{}}
\begin{document}
In \cite{goossens93} we can find information very useful about \LaTeX\ and in \cite{patashnik88} there is important information about \textsc{Bib}\TeX.
\nocite{*}
\bibpreface{Text before of bibliography, and some warnings to take in account when you read the books.
This allows change of lines.}
\begin{thebibliography}{1}
\bibitem{goossens93}
Michel Goossens, Frank Mittlebach, and Alexander Samarin.
\newblock {\em The Latex Companion}.
\newblock Addison-Wesley, Reading, Massachusetts, 1993.
\bibitem{lamport94}
Leslie Lamport.
\newblock {\em Latex: A Document Preparation System}.
\newblock Addison-Wesley, Reading, Massachusetts, second edition, 1994.
\bibitem{patashnik88}
Oren Patashnik.
\newblock {B}ib{T}e{X}ing. documentation for general {B}ib{T}e{X} users.
\newblock Electronic document accompanying BibTeX distribution, 1988.
\end{thebibliography}
\end{document}
원하는 결과를 얻을 수 있습니다.
색인 제목과 내용 사이의 텍스트입니다.
내가 명령을 정의한 것과 같은 아이디어를 사용하여 \indexpreamble{Text}
다음과 같이 씁니다.텍스트전체 페이지에 걸쳐 ( index
에 기록되어 있음 을 기억하십시오 twocolumn
)
이 코드만 추가하면 됩니다.~ 전에\makeindex
에 있는 지시 의문서의 서문
\usepackage{etoolbox} %If it doesn't loaded
\newlength{\oldparindent}
\setlength{\oldparindent}{\parindent}
\newcommand{\indexpreamble}[1]{\patchcmd{\theindex}{]}{\setlength{\parindent}{\oldparindent}%
\noindent#1\par\indexspace]}{}{}}
(또는 ) \indexpreamble{...}
바로 앞에 사용하세요 .\printindex
\begin{theindex}
답변2
왜 사용하지 않습니까 biblatex
? 기능이 풍부하고 그다지 복잡하지 않습니다. 나는 이것이 당신이 선택한 패키지가 아니라는 것을 알고 있지만 여기에 제안이 있습니다:
-field prenote
는 귀하의 목적에 맞게 만들어졌습니다(제가 올바르게 이해한 경우).
\documentclass{article}
\usepackage{filecontents}
% suggested bibliography package
\usepackage[indexing = true]{biblatex}
\addbibresource{mydatabib.bib}
\defbibnote{bib-intro}{This is where you put your bibliography prenote.}
% suggested index package
\usepackage{imakeidx}
\makeindex
\begin{filecontents}{mydatabib.bib}
@book{goossens93,
author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
title = "The Latex Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
@misc{patashnik88,
author = "Oren Patashnik",
title = "{B}ib{T}e{X}ing. Documentation for General {B}ib{T}e{X} users",
year = "1988",
howpublished = "Electronic document accompanying BibTeX
distribution"
}
\end{filecontents}
\begin{document}
In \cite{goossens93} we can find information very useful about \LaTeX\ and in \cite{patashnik88} there is important information about \textsc{Bib}\TeX.
% Printing the bibliography
\printbibliography[prenote={bib-intro}]
% Printing the index with a prenote
\indexprologue{%
Index prenote goes here. Lets make it a bit longer just for illustrating the presentation of it.
}
\printindex
\end{document}
나에게 제공:
\printbibliography[prenote={bib-intro}]
사용하려는 미리 노트를 정의하고 앞에 \defbibnote{bib-intro}{<text>}
추가할 텍스트를 정의합니다. 73페이지를 참조하세요.biblatex 문서.
설명 목적으로만 책 대신 기사 문서 클래스를 사용했다는 점에 유의하세요(한 페이지에 모든 내용이 포함된 화면 클립을 찍는 것이 더 쉽습니다).
인덱스를 어떻게 사용하고 어떤 패키지를 사용하고 싶은지 잘 모르겠지만 imakeidx
.
포함함으로써
\usepackage{imakeidx}
\makeindex
서문과 [indexing = true]
biblatex 옵션으로 서지 데이터가 색인화됩니다. 위의 예에 이 설정을 추가하면 다음 색인이 제공됩니다.