
現在、LaTeX について学習中です。参考文献については、できるだけシンプルにしておきたいと思いました。試してみたbiblatex
ところうまくいきましたが、スタイルがすべて参考文献の必要なレイアウトに適合しないため、大幅に変更する必要がありました。
そこで、追加パッケージは使用せず、thebibliography
LaTeX に付属するものを使用することにしました。これまでのところ、問題なく動作しています。ドキュメントクラスには KOMA-Script が使用されています。
編集(完全な例):
\documentclass[
12pt,
a4paper,
oneside,
listof=totoc,
pagesize,
parskip,
captions=tableheading,
listof=nochaptergap,
%%fleqn,
numbers=noendperiod,
]{scrreprt}
\usepackage
[
a4paper,
centering,
left=3cm,
right=3cm,
top=2.5cm,
bottom=2.5cm,
headsep=1cm,
%footskip=2.5cm,
]{geometry}
%%Standard
\usepackage{blindtext}
%%Zeilenabstand 1.5 wie bei Word
\usepackage{setspace}
\makeatletter
\newcommand{\MSonehalfspacing}{%
\setstretch{1.44}% default
\ifcase \@ptsize \relax % 10pt
\setstretch {1.448}%
\or % 11pt
\setstretch {1.399}%
\or % 12pt
\setstretch {1.433}%
\fi
}
\makeatother
\MSonehalfspacing
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{lmodern}
\setkomafont{sectioning}{\bfseries}
\usepackage[withpage]{acronym}
\newcommand{\bflabel}[1]{\normalfont{\normalsize{#1}}\hfill}
\renewcommand{\bflabel}[1]{\normalfont{\normalsize{#1}}\hfill}
%Tabellen
\usepackage{booktabs}
\usepackage{tabularx}
%Mathe
\usepackage{amsmath}
%Sonderzeichen
\usepackage{amssymb}
\usepackage[euler]{textgreek}
%Elektrische Zeichnungen
\usepackage{circuitikz}
\usepackage{pgf}
\usepackage{tikz}
%Grafik
\usepackage{graphicx}
\usepackage{float}
\usepackage{subfigure}
%Bildunterschrift
\usepackage[margin=2 cm,font=small,labelfont=bf,]
{caption}
% Listings
\usepackage{listings}
%Zähleranpassung
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\counterwithout{equation}{chapter}
\counterwithout{figure}{part}
\counterwithout{table}{part}
\counterwithout{equation}{part}
%Kopf-/Fußzeile
\usepackage{fancyhdr}
\fancypagestyle{plain}{
\fancyhf{}
\fancyhead[C]{}
\fancyhead[R]{\small \leftmark}
\fancyhead[L]{}
\fancyfoot[L]{\authorOne}
\fancyfoot[R]{\thepage}
\fancyfoot[C]{}
%% Linien in Kopf- und Fußzeile
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
}
\fancypagestyle{framepart}{
\fancyhf{}
\fancyhead[C]{}
\fancyhead[L]{}
\fancyhead[R]{\leftmark}
\fancyfoot[L]{\authorOne}
\fancyfoot[C]{}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\pagenumbering{gobble}
}
\pagestyle{plain}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter. #1}{}}
%Punkte im Inhaltsverzeichnis als Füllobjekte
\usepackage[]{tocstyle}
\usetocstyle{allwithdot}
%Formelverzeichnis:
\usepackage[version-1-compatibility]{siunitx}
\newcommand{\acrou}[1]{\acroextra{\makebox[18mm][l]{\si[per-mode=fraction,fraction=nice]{#1}}}}
%Überschriftformatierung
\usepackage{titlesec}
\titleformat{\chapter}[hang]{\LARGE\bfseries\color{black}}{\thechapter\quad}{0pt}{}
\titleformat{\section}[hang]{\Large\bfseries\color{black}}{\thesection\quad}{0pt}{}
\titleformat{\subsection}[hang]{\large\bfseries\color{black}}{\thesubsection\quad}{0pt}{}
\titleformat{\subsubsection}[hang]{\bfseries\color{black}}{\thesubsubsection\quad}{0pt}{}
%Abstände nach den Überschriften
\titlespacing{\chapter} { 0em} { -8ex} { 0ex}
\titlespacing{\section} { 0em} { 0ex} { -2ex}
\titlespacing{\subsection} { 0em} { 0ex} { -2ex}
\titlespacing{\subsubsection} { 0em} { 0ex} { -2ex}
%%Weiteres
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\usepackage{url}
\usepackage{longtable}
%PDF Einstellungen
\usepackage[%
pdftitle={Info},
pdfauthor={Info},
pdfsubject={Info},
pdfcreator={pdflatex, LaTeX with KOMA-Script},
pdfpagemode=UseOutlines,
pdfdisplaydoctitle=true,
pdflang=de,
]{hyperref}
\begin{document}
This is a test \cite{papula,horowitz}.
\begin{thebibliography}{1}
\bibitem{papula} Papula, Lothar: {\em Mathematik für Ingenieure und Naturwissenschaftler.} Band 3. 3.Aufl., München: Vieweg+Teubner Verlag, 2016
\bibitem{horowitz} Horowitz, Paul \& Hill, Winfield: {\em The Art of Electronics.} 3.Aufl., Cambridge: Cambridge University Press, 2015
\end{thebibliography}
\end{document}
残念ながら、番号とその後の情報の間の水平方向のスペースを増やす方法がわかりません。たとえば、(1)-Papula の代わりに (1)----Papula としたいです。ご助力やアドバイスをいただければ幸いです。
答え1
thebibliography
enumerate
は、上部に糖衣構文が付いた、 とよく似たリストです。したがって、(引用) ラベルと参考文献項目の間のスペースは によって制御されます\labelsep
( のデフォルト値は\labelsep
です0.5em
)。 でこの値を大きくすることもできます\setlength{\labelsep}{1em}
が、これをプリアンブルで行った場合、これはドキュメント内のすべてのリストに適用されます。
を再定義して、独自のthebibliography
を取得すると便利だと思います。\labelsep
\biblabelsep
基本的には、新しい長さを定義し、の適切な場所に\biblabelsep
を追加するだけで十分です。パッチを使用して同じことを実現することは可能 (かつ短く) ですが、 がどのように定義されているかを確認すると役立つかもしれません。\setlength{\labelsep}{\biblabelsep}%
thebibliography
thebibliography
\documentclass[12pt,oneside,pagesize,parskip,]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{lmodern}
\usepackage{hyperref}
\newlength{\biblabelsep}
\setlength{\biblabelsep}{2\labelsep}
\makeatletter
% copied from scrreprt.cls
% we just added the line
% \setlength{\labelsep}{\biblabelsep}%
\renewenvironment{thebibliography}[1]{%
\if@bib@break@
\bib@beginhook
\else
\ifx\bibpreamble\relax\else\ifx\bibpreamble\@empty\else
\setchapterpreamble{\bibpreamble}%
\fi\fi
\bib@heading
\bib@beginhook
\bib@before@hook
\fi
\renewcommand{\BreakBibliography}[1]{%
\@bib@break
\end{thebibliography}%
\begingroup ##1\endgroup
\begin{thebibliography}{#1}
}%
\list{%
\@biblabel{\@arabic\c@enumiv}%
}{%
\setlength{\labelsep}{\biblabelsep}%
\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\@openbib@code
\if@bib@break@
\edef\@tempa{%
\noexpand\usecounter{enumiv}%
\noexpand\setcounter{enumiv}{\the\c@enumiv}%
}\@tempa
\no@bib@break
\else
\usecounter{enumiv}%
\fi
\let\p@enumiv\@empty
\renewcommand*\theenumiv{\@arabic\c@enumiv}%
}%
\sloppy\clubpenalty4000 \widowpenalty4000
\sfcode`\.=\@m
}{%
\if@bib@break@
\def\@noitemerr{%
\@latex@warning{%
\string\BreakBibliography\space at begin of `thebibliography'
environment\MessageBreak
or following \string\BreakBibliography}%
}%
\else
\def\@noitemerr{%
\@latex@warning{%
Empty `thebibliography' environment or
\string\BreakBibliography\MessageBreak
before end of `thebibliography' environment}%
}%
\fi
\endlist
\if@bib@break@
\else
\bib@after@hook
\let\bib@before@hook\@empty
\let\bib@after@hook\@empty
\fi
\bib@endhook
}
\makeatother
\begin{document}
This is a test \cite{papula,horowitz}.
\begin{thebibliography}{1}
\bibitem{papula} Papula, Lothar:
{\em Mathematik für Ingenieure und Naturwissenschaftler.} Band 3.
3.~Aufl., München: Vieweg+Teubner Verlag, 2016
\bibitem{horowitz} Horowitz, Paul \& Hill, Winfield: {\em The Art of Electronics.}
3.~Aufl., Cambridge: Cambridge University Press, 2015
\end{thebibliography}
\end{document}
水平方向のスペースを変更するには
\setlength{\biblabelsep}{2\labelsep}