我想要\cite[#1]{thebook}
一本(用速记法)带有编号段落的书,形式不是shorthand, \pnfmt{#1}
,而是简单的XEN~#1~\emph{TP}\,3
,其中有速记XEN~\emph{TP}\,3
(带有参考书目的链接)。
我试图创建一个新的xparse
-command \THEBOOK
,但是没有作用。
% uses-*- MODE: latex; TeX-engine: luatex; coding: utf-8; -*-
\RequirePackage{xparse}
\documentclass[paper=A6,landscape,fontsize=8pt]{scrartcl}
\usepackage[main=english]{babel}
\usepackage{csquotes}
\usepackage[style=philosophy-modern,sortlocale=de,language=english,%
sorting=nyvt,backend=biber,hyperref=true,shorthandintro=false]{biblatex}
\addbibresource{shortbib.bib}
\usepackage{hyperref}
\makeatletter
% what I've tried
\NewDocumentCommand{\XEN}{o}{\cite[#1]{Xenophanes:TP}}
\DeclareFieldFormat[book,inbook]{citetitle}%
{\XEN{XEN~#1~\mkbibemph{TP}\,3}}
\DeclareFieldFormat[book,inbook]{shorttitle}%
{\XEN{XEN~#1~\mkbibemph{TP}\,3}}
\makeatother
\begin{document}
I cite: \XEN[87] oder \XEN{87}
\smallskip
It should look like: XEN~87~\emph{TP}\,3 (with a hyperlink)
\nocite{*}
\printshorthands
\printbibliography
\begin{filecontents*}[overwrite]{shortbib.bib}
@Book{Xenophanes:TP,
editor = {Benedikt Strobel},
options = {useauthor=false, useeditor=true},
title = {Xenophanes von Kolophon},
shorttitle = {Xenophanes},
langid = {english},
date = 2018,
translator = {Benedikt Strobel},
annotator = {Benedikt Strobel},
series = {Traditio Praesocratica},
number = 3,
publisher = {Gruyter},
location = {Berlin},
pagination = {paragraph},
shorthand = {XEN\addnbspace\mkbibemph{TP}\addnbthinspace3}}
\end{filecontents*}
\end{document}