更改两个参考文献列表

更改两个参考文献列表

我开始写一个有特殊要求和结构的作品,我无法改变。我有几个文件,它们相互关联。主要文件是:“概要”,对我的问题来说最重要的文件是“biblatex”。在“biblatex”中,我们输入 biblatex + biber 环境。

我得到以下

在此处输入图片描述

在此处输入图片描述

但我需要三个参考文献列表,第一个以 1.、2.、3.、... 开头,第二个和第三个我们有共同的编号,以 A1.、A2.、A3.、... 开头。

当然,在文本中,第二个编号的数字必须是 [A1], [A2], ...

在此处输入图片描述

在此处输入图片描述

主文件synopsis.tex

%&preformat-synopsis
\RequirePackage[l2tabu,orthodox]{nag} % Раскомментировав, можно в логе получать рекомендации относительно правильного использования пакетов и предупреждения об устаревших и нерекомендуемых пакетах
\PassOptionsToPackage{bookmarks=false}{hyperref}
\documentclass[a5paper,10pt,twoside,openany,article]{memoir} %,draft

\input{common/setup}          % общие настройки шаблона
\input{common/packages}       % Пакеты общие для диссертации и автореферата
\synopsistrue                 % Этот документ --- автореферат
\input{Synopsis/synpackages}  % Пакеты для автореферата
\input{Synopsis/userpackages} % Пакеты для специфических пользовательских задач

\input{common/newnames}       % Новые переменные, которые могут использоваться во всём проекте
\input{Synopsis/setup}        % Упрощённые настройки шаблона 

\input{common/data}           % Основные сведения
\input{common/fonts}          % Определение шрифтов (частичное)
\input{common/styles}         % Стили общие для диссертации и автореферата
\input{Synopsis/synstyles}    % Стили для автореферата
\input{Synopsis/userstyles}   % Стили для специфических пользовательских задач

%%% Библиография. Выбор движка для реализации %%%
\ifnumequal{\value{bibliosel}}{0}{%
    \input{biblio/predefined} % Встроенная реализация с загрузкой файла через движок bibtex8
}{
    \input{biblio/biblatex}   % Реализация пакетом biblatex через движок biber
}

\begin{document}

%\input{Synopsis/title}        % Титульный лист
%\mainmatter                   % В том числе начинает нумерацию страниц арабскими цифрами с единицы
\mainmatter*                  % Нумерация страниц не изменится, но начнётся с новой страницы
\input{Synopsis/content}      % Содержание автореферата

\end{document}

文件biblatex.tex

%%% Реализация библиографии пакетами biblatex и biblatex-gost с использованием движка biber %%%

\usepackage{csquotes} % biblatex рекомендует его подключать. Пакет для оформления сложных блоков цитирования.
%%% Загрузка пакета с основными настройками %%%
\makeatletter
\ifnumequal{\value{draft}}{0}{% Чистовик
    \usepackage[%
    backend=biber,% движок
    bibencoding=utf8,% кодировка bib файла
    sorting=none,% настройка сортировки списка литературы
    style=gost-numeric,% стиль цитирования и библиографии (по ГОСТ)
    language=autobib,% получение языка из babel/polyglossia, default: autobib % если ставить autocite или auto, то цитаты в тексте с указанием страницы, получат указание страницы на языке оригинала
    autolang=other,% многоязычная библиография
    clearlang=true,% внутренний сброс поля language, если он совпадает с языком из babel/polyglossia
    defernumbers=false,% ИЗМЕНИЛ ЭТО С true НА false!!! нумерация проставляется после двух компиляций, зато позволяет выцеплять библиографию по ключевым словам и нумеровать не из большего списка
    sortcites=true,% сортировать номера затекстовых ссылок при цитировании (если в квадратных скобках несколько ссылок, то отображаться будут отсортированно, а не абы как)
    doi=false,% Показывать или нет ссылки на DOI
    isbn=false,% Показывать или нет ISBN, ISSN, ISRN
    ]{biblatex}[2016/09/17]
    %\ltx@iffilelater{biblatex-gost.def}{2017/05/03}%
    %{\toggletrue{bbx:gostbibliography}%
        %\renewcommand*{\revsdnamepunct}{\addcomma}}{}
}{%Черновик
    \usepackage[%
    backend=biber,% движок
    bibencoding=utf8,% кодировка bib файла
    sorting=none,% настройка сортировки списка литературы
    ]{biblatex}[2016/09/17]%
}
\makeatother

