![如何删除文章名称和期刊名称之间的符号并在参考书目中添加新符号?](https://linux22.com/image/442248/%E5%A6%82%E4%BD%95%E5%88%A0%E9%99%A4%E6%96%87%E7%AB%A0%E5%90%8D%E7%A7%B0%E5%92%8C%E6%9C%9F%E5%88%8A%E5%90%8D%E7%A7%B0%E4%B9%8B%E9%97%B4%E7%9A%84%E7%AC%A6%E5%8F%B7%E5%B9%B6%E5%9C%A8%E5%8F%82%E8%80%83%E4%B9%A6%E7%9B%AE%E4%B8%AD%E6%B7%BB%E5%8A%A0%E6%96%B0%E7%AC%A6%E5%8F%B7%EF%BC%9F.png)
我已经在文章名称和期刊名称之间添加了符号“//”,但是我该如何删除点“。”?
我所拥有的:Advani、J. Torok 和 J. Lee。多孔介质中可压缩流体活塞式位移的一般解//。能源资源技术杂志。- 1985 年。- V. 107。- N. 4。- 第 523-526 页。
我想要的:Advani、J. Torok 和 J. Lee。多孔介质中可压缩流体活塞式位移的一般解//能源资源技术杂志。– 1985 年。– V. 107。– N. 4。– 第 523-526 页。
\documentclass[12pt,a4paper]{report}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage[dvips]{graphicx}
\usepackage{graphicx}
\usepackage{graphics}
\usepackage{cite}
\usepackage{graphicx}
\usepackage{geometry}
\usepackage{natbib}
\usepackage{amsmath}
\usepackage{latexsym}
\usepackage{amsfonts}
\usepackage{mathrsfs}
\usepackage{upgreek}
\usepackage{graphics}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{epsfig}
\usepackage{amsbsy}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{color}
\usepackage{setspace}
% Alternative geometry
\usepackage{geometry}
\geometry{left=2.5cm}
\geometry{right=1.cm}
\geometry{top=2cm}
\geometry{bottom=2cm}
\usepackage[
backend=biber,
style=numeric
]{biblatex}
%\usepackage[ngerman]{babel}
%\usepackage[babel, german=quotes]{csquotes}
\renewbibmacro{in:}{}
\ExecuteBibliographyOptions{%
bibencoding=utf8,
bibwarn=true,
sortlocale=de_DE,
isbn=false,
url=false,
doi=false,
eprint=false,
clearlang=true,
maxbibnames=99,
firstinits=true,
sorting=none,
}
\DeclareFieldFormat*{title}{#1 //\space}
%\DeclareDelimFormat[bib]{nametitledelim}{\space //\space}
\DeclareFieldFormat{date}{{#1}}
\DeclareFieldFormat[article,periodical]{number}{{--\addnbspace N.\addnbspace #1}}
\DefineBibliographyStrings{german}{%
page = {{}{}},
pages = {{}{}},
}
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\setunit*{\adddot \addspace \text{--} \addspace}%точка-тире после издателя
\iffieldundef{series}
{}
{\newunit
\printfield{series}%
\setunit{\addspace}}%
\usebibmacro{issue+date}%
\setunit{\adddot\space \text{--}\space \text{V.} }
\usebibmacro{volume+number+eid}%
\setunit{\addcolon\space }%
\usebibmacro{issue}%
\newunit}
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%
\newunit
\printfield{number}%
\newunit
\printfield{eid}%
}
\newbibmacro*{issue+date}{
\iffieldundef{issue}
{\usebibmacro{date}}
{\printfield{issue}%
\setunit*{\addspace}%
\usebibmacro{date}}%
\newunit}
\renewcommand*{\bibpagespunct}{\adddot \space \addperiod \space \text{--}\space }
\addbibresource{mybib.bib}
\begin{document}
Text~
\cite{advani1985general}
\begingroup
\let\itshape\upshape
{\begin{otherlanguage}{english}
\printbibliography
\end{otherlanguage}}
\end{document}
。围兜:
@article{advani1985general,
title={General solutions for pistonlike displacement of compressible fluids in porous media},
author={Advani, SH and Torok, JS and Lee, JK},
journal={Journal of energy resources technology},
volume={107},
number={4},
pages={523--526},
year={1985},
publisher={American Society of Mechanical Engineers}
}
答案1
一般来说,在字段格式声明中包含前导或尾随标点符号并不是一个好主意,例如
\DeclareFieldFormat*{title}{#1 //\space}
在您的示例文档中您发现了主要原因:它会导致不良的标点符号冲突,因为biblatex
不知道您通过字段格式添加了标点符号。
\printunit
解决这个问题的更好方法是在相关的 bibmacro 中添加标点符号。
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=numeric]{biblatex}
\DeclareFieldFormat*{title}{#1}
\renewbibmacro*{title}{%
\ifboolexpr{
test {\iffieldundef{title}}
and
test {\iffieldundef{subtitle}}
}
{}
{\printtext[title]{%
\printfield[titlecase]{title}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{subtitle}}%
\newunit}%
\printfield{titleaddon}%
\printunit{\addspace//\space}}
\renewbibmacro{in:}{}
\begin{filecontents}{\jobname.bib}
@article{advani1985general,
title = {General Solutions for Pistonlike Displacement
of Compressible Fluids in Porous Media},
author = {Advani, S. H. and Torok, J. S. and Lee, J. K.},
journal = {Journal of Energy Resources Technology},
volume = {107},
number = {4},
pages = {523--526},
year = {1985},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem \autocite{sigfridsson,advani1985general}
\printbibliography
\end{document}
综上所述,您想要的样式与 GOST 7.0.5-2008 极其相似。因此,我强烈建议您查看biblatex-gost
的style=gost-numeric,
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=gost-numeric]{biblatex}
\begin{filecontents}{\jobname.bib}
@article{advani1985general,
title = {General Solutions for Pistonlike Displacement
of Compressible Fluids in Porous Media},
author = {Advani, S. H. and Torok, J. S. and Lee, J. K.},
journal = {Journal of Energy Resources Technology},
volume = {107},
number = {4},
pages = {523--526},
year = {1985},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem \autocite{sigfridsson,advani1985general}
\printbibliography
\end{document}