You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

635 lines
30 KiB
TeX

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

%%% Реализация библиографии пакетами 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=true,% нумерация проставляется после двух компиляций, зато позволяет выцеплять библиографию по ключевым словам и нумеровать не из большего списка
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,% настройка сортировки списка литературы
% defernumbers=true, % откомментируйте, если требуется правильная нумерация ссылок на литературу в режиме черновика. Замедляет сборку
]{biblatex}[2016/09/17]%
}
\makeatother
\providebool{blxmc} % biblatex version needs and has MakeCapital workaround
\boolfalse{blxmc} % setting our new boolean flag to default false
\ifxetexorluatex
\else
% Исправление случая неподдержки знака номера в pdflatex
\DefineBibliographyStrings{russian}{number={\textnumero}}
% Исправление случая отсутствия прописных букв в некоторых случаях
% https://github.com/plk/biblatex/issues/960#issuecomment-596658282
\ifdefmacro{\ExplSyntaxOn}{}{\usepackage{expl3}}
\makeatletter
\ltx@ifpackagelater{biblatex}{2020/02/23}{
% Assuming this version of biblatex defines MakeCapital correctly
}{
\ltx@ifpackagelater{biblatex}{2019/12/01}{
% Assuming this version of biblatex defines MakeCapital incorrectly
\usepackage{expl3}[2020/02/25]
\@ifpackagelater{expl3}{2020/02/25}{
\booltrue{blxmc} % setting our new boolean flag to true
}{}
}{}
}
\makeatother
\ifblxmc
\typeout{Assuming this version of biblatex defines MakeCapital
incorrectly}
\usepackage{xparse}
\makeatletter
\ExplSyntaxOn
\NewDocumentCommand \blx@maketext@lowercase {m}
{
\text_lowercase:n {#1}
}
\NewDocumentCommand \blx@maketext@uppercase {m}
{
\text_uppercase:n {#1}
}
\RenewDocumentCommand \MakeCapital {m}
{
\text_titlecase_first:n {#1}
}
\ExplSyntaxOff
\protected\def\blx@biblcstring#1#2#3{%
\blx@begunit
\blx@hyphenreset
\blx@bibstringsimple
\lowercase{\edef\blx@tempa{#3}}%
\ifcsundef{#2@\blx@tempa}
{\blx@warn@nostring\blx@tempa
\blx@endnounit}
{#1{\blx@maketext@lowercase{\csuse{#2@\blx@tempa}}}%
\blx@endunit}}
\protected\def\blx@bibucstring#1#2#3{%
\blx@begunit
\blx@hyphenreset
\blx@bibstringsimple
\lowercase{\edef\blx@tempa{#3}}%
\ifcsundef{#2@\blx@tempa}
{\blx@warn@nostring\blx@tempa
\blx@endnounit}
{#1{\blx@maketext@uppercase{\csuse{#2@\blx@tempa}}}%
\blx@endunit}}
\makeatother
\fi
\fi
\ifsynopsis
\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}%
}
}{}
\fi
%%% Подключение файлов bib %%%
\addbibresource[label=bl-external]{biblio/external.bib}
\addbibresource[label=bl-author]{biblio/author.bib}
\addbibresource[label=bl-registered]{biblio/registered.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{% перекидываем значения полей numpages в поля pagetotal, которыми пользуется biblatex
\step[fieldsource=numpages, fieldset=pagetotal, origfieldval, final]
\step[fieldset=numpages, null]
}
\map{% перекидываем значения полей pagestotal в поля pagetotal, которыми пользуется biblatex
\step[fieldsource=pagestotal, fieldset=pagetotal, origfieldval, final]
\step[fieldset=pagestotal, null]
}
\map[overwrite]{% перекидываем значения полей shortjournal, если они есть, в поля journal, которыми пользуется biblatex
\step[fieldsource=shortjournal, final]
\step[fieldset=journal, origfieldval]
\step[fieldset=shortjournal, null]
}
\map[overwrite]{% перекидываем значения полей shortbooktitle, если они есть, в поля booktitle, которыми пользуется biblatex
\step[fieldsource=shortbooktitle, final]
\step[fieldset=booktitle, origfieldval]
\step[fieldset=shortbooktitle, null]
}
\map{% если в поле medium написано "Электронный ресурс", то устанавливаем поле media, которым пользуется biblatex, в значение eresource.
\step[fieldsource=medium,
match=\regexp{Электронный\s+ресурс},
final]
\step[fieldset=media, fieldvalue=eresource]
\step[fieldset=medium, null]
}
\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]{ % стираем ключевые слова
\step[fieldsource=keywords]
\step[fieldset=keywords,null]
}
% реализация foreach различается для biblatex v3.12 и v3.13.
% Для версии v3.13 эта конструкция заменяет последующие 7 структур map
% \map[overwrite,foreach={authorvak,authorscopus,authorwos,authorconf,authorother,authorparent,authorprogram}]{ % записываем информацию о типе публикации в ключевые слова
% \step[fieldsource=$MAPLOOP,final=true]
% \step[fieldset=keywords,fieldvalue={,biblio$MAPLOOP},append=true]
% }
\map[overwrite]{ % записываем информацию о типе публикации в ключевые слова
\step[fieldsource=authorvak,final=true]
\step[fieldset=keywords,fieldvalue={,biblioauthorvak},append=true]
}
\map[overwrite]{ % записываем информацию о типе публикации в ключевые слова
\step[fieldsource=authorscopus,final=true]
\step[fieldset=keywords,fieldvalue={,biblioauthorscopus},append=true]
}
\map[overwrite]{ % записываем информацию о типе публикации в ключевые слова
\step[fieldsource=authorwos,final=true]
\step[fieldset=keywords,fieldvalue={,biblioauthorwos},append=true]
}
\map[overwrite]{ % записываем информацию о типе публикации в ключевые слова
\step[fieldsource=authorconf,final=true]
\step[fieldset=keywords,fieldvalue={,biblioauthorconf},append=true]
}
\map[overwrite]{ % записываем информацию о типе публикации в ключевые слова
\step[fieldsource=authorother,final=true]
\step[fieldset=keywords,fieldvalue={,biblioauthorother},append=true]
}
\map[overwrite]{ % записываем информацию о типе публикации в ключевые слова
\step[fieldsource=authorpatent,final=true]
\step[fieldset=keywords,fieldvalue={,biblioauthorpatent},append=true]
}
\map[overwrite]{ % записываем информацию о типе публикации в ключевые слова
\step[fieldsource=authorprogram,final=true]
\step[fieldset=keywords,fieldvalue={,biblioauthorprogram},append=true]
}
\map[overwrite]{ % добавляем ключевые слова, чтобы различать источники
\perdatasource{biblio/external.bib}
\step[fieldset=keywords, fieldvalue={,biblioexternal},append=true]
}
\map[overwrite]{ % добавляем ключевые слова, чтобы различать источники
\perdatasource{biblio/author.bib}
\step[fieldset=keywords, fieldvalue={,biblioauthor},append=true]
}
\map[overwrite]{ % добавляем ключевые слова, чтобы различать источники
\perdatasource{biblio/registered.bib}
\step[fieldset=keywords, fieldvalue={,biblioregistered},append=true]
}
\map[overwrite]{ % добавляем ключевые слова, чтобы различать источники
\step[fieldset=keywords, fieldvalue={,bibliofull},append=true]
}
% \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]
}
}
}
\ifnumequal{\value{mediadisplay}}{1}{
\DeclareSourcemap{
\maps{%
\map{% использование media=text по умолчанию
\step[fieldset=media, fieldvalue=text]
}
}
}
}{}
\ifnumequal{\value{mediadisplay}}{2}{
\DeclareSourcemap{
\maps{%
\map[overwrite]{% удаление всех записей media
\step[fieldset=media, null]
}
}
}
}{}
\ifnumequal{\value{mediadisplay}}{3}{
\DeclareSourcemap{
\maps{
\map[overwrite]{% стираем значения всех полей media=text
\step[fieldsource=media,match={text},final]
\step[fieldset=media, null]
}
}
}
}{}
\ifnumequal{\value{mediadisplay}}{4}{
\DeclareSourcemap{
\maps{
\map[overwrite]{% стираем значения всех полей media=eresource
\step[fieldsource=media,match={eresource},final]
\step[fieldset=media, null]
}
}
}
}{}
\ifsynopsis
\else
\DeclareSourcemap{ %модификация bib файла перед тем, как им займётся biblatex
\maps{
\map[overwrite]{% стираем значения всех полей addendum
\perdatasource{biblio/author.bib}
\step[fieldset=addendum, null] %чтобы избавиться от информации об объёме авторских статей, в отличие от автореферата
}
}
}
\fi
\ifpresentation
% удаляем лишние поля в списке литературы презентации
% их названия можно узнать в файле presentation.bbl
\DeclareSourcemap{
\maps{
\map[overwrite,foreach={%
% {{{ Список лишних полей в презентации
address,%
chapter,%
edition,%
editor,%
eid,%
howpublished,%
institution,%
key,%
month,%
note,%
number,%
organization,%
pages,%
publisher,%
school,%
series,%
type,%
media,%
url,%
doi,%
location,%
volume,%
% Список лишних полей в презентации }}}
}]{
\perdatasource{biblio/author.bib}
\step[fieldset=$MAPLOOP,null]
}
}
}
\fi
\defbibfilter{vakscopuswos}{%
keyword=biblioauthorvak or keyword=biblioauthorscopus or keyword=biblioauthorwos
}
\defbibfilter{scopuswos}{%
keyword=biblioauthorscopus or keyword=biblioauthorwos
}
\defbibfilter{papersregistered}{%
keyword=biblioauthor or keyword=biblioregistered
}
%%% Убираем неразрывные пробелы перед двоеточием и точкой с запятой %%%
%\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.
%%% Изменение точки с запятой на запятую в перечислении библиографических
%%% ссылок:
%\renewcommand*{\multicitedelim}{\addcomma\space}
%%% Возвращаем запись «Режим доступа» %%%
%\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
%
\makeatletter
\newtotcounter{citenum}
\defbibenvironment{counter}
{\setcounter{citenum}{0}\renewcommand{\blx@driver}[1]{}} % begin code: убирает весь выводимый текст
{} % end code
{\stepcounter{citenum}} % item code: cчитает "печатаемые в библиографию" источники
\newtotcounter{citeauthorvak}
\defbibenvironment{countauthorvak}
{\setcounter{citeauthorvak}{0}\renewcommand{\blx@driver}[1]{}}
{}
{\stepcounter{citeauthorvak}}
\newtotcounter{citeauthorscopus}
\defbibenvironment{countauthorscopus}
{\setcounter{citeauthorscopus}{0}\renewcommand{\blx@driver}[1]{}}
{}
{\stepcounter{citeauthorscopus}}
\newtotcounter{citeauthorwos}
\defbibenvironment{countauthorwos}
{\setcounter{citeauthorwos}{0}\renewcommand{\blx@driver}[1]{}}
{}
{\stepcounter{citeauthorwos}}
\newtotcounter{citeauthorother}
\defbibenvironment{countauthorother}
{\setcounter{citeauthorother}{0}\renewcommand{\blx@driver}[1]{}}
{}
{\stepcounter{citeauthorother}}
\newtotcounter{citeauthorconf}
\defbibenvironment{countauthorconf}
{\setcounter{citeauthorconf}{0}\renewcommand{\blx@driver}[1]{}}
{}
{\stepcounter{citeauthorconf}}
\newtotcounter{citeauthor}
\defbibenvironment{countauthor}
{\setcounter{citeauthor}{0}\renewcommand{\blx@driver}[1]{}}
{}
{\stepcounter{citeauthor}}
\newtotcounter{citeauthorvakscopuswos}
\defbibenvironment{countauthorvakscopuswos}
{\setcounter{citeauthorvakscopuswos}{0}\renewcommand{\blx@driver}[1]{}}
{}
{\stepcounter{citeauthorvakscopuswos}}
\newtotcounter{citeauthorscopuswos}
\defbibenvironment{countauthorscopuswos}
{\setcounter{citeauthorscopuswos}{0}\renewcommand{\blx@driver}[1]{}}
{}
{\stepcounter{citeauthorscopuswos}}
\newtotcounter{citeregistered}
\defbibenvironment{countregistered}
{\setcounter{citeregistered}{0}\renewcommand{\blx@driver}[1]{}}
{}
{\stepcounter{citeregistered}}
\newtotcounter{citeauthorpatent}
\defbibenvironment{countauthorpatent}
{\setcounter{citeauthorpatent}{0}\renewcommand{\blx@driver}[1]{}}
{}
{\stepcounter{citeauthorpatent}}
\newtotcounter{citeauthorprogram}
\defbibenvironment{countauthorprogram}
{\setcounter{citeauthorprogram}{0}\renewcommand{\blx@driver}[1]{}}
{}
{\stepcounter{citeauthorprogram}}
\newtotcounter{citeexternal}
\defbibenvironment{countexternal}
{\setcounter{citeexternal}{0}\renewcommand{\blx@driver}[1]{}}
{}
{\stepcounter{citeexternal}}
\makeatother
\defbibheading{nobibheading}{} % пустой заголовок, для подсчёта публикаций с помощью невидимой библиографии
\defbibheading{pubgroup}{\section*{#1}} % обычный стиль, заголовок-секция
\defbibheading{pubsubgroup}{\noindent\textbf{#1}} % для подразделов "по типу источника"
%%%Сортировка списка литературы Русский-Английский (предварительно удалить dissertation.bbl) (начало)
%%%Источник: https://github.com/odomanov/biblatex-gost/wiki/%D0%9A%D0%B0%D0%BA-%D1%81%D0%B4%D0%B5%D0%BB%D0%B0%D1%82%D1%8C,-%D1%87%D1%82%D0%BE%D0%B1%D1%8B-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%BE%D1%8F%D0%B7%D1%8B%D1%87%D0%BD%D1%8B%D0%B5-%D0%B8%D1%81%D1%82%D0%BE%D1%87%D0%BD%D0%B8%D0%BA%D0%B8-%D0%BF%D1%80%D0%B5%D0%B4%D1%88%D0%B5%D1%81%D1%82%D0%B2%D0%BE%D0%B2%D0%B0%D0%BB%D0%B8-%D0%BE%D1%81%D1%82%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%BC
%\DeclareSourcemap{
% \maps[datatype=bibtex]{
% \map{
% \step[fieldset=langid, fieldvalue={tempruorder}]
% }
% \map[overwrite]{
% \step[fieldsource=langid, match=russian, final]
% \step[fieldsource=presort,
% match=\regexp{(.+)},
% replace=\regexp{aa$1}]
% }
% \map{
% \step[fieldsource=langid, match=russian, final]
% \step[fieldset=presort, fieldvalue={az}]
% }
% \map[overwrite]{
% \step[fieldsource=langid, notmatch=russian, final]
% \step[fieldsource=presort,
% match=\regexp{(.+)},
% replace=\regexp{za$1}]
% }
% \map{
% \step[fieldsource=langid, notmatch=russian, final]
% \step[fieldset=presort, fieldvalue={zz}]
% }
% \map{
% \step[fieldsource=langid, match={tempruorder}, final]
% \step[fieldset=langid, null]
% }
% }
%}
%Сортировка списка литературы (конец)
%%% Создание команд для вывода списка литературы %%%
\newcommand*{\insertbibliofull}{
\printbibliography[keyword=bibliofull,section=0,title=\bibtitlefull]
\ifnumequal{\value{draft}}{0}{
\printbibliography[heading=nobibheading,env=counter,keyword=bibliofull,section=0]
}{}
}
\newcommand*{\insertbiblioauthor}{
\printbibliography[heading=pubgroup, section=0, filter=papersregistered, title=\bibtitleauthor]
}
\newcommand*{\insertbiblioauthorimportant}{
\printbibliography[heading=pubgroup, section=2, filter=papersregistered, title=\bibtitleauthorimportant]
}
% Вариант вывода печатных работ автора, с группировкой по типу источника.
% Порядок команд `\printbibliography` должен соответствовать порядку в файле common/characteristic.tex
\newcommand*{\insertbiblioauthorgrouped}{
\section*{\bibtitleauthor}
\ifsynopsis
\printbibliography[heading=pubsubgroup, section=0, keyword=biblioauthorvak, title=\bibtitleauthorvak,resetnumbers=true] % Работы автора из списка ВАК (сброс нумерации)
\else
\printbibliography[heading=pubsubgroup, section=0, keyword=biblioauthorvak, title=\bibtitleauthorvak,resetnumbers=false] % Работы автора из списка ВАК (сквозная нумерация)
\fi
\printbibliography[heading=pubsubgroup, section=0, keyword=biblioauthorwos, title=\bibtitleauthorwos,resetnumbers=false]% Работы автора, индексируемые Web of Science
\printbibliography[heading=pubsubgroup, section=0, keyword=biblioauthorscopus, title=\bibtitleauthorscopus,resetnumbers=false]% Работы автора, индексируемые Scopus
\printbibliography[heading=pubsubgroup, section=0, keyword=biblioauthorpatent, title=\bibtitleauthorpatent,resetnumbers=false]% Патенты
\printbibliography[heading=pubsubgroup, section=0, keyword=biblioauthorprogram,title=\bibtitleauthorprogram,resetnumbers=false]% Программы для ЭВМ
\printbibliography[heading=pubsubgroup, section=0, keyword=biblioauthorconf, title=\bibtitleauthorconf,resetnumbers=false]% Тезисы конференций
\printbibliography[heading=pubsubgroup, section=0, keyword=biblioauthorother, title=\bibtitleauthorother,resetnumbers=false]% Прочие работы автора
}
\newcommand*{\insertbiblioexternal}{
\printbibliography[heading=pubgroup, section=0, keyword=biblioexternal, title=\bibtitlefull]
}