\ifnumgreater{\value{usefootcite}}{0}{
    \ExecuteBibliographyOptions{autocite=footnote}
    \newbibmacro*{cite:full}{%
        \printtext[bibhypertarget]{%
            \usedriver{%
                \DeclareNameAlias{sortname}{default}%
            }{%
                \thefield{entrytype}%
            }%
        }%
        \usebibmacro{shorthandintro}%
    }
    \DeclareCiteCommand{\smartcite}[\mkbibfootnote]{%
        \usebibmacro{prenote}%
    }{%
        \usebibmacro{citeindex}%
        \usebibmacro{cite:full}%
    }{%
        \multicitedelim%
    }{%
        \usebibmacro{postnote}%
    }
}{}

%%% Подключение файлов bib %%%
\addbibresource[label=other]{biblio/othercites.bib}
\addbibresource[label=vak]{biblio/authorpapersVAK.bib}
\addbibresource[label=papers]{biblio/authorpapers.bib}
\addbibresource[label=conf]{biblio/authorconferences.bib}


%http://tex.stackexchange.com/a/141831/79756
%There is a way to automatically map the language field to the langid field. The following lines in the preamble should be enough to do that.
%This command will copy the language field into the langid field and will then delete the contents of the language field. The language field will only be deleted if it was successfully copied into the langid field.
\DeclareSourcemap{ %модификация bib файла перед тем, как им займётся biblatex 
    \maps{
        \map{% перекидываем значения полей language в поля langid, которыми пользуется biblatex
            \step[fieldsource=language, fieldset=langid, origfieldval, final]
            \step[fieldset=language, null]
        }
        \map[overwrite]{% перекидываем значения полей shortjournal, если они есть, в поля journal, которыми пользуется biblatex
            \step[fieldsource=shortjournal, final]
            \step[fieldset=journal, origfieldval]
        }
        \map[overwrite]{% перекидываем значения полей shortbooktitle, если они есть, в поля booktitle, которыми пользуется biblatex
            \step[fieldsource=shortbooktitle, final]
            \step[fieldset=booktitle, origfieldval]
        }
        \map[overwrite, refsection=0]{% стираем значения всех полей addendum
            \perdatasource{biblio/authorpapersVAK.bib}
            \perdatasource{biblio/authorpapers.bib}
            \perdatasource{biblio/authorconferences.bib}
            \step[fieldsource=addendum, final]
            \step[fieldset=addendum, null] %чтобы избавиться от информации об объёме авторских статей, в отличие от автореферата
        }
        \map{% перекидываем значения полей numpages в поля pagetotal, которыми пользуется biblatex
            \step[fieldsource=numpages, fieldset=pagetotal, origfieldval, final]
            \step[fieldset=pagestotal, null]
        }
        \map{% если в поле medium написано "Электронный ресурс", то устанавливаем поле media, которым пользуется biblatex, в значение eresource.
            \step[fieldsource=medium,
            match=\regexp{Электронный\s+ресурс},
            final]
            \step[fieldset=media, fieldvalue=eresource]
        }
        \map[overwrite]{% стираем значения всех полей issn
            \step[fieldset=issn, null]
        }
        \map[overwrite]{% стираем значения всех полей abstract, поскольку ими не пользуемся, а там бывают "неприятные" латеху символы
            \step[fieldsource=abstract]
            \step[fieldset=abstract,null]
        }
        \map[overwrite]{ % переделка формата записи даты
            \step[fieldsource=urldate,
            match=\regexp{([0-9]{2})\.([0-9]{2})\.([0-9]{4})},
            replace={$3-$2-$1$4}, % $4 вставлен исключительно ради нормальной работы программ подсветки синтаксиса, которые некорректно обрабатывают $ в таких конструкциях
            final]
        }
        \map[overwrite]{ % добавляем ключевые слова, чтобы различать источники
            \perdatasource{biblio/othercites.bib}
            \step[fieldset=keywords, fieldvalue={biblioother,bibliofull}]
        }
        \map[overwrite]{ % добавляем ключевые слова, чтобы различать источники
            \perdatasource{biblio/authorpapersVAK.bib}
            \step[fieldset=keywords, fieldvalue={biblioauthorvak,biblioauthor,bibliofull}]
        }
        \map[overwrite]{ % добавляем ключевые слова, чтобы различать источники
            \perdatasource{biblio/authorpapers.bib}
            \step[fieldset=keywords, fieldvalue={biblioauthornotvak,biblioauthor,bibliofull}]
        }
        \map[overwrite]{ % добавляем ключевые слова, чтобы различать источники
            \perdatasource{biblio/authorconferences.bib}
            \step[fieldset=keywords, fieldvalue={biblioauthorconf,biblioauthor,bibliofull}]
        }
        %        \map[overwrite]{% стираем значения всех полей series
            %            \step[fieldset=series, null]
            %        }
        \map[overwrite]{% перекидываем значения полей howpublished в поля organization для типа online
            \step[typesource=online, typetarget=online, final]
            \step[fieldsource=howpublished, fieldset=organization, origfieldval]
            \step[fieldset=howpublished, null]
        }
        % Так отключаем [Электронный ресурс]
        %        \map[overwrite]{% стираем значения всех полей media=eresource
            %            \step[fieldsource=media,
            %            match={eresource},
            %            final]
            %            \step[fieldset=media, null]
            %        }
    }
}

