我是这个论坛的新手,我查看了所有我认为可能有类似主题的文章。但我的问题仍然悬而未决。也许是因为我的 LaTeX 技能不是最好的。
话题:
我正在写一篇论文,我的研究所告诉我如何对引用进行格式化(通常我们必须使用 MS Word,所以我很高兴我被允许使用 LaTeX 写作)。但是如果我们写一些东西,它应该是这样的:
乳胶:
Text, text, text, text, text, text, text, text. [EINS43]
BibTeX/Biber:
Author={Einstein},
Year={1943},
通常如果我编译我的文件它看起来像:
Text, text, text, text, text, text, text, text. [Ein43]
我怎样才能改变括号的内容?
在结束这个问题之前,我必须补充一些内容。我还使用 DIN 或 ISO 等标准。这些必须看起来像:
Text, text, text, text, text, text, text, text. [ISO03]
总结一下我需要的一切:更改括号的内容(我用户比贝尔对于我的文献)从 3 个字母变为 4 个大写字母;但是当我有一个规范时,它将显示为 3 个大写字母。在我的 bib 中,我也使用我喜欢的键。也许有可能将文档中的引用键更改为输入键?
感谢您的帮助!
这是我的 MWE:
乳胶:
\documentclass[listof=totocnumbered, listof=nochaptergap, bibliography=totocnumbered, parskip, captions=nooneline, fontsize=11pt, twoside=semi, numbers=noenddot, open=right, draft=false, a4paper, footinclude=false, fleqn]{scrreprt}
\usepackage[backend=biber, style=alphabetic, isbn=false, url=false, firstinits=true]{biblatex}
\newcommand{\zitat}[2][]{\nopagebreak\nolinebreak\mbox{\cite[][#1]{#2}}}
%----------------------------------------------------------------
% Also I found that (but I think thats from the template to change the appearance of the Bibliography, and has nothing to do with cite-keys):
\addbibresource{MWE.bib}
\renewcommand{\bibfont}{\sffamily}
\renewcommand{\bibsetup}{\upshape}
\DeclareFieldFormat{title}{#1}
\renewcommand{\multinamedelim}{\addsemicolon\addspace}
\renewcommand{\finalnamedelim}{\addsemicolon\addspace}
\renewcommand*{\labelnamepunct}{\addcolon\addspace}
\DeclareNameAlias{default}{last-first}
\renewbibmacro*{in:}{%
\iffieldundef{maintitle}
{}
{\printtext{%
\intitlepunct}}}
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{%
\printnames[byeditor]{editor}%
\setunit{\addspace}%
\usebibmacro{byeditor+othersstrg}
\clearname{editor}%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}
}
\AtEveryBibitem{\clearfield{language}}
\renewcommand{\finentrypunct}{}
\DefineBibliographyStrings{ngerman}{%
editor = {(Hrsg.).},
editors = {(Hrsg.).},
byeditor = {(Hrsg.).},
editor = {(Hrsg.).}}
%----------------------------------------------------------------
\begin{document}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. \zitat[S. 165-166]{ROOS15}\\
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\zitat{ZENK10}\\
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\zitat{DIN05}\\
\printbibliography
\end{document}
比伯(MWE.bib):
@conference{DIN05,
Author = {{Normenausschuss Materialpr{\"u}fung im DIN}},
Booktitle = {Norm DIN EN ISO 6507 Teil 1},
Date-Added = {2015-07-01 16:33:02 +0000},
Date-Modified = {2015-07-03 03:23:48 +0000},
Keywords = {DIN, Vickers, H{\"a}rtepr{\"u}fung},
Title = {Metallische Werkstoffe - H{\"a}rtepr{\"u}fung nach Vickers - Teil 1: Pr{\"u}fverfahren},
Year = {2005}}
@book{ZENK10,
Address = {Germany},
Author = {Zenker, R.; Buchwalder, A.},
Date-Added = {2015-05-29 21:10:31 +0000},
Date-Modified = {2015-06-21 04:52:47 +0000},
Keywords = {EBH, Pro-beam},
Publisher = {pro-beam AG \& Co. KGaA},
Subtitle = {Innovative Technologien f{\"u}r h{\"o}chste industrielle Anspr{\"u}che},
Title = {Elektronenstrahlrandschichtbehandlung},
Year = {2010}}
@book{ROOS15,
Address = {Stuttgart},
Annote = {S. 179
6.4.2.9 Randschichth{\"a}rten},
Author = {Roos, E.; Maile, K.},
Date-Added = {2015-05-13 19:05:21 +0000},
Date-Modified = {2015-06-21 21:35:57 +0000},
Isbn = {978-3-642-54989-2},
Publisher = {Springer Vieweg},
Subtitle = {Grundlagen, Anwendung, Pr{\"u}fung},
Title = {Werkstoffkunde f{\"u}r Ingenieure},
Year = {2015}}
答案1
看来您想使用您的条目名称作为标签。
为此,只需将以下几行添加到您的序言中:
\DeclareLabelalphaTemplate{%
\labelelement{%
\field{citekey}
}
}
通过这种方式,您声明为您的条目生成的标签与您的条目名称(伪字段)相同citekey
。
梅威瑟:
\documentclass[listof=totocnumbered, listof=nochaptergap, bibliography=totocnumbered, parskip, captions=nooneline, fontsize=11pt, twoside=semi, numbers=noenddot, open=right, draft=false, a4paper, footinclude=false, fleqn]{scrreprt}
\usepackage[backend=biber, style=alphabetic, isbn=false, url=false, firstinits=true]{biblatex}
\newcommand{\zitat}[2][]{\nopagebreak\nolinebreak\mbox{\cite[][#1]{#2}}}
\DeclareLabelalphaTemplate{%
\labelelement{%
\field{citekey}
}
}
%----------------------------------------------------------------
% Also I found that (but I think thats from the template to change the appearance of the Bibliography, and has nothing to do with cite-keys):
\addbibresource{MWE.bib}
\renewcommand{\bibfont}{\sffamily}
\renewcommand{\bibsetup}{\upshape}
\DeclareFieldFormat{title}{#1}
\renewcommand{\multinamedelim}{\addsemicolon\addspace}
\renewcommand{\finalnamedelim}{\addsemicolon\addspace}
\renewcommand*{\labelnamepunct}{\addcolon\addspace}
\DeclareNameAlias{default}{last-first}
\renewbibmacro*{in:}{%
\iffieldundef{maintitle}
{}
{\printtext{%
\intitlepunct}}}
\renewbibmacro*{byeditor+others}{%
\ifnameundef{editor}
{}
{%
\printnames[byeditor]{editor}%
\setunit{\addspace}%
\usebibmacro{byeditor+othersstrg}
\clearname{editor}%
\newunit}%
\usebibmacro{byeditorx}%
\usebibmacro{bytranslator+others}
}
\AtEveryBibitem{\clearfield{language}}
\renewcommand{\finentrypunct}{}
\DefineBibliographyStrings{ngerman}{%
editor = {(Hrsg.).},
editors = {(Hrsg.).},
byeditor = {(Hrsg.).},
editor = {(Hrsg.).}}
%----------------------------------------------------------------
\begin{document}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. \zitat[S. 165-166]{ROOS15}\\
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\zitat{ZENK10}\\
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\zitat{DIN05}\\
\printbibliography
\end{document}
输出:
附注:如果你的文件是 utf8 编码的,则添加以下行
\usepackage[utf8]{inputenc}
在您的.tex
文档中,您将能够{\"o}
用和文件ö
中的简单内容替换类似内容。.tex
.bib