- Questo topic ha 1 risposta, 2 partecipanti ed è stato aggiornato l'ultima volta 12 anni, 11 mesi fa da .
-
Topic
-
leggendo questo
http://tex.stackexchange.com/questions/111832/generate-author-year-index-using-biblatex-and-imakeidx
l’ho usato per il mio documento
e ho ottenuto
`
% !TeX program = pdflatex
% !TeX encoding = UTF-8
% !TeX spellcheck = it_IT
% !TeX root = test.tex
\documentclass[draftdate=true,oneside,documentstructure=collection,crop=false,pagelayout=standard ]{suftesi}
\usepackage{ifxetex}
\ifxetex
\usepackage{fontspec}
\setmainfont[Ligatures=TeX,Numbers=OldStyle]{Junicode}
%\setmainfont{Lexia}
\usepackage{polyglossia}
\setmainlanguage{italian}
\PolyglossiaSetup{italian}{indentfirst=false}\else
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}\usepackage[italian]{babel}
\fi
\usepackage{etoolbox}
\makeatletter
\preto{\tableofcontents}{%
\let\@headtitle\contentsname
\let\@title\contentsname
\let\@author\contentsname}
\makeatother\makeatletter
\def\SUF@versionstring{\texttt{Versione del \today}}
\makeatother\usepackage[italian=guillemets]{csquotes}
%\usepackage[style=philosophy-verbose,indexing,backend=biber]{biblatex}
\usepackage[style=authoryear,indexing,backend=biber]{biblatex}\addbibresource{../bes/bes.bib}
\defbibheading{articolo}{\chapter{Riferimenti}}
%http://tex.stackexchange.com/questions/111832/generate-author-year-index-using-biblatex-and-imakeidx
\usepackage{imakeidx}
\makeindex[name=authors,title=Indice Autori,columns=1,intoc=true]
\makeindex[name=years,title=Indice per Anno,columns=1,intoc=true]\makeatletter
% For the “years” index, we redefine the ordinary bibmacro
% which indexes titles, so that it indexes into the years
% index instead
\renewbibmacro*{index:title}[2]{%
\iffieldundef{year}
{\usebibmacro{index:years}%
{\index}%
{\undated}%
{\thefield{indexsorttitle}}%
{\thefield{entrykey}}}
{\usebibmacro{index:years}%
{\index}%
{\thefield{year}}%
{\thefield{indexsorttitle}}%
{\thefield{entrykey}}}}\newbibmacro*{index:years}[4]{%
\begingroup
\protected@edef\theindexentry{%
\unexpanded{#1}\yearsindex{#2!#3\actualoperator\unexpanded{\citefield}{#4}{indextitle}}}%
\theindexentry
\endgroup}% For authors we just redefine the field format (so that it
% includes title and year information
\DeclareIndexNameFormat{default}{%
\iffieldundef{year}
{\usebibmacro{index:name}%
{\index}%
{#1}%
{#3}%
{#5}%
{#7}%
{\thefield{indexsorttitle}}%
{\thefield{entrykey}}%
{}}
{\usebibmacro{index:name}%
{\index}%
{#1}%
{#3}%
{#5}%
{#7}%
{\thefield{indexsorttitle}}%
{\thefield{entrykey}}%
{ (\thefield{year})}}}
% … and modify the relevant bibmacro to add the extra information
\renewbibmacro*{index:name}[8]{%
\begingroup
\ifuseprefix
{\protected@edef\theindexentry{%
\unexpanded{#1}\authorsindex{%
\ifblank{#4}{}{#4 }%
\@firstofone #2% remove spurious braces
\ifblank{#5}{}{ #5}%
\ifblank{#3}{}{, #3}%
\actualoperator
\ifblank{#4}{}{\MakeCapital{#4} }%
#2%
\ifblank{#5}{}{ #5}%
\ifblank{#3}{}{, #3}!#6
\actualoperator\unexpanded{\citefield}{indextitle}#8}}}%
{\protected@edef\theindexentry{%
\unexpanded{#1}\authorsindex{%
\@firstofone #2% remove spurious braces
\ifblank{#5}{}{ #5}%
\ifblank{#3#4}{}{,}%
\ifblank{#3}{}{ #3}%
\ifblank{#4}{}{ #4}!#6\actualoperator
\unexpanded{\citefield}{#7}{indextitle}#8}}}%
\theindexentry
\endgroup}
\makeatother
\newcommand{\yearsindex}{[years]}
\newcommand{\authorsindex}{[authors]}\usepackage{hyperref}
\hypersetup{%
colorlinks=true,
citecolor=blue,
%draft=true
}\input{glossario}
\listfiles
\begin{document}
\glsaddall
\printglossaries\cleardoublepage
\phantomsection
\printbibliography[heading=articolo,keyword=art,title=Bibliografia]\printindex[authors]
\printindex[years]
\end{document}
`
perchè se uso
`
\usepackage[style=philosophy-verbose,indexing,backend=biber]{biblatex}
`
non funzionano gli indici?
lo stile philosophy non è male
è possibile usarlo ancora?
ciao
claudio
- Devi essere connesso per rispondere a questo topic.