%%% Убираем неразрывные пробелы перед двоеточием и точкой с запятой %%%
%\makeatletter
%\ifnumequal{\value{draft}}{0}{% Чистовик
    %    \renewcommand*{\addcolondelim}{%
        %      \begingroup%
        %      \def\abx@colon{%
            %        \ifdim\lastkern>\z@\unkern\fi%
            %        \abx@puncthook{:}\space}%
        %      \addcolon%
        %      \endgroup}
    %
    %    \renewcommand*{\addsemicolondelim}{%
        %      \begingroup%
        %      \def\abx@semicolon{%
            %        \ifdim\lastkern>\z@\unkern\fi%
            %        \abx@puncthook{;}\space}%
        %      \addsemicolon%
        %      \endgroup}
    %}{}
%\makeatother

%%% Правка записей типа thesis, чтобы дважды не писался автор
%\ifnumequal{\value{draft}}{0}{% Чистовик
    %\DeclareBibliographyDriver{thesis}{%
        %  \usebibmacro{bibindex}%
        %  \usebibmacro{begentry}%
        %  \usebibmacro{heading}%
        %  \newunit
        %  \usebibmacro{author}%
        %  \setunit*{\labelnamepunct}%
        %  \usebibmacro{thesistitle}%
        %  \setunit{\respdelim}%
        %  %\printnames[last-first:full]{author}%Вот эту строчку нужно убрать, чтобы автор диссертации не дублировался
        %  \newunit\newblock
        %  \printlist[semicolondelim]{specdata}%
        %  \newunit
        %  \usebibmacro{institution+location+date}%
        %  \newunit\newblock
        %  \usebibmacro{chapter+pages}%
        %  \newunit
        %  \printfield{pagetotal}%
        %  \newunit\newblock
        %  \usebibmacro{doi+eprint+url+note}%
        %  \newunit\newblock
        %  \usebibmacro{addendum+pubstate}%
        %  \setunit{\bibpagerefpunct}\newblock
        %  \usebibmacro{pageref}%
        %  \newunit\newblock
        %  \usebibmacro{related:init}%
        %  \usebibmacro{related}%
        %  \usebibmacro{finentry}}
    %}{}

%\newbibmacro{string+doi}[1]{% новая макрокоманда на простановку ссылки на doi
    %    \iffieldundef{doi}{#1}{\href{http://dx.doi.org/\thefield{doi}}{#1}}}

%\ifnumequal{\value{draft}}{0}{% Чистовик
    %\renewcommand*{\mkgostheading}[1]{\usebibmacro{string+doi}{#1}} % ссылка на doi с авторов. стоящих впереди записи
    %\renewcommand*{\mkgostheading}[1]{#1} % только лишь убираем курсив с авторов
    %}{}
%\DeclareFieldFormat{title}{\usebibmacro{string+doi}{#1}} % ссылка на doi с названия работы
%\DeclareFieldFormat{journaltitle}{\usebibmacro{string+doi}{#1}} % ссылка на doi с названия журнала
%%% Тире как разделитель в библиографии традиционной руской длины:
\renewcommand*{\newblockpunct}{\addperiod\addnbspace\cyrdash\space\bibsentence}
%%% Убрать тире из разделителей элементов в библиографии:
%\renewcommand*{\newblockpunct}{%
    %    \addperiod\space\bibsentence}%block punct.,\bibsentence is for vol,etc.

%%% Возвращаем запись «Режим доступа» %%%
%\DefineBibliographyStrings{english}{%
    %    urlfrom = {Mode of access}
    %}
%\DeclareFieldFormat{url}{\bibstring{urlfrom}\addcolon\space\url{#1}}

%%% В списке литературы обозначение одной буквой диапазона страниц англоязычного источника %%%
\DefineBibliographyStrings{english}{%
    pages = {p\adddot} %заглавность буквы затем по месту определяется работой самого biblatex
}

%%% В ссылке на источник в основном тексте с указанием конкретной страницы обозначение одной большой буквой %%%
%\DefineBibliographyStrings{russian}{%
    %    page = {C\adddot}
    %}

%%% Исправление длины тире в диапазонах %%%
% \cyrdash --- тире «русской» длины, \textendash --- en-dash
\DefineBibliographyExtras{russian}{%
    \protected\def\bibrangedash{%
        \cyrdash\penalty\value{abbrvpenalty}}% almost unbreakable dash
    \protected\def\bibdaterangesep{\bibrangedash}%тире для дат
}
\DefineBibliographyExtras{english}{%
    \protected\def\bibrangedash{%
        \cyrdash\penalty\value{abbrvpenalty}}% almost unbreakable dash
    \protected\def\bibdaterangesep{\bibrangedash}%тире для дат
}

%Set higher penalty for breaking in number, dates and pages ranges
\setcounter{abbrvpenalty}{10000} % default is \hyphenpenalty which is 12

%Set higher penalty for breaking in names
\setcounter{highnamepenalty}{10000} % If you prefer the traditional BibTeX behavior (no linebreaks at highnamepenalty breakpoints), set it to ‘infinite’ (10 000 or higher).
\setcounter{lownamepenalty}{10000}

%%% Set low penalties for breaks at uppercase letters and lowercase letters
%\setcounter{biburllcpenalty}{500} %управляет разрывами ссылок после маленьких букв RTFM biburllcpenalty
%\setcounter{biburlucpenalty}{3000} %управляет разрывами ссылок после больших букв, RTFM biburlucpenalty

%%% Список литературы с красной строки (без висячего отступа) %%%
%\defbibenvironment{bibliography} % переопределяем окружение библиографии из gost-numeric.bbx пакета biblatex-gost
%  {\list
    %     {\printtext[labelnumberwidth]{%
            %   \printfield{prefixnumber}%
            %   \printfield{labelnumber}}}
    %     {%
        %      \setlength{\labelwidth}{\labelnumberwidth}%
        %      \setlength{\leftmargin}{0pt}% default is \labelwidth
        %      \setlength{\labelsep}{\widthof{\ }}% Управляет длиной отступа после точки % default is \biblabelsep
        %      \setlength{\itemsep}{\bibitemsep}% Управление дополнительным вертикальным разрывом между записями. \bibitemsep по умолчанию соответствует \itemsep списков в документе.
        %      \setlength{\itemindent}{\bibhang}% Пользуемся тем, что \bibhang по умолчанию принимает значение \parindent (абзацного отступа), который переназначен в styles.tex
        %      \addtolength{\itemindent}{\labelwidth}% Сдвигаем правее на величину номера с точкой
        %      \addtolength{\itemindent}{\labelsep}% Сдвигаем ещё правее на отступ после точки
        %      \setlength{\parsep}{\bibparsep}%
        %     }%
    %      \renewcommand*{\makelabel}[1]{\hss##1}%
    %  }
%  {\endlist}
%  {\item}

%% Счётчик использованных ссылок на литературу, обрабатывающий с учётом неоднократных ссылок
%http://tex.stackexchange.com/a/66851/79756
%\newcounter{citenum}
\newtotcounter{citenum}
\makeatletter
\defbibenvironment{counter} %Env of bibliography
{\setcounter{citenum}{0}%
    \renewcommand{\blx@driver}[1]{}%
} %what is doing at the beginining of bibliography. In your case it's : a. Reset counter b. Say to print nothing when a entry is tested.
{} %Здесь то, что будет выводиться командой \printbibliography. \thecitenum сюда писать не надо
{\stepcounter{citenum}} %What is printing / executed at each entry.
\makeatother
\defbibheading{counter}{}

\newtotcounter{citeauthorvak}
\makeatletter
\defbibenvironment{countauthorvak} %Env of bibliography
{\setcounter{citeauthorvak}{0}%
    \renewcommand{\blx@driver}[1]{}%
} %what is doing at the beginining of bibliography. In your case it's : a. Reset counter b. Say to print nothing when a entry is tested.
{} %Здесь то, что будет выводиться командой \printbibliography. Обойдёмся без \theciteauthorvak в нашей реализации
{\stepcounter{citeauthorvak}} %What is printing / executed at each entry.
\makeatother
\defbibheading{countauthorvak}{}

\newtotcounter{citeauthornotvak}
\makeatletter
\defbibenvironment{countauthornotvak} %Env of bibliography
{\setcounter{citeauthornotvak}{0}%
    \renewcommand{\blx@driver}[1]{}%
} %what is doing at the beginining of bibliography. In your case it's : a. Reset counter b. Say to print nothing when a entry is tested.
{} %Здесь то, что будет выводиться командой \printbibliography. Обойдёмся без \theciteauthornotvak в нашей реализации
{\stepcounter{citeauthornotvak}} %What is printing / executed at each entry.
\makeatother
\defbibheading{countauthornotvak}{}

\newtotcounter{citeauthorconf}
\makeatletter
\defbibenvironment{countauthorconf} %Env of bibliography
{\setcounter{citeauthorconf}{0}%
    \renewcommand{\blx@driver}[1]{}%
} %what is doing at the beginining of bibliography. In your case it's : a. Reset counter b. Say to print nothing when a entry is tested.
{} %Здесь то, что будет выводиться командой \printbibliography. Обойдёмся без \theciteauthorconf в нашей реализации
{\stepcounter{citeauthorconf}} %What is printing / executed at each entry.
\makeatother
\defbibheading{countauthorconf}{}

\newtotcounter{citeauthor}
\makeatletter
\defbibenvironment{countauthor} %Env of bibliography
{\setcounter{citeauthor}{0}%
    \renewcommand{\blx@driver}[1]{}%
} %what is doing at the beginining of bibliography. In your case it's : a. Reset counter b. Say to print nothing when a entry is tested.
{} %Здесь то, что будет выводиться командой \printbibliography. Обойдёмся без \theciteauthor в нашей реализации
{\stepcounter{citeauthor}} %What is printing / executed at each entry.
\makeatother
\defbibheading{countauthor}{}

\defbibheading{authorpublications}[\authorbibtitle]{\section*{#1}}
\defbibheading{pubsubgroup}{\centering\textbf{#1}}
\defbibheading{otherpublications}{\section*{#1}}


%%% Создание команд для вывода списка литературы %%%
\newcommand*{\insertbibliofull}{
    \printbibliography[keyword=bibliofull,section=0,title=\fullbibtitle]
    \printbibliography[heading=counter,env=counter,keyword=bibliofull,section=0]
}

\newcommand*{\insertbiblioauthorcited}{
    \printbibliography[heading=authorpublications,keyword=biblioauthor,section=0,title=\authorbibtitle]
}
\newcommand*{\insertbiblioauthor}{
    \printbibliography[heading=authorpublications,keyword=biblioauthor,section=1,title=\authorbibtitle]
}
\newcommand*{\insertbiblioauthorimportant}{
    \printbibliography[heading=authorpublications,keyword=biblioauthor,section=2,title={Наиболее значимые \MakeLowercase{\protect\authorbibtitle{}}}]
}
\newcommand*{\insertbiblioauthorgrouped}{% Заготовка для вывода сгруппированных печатных работ автора. Порядок нумерации определяется в соответствующих счетчиках внутри окружения refsection в файле common/characteristic.tex
    \section*{\authorbibtitle}
    \printbibliography[heading=pubsubgroup, keyword=biblioauthorvak, section=1,title=\vakbibtitle]%
    \printbibliography[heading=pubsubgroup, keyword=biblioauthorconf, section=1,title=\confbibtitle]%
    %\printbibliography[heading=pubsubgroup, keyword=biblioauthornotvak, section=1,title=\notvakbibtitle]%
}

\newcommand*{\insertbiblioother}{
    \printbibliography[heading=otherpublications,keyword=biblioother]
}

不幸的是,我无法完全改变这些文件的代码,但我可以在代码中添加一些选项和小的改动来实现要求。

我已经找到了一些解决我的问题的方法,例如,如何将参考文献的标签更改为字母“A”后跟数字?如何在文中引用编号前添加字母?,但这些情况适用于 {thebibliography} 环境。我使用 biber + biblatex,无法切换到其他表示形式。

文件authorconferences.bibauthorpapersVAK.bibothercites.bib包含以下形式的参考书目,例如:

@ARTICLE{PaperVAK1,
  author        = {I and Smith, J.},
  title         = {Some Paper},
  journal       = {Some Journal},
  year          = {1812},
  volume        = {17},
  number        = {2},
  pages         = {43--999},
  language      = {english}
}

我对这些文件没有任何问题。

如果需要,我可以从项目中上传其他文件。请随意询问!

相关内容