当前的问题本质上与自定义索引中的标题以包含当前索引条目但标头是通过titleps
包管理的(而不是通过fancyhdr
包管理的)。针对此问题提供的解决方案依赖于\markboth
以下内容:
fancyhdr
可以处理,titleps
无法处理,因为这对它来说毫无意义,
而且我看不出有任何方法可以使该解决方案适应titleps
。
所以我的问题是:使用titleps
包,如何获取包含该页面上第一个/最后一个索引条目的索引标题(如在字典中)。换句话说,如果索引的当前页面分别以条目开始和结束:
第 15、18 节
和:
foo 21, 42, 84
我希望标题包含:
巴福
或者至少是相应的首字母:
高炉
更新
根据 cfr 的要求,这里有一个最小的例子,说明了什么是可能的,fanchyhdr
但我未能成功适应titleps
(为了在两种情况之间切换,只需注释/取消注释fanchyhdr
并titleps
加载)。
\documentclass{article}
\usepackage{filecontents}
\usepackage[xindy]{imakeidx}
\usepackage{fancyhdr}
% \usepackage{titleps}
%
\makeatletter
%%%%%%%%%%%%%%%%%%%
% Index pagestyle %
%%%%%%%%%%%%%%%%%%%
%
\@ifpackageloaded{fancyhdr}{%
% Here is the `fancyhdr' one the solution provided
\fancypagestyle{indexpagestyle}{%
\fancyhead{}
\fancyhead[RO,LE]{\rightmark -- \leftmark}
}
}{%
\@ifpackageloaded{titleps}{%
% Here is the `titleps' equivalent one
\newpagestyle{indexpagestyle}[]{%
\sethead
{%
% Here probably something else than \rightmark and \leftmark
(\rightmark) -- (\leftmark)%
}%
{}%
{}%
\headrule%
\setfoot{}{\thepage}{}%
}%
}{%
}
}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Macro to use in the index style file to collect the index marks %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\@ifpackageloaded{fancyhdr}{%
% Here is the `fancyhdr' one the solution provided
\newcommand{\indexmark}[1]{#1\markboth{#1}{#1}}
}{%
\@ifpackageloaded{titleps}{%
%
% Here is the `titleps' equivalent I'd like to get (\markboth doesn't make
% sense for `titleps')
\newcommand{\indexmark}[1]{???}
}{%
}
}
%
\makeatother
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Index style file (shared by the two cases) %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{filecontents*}{\jobname.xdy}
(markup-index :open "~n
\begin{theindex}
\providecommand*\lettergroupDefault[1]{}
\providecommand*\lettergroup[1]{\textbf{#1}}
~n"
:close "~n~n\end{theindex}~n"
:tree)
(markup-keyword-list :open "\indexmark{" :close "}" )
\end{filecontents*}
%
% You need to tell it to use your style file
\makeindex[options={-M \jobname.xdy}]
%
\begin{document}
%
% Lots of index entries
Aachen\index{Aachen} aardvark\index{aardvark} aargh\index{aargh} Aarhus\index{Aarhus} Aaron\index{Aaron} Aaronvitch\index{Aaronvitch} Ababa\index{Ababa} aback\index{aback} abacus\index{abacus} abaft\index{abaft} abalone\index{abalone} abandon\index{abandon} abandoner\index{abandoner} abase\index{abase} abaser\index{abaser} abash\index{abash} abashed\index{abashed} abate\index{abate} abated\index{abated} abater\index{abater} abattoir\index{abattoir} Abba\index{Abba} abbess\index{abbess} abbey\index{abbey} abbot\index{abbot} Abbott\index{Abbott} abbreviate\index{abbreviate} abbreviated\index{abbreviated} abbreviation\index{abbreviation} abbé\index{abbé} ABC\index{ABC} abdicate\index{abdicate} abdication\index{abdication} abdomen\index{abdomen} abdominal\index{abdominal} abduct\index{abduct} abductee\index{abductee} abduction\index{abduction} abductor\index{abductor} Abdul\index{Abdul} Abe\index{Abe} abeam\index{abeam} Abel\index{Abel} Abelard\index{Abelard} Abelson\index{Abelson} Aberconwy\index{Aberconwy} Aberdeen\index{Aberdeen} Aberdeenshire\index{Aberdeenshire} Abernathy\index{Abernathy} aberrant\index{aberrant} aberration\index{aberration} Aberystwyth\index{Aberystwyth} abet\index{abet} abettor\index{abettor} abeyance\index{abeyance} abeyant\index{abeyant} abhor\index{abhor} abhorrence\index{abhorrence} abhorrent\index{abhorrent} abhorrer\index{abhorrer} abidance\index{abidance} abide\index{abide} abider\index{abider} Abidjan\index{Abidjan} Abigail\index{Abigail} Abilene\index{Abilene} ability\index{ability} abiogenesis\index{abiogenesis} abiogenic\index{abiogenic} abiotic\index{abiotic} abject\index{abject} abjection\index{abjection} abjectness\index{abjectness} abjuration\index{abjuration} abjure\index{abjure} ablate\index{ablate} ablation\index{ablation} ablaze\index{ablaze} able-bodied\index{able-bodied} able\index{able} abler\index{abler} abloom\index{abloom} ablution\index{ablution} abnegate\index{abnegate} abnegation\index{abnegation} abnormal\index{abnormal} abnormality\index{abnormality} aboard\index{aboard} abode\index{abode} abolish\index{abolish} abolition\index{abolition} abolitionism\index{abolitionism} abolitionist\index{abolitionist} abominable\index{abominable} abominate\index{abominate} abomination\index{abomination} aboriginal\index{aboriginal} Aboriginals\index{Aboriginals} aborigine\index{aborigine} abort\index{abort} aborter\index{aborter} abortion\index{abortion} abortionist\index{abortionist} abortive\index{abortive} abound\index{abound} about\index{about} above\index{above} aboveboard\index{aboveboard} aboveground\index{aboveground} abracadabra\index{abracadabra} abrade\index{abrade} abrader\index{abrader} Abraham\index{Abraham} Abram\index{Abram} abrasion\index{abrasion} abrasive\index{abrasive} abrasiveness\index{abrasiveness} abreaction\index{abreaction} abreast\index{abreast} abridge\index{abridge} abridged\index{abridged} abridger\index{abridger} abroad\index{abroad} abrogate\index{abrogate} abrogation\index{abrogation} abrogator\index{abrogator} abrupt\index{abrupt} abruptness\index{abruptness} abs\index{abs} abscess\index{abscess} abscissa\index{abscissa} abscissae\index{abscissae} abscission\index{abscission} abscond\index{abscond} abseil\index{abseil} abseiler\index{abseiler} absence\index{absence} absent-minded\index{absent-minded} absent-mindedness\index{absent-mindedness} absent\index{absent} absentee\index{absentee} absenteeism\index{absenteeism} absenter\index{absenter} absentia\index{absentia} absinthe\index{absinthe} absolute\index{absolute} absoluteness\index{absoluteness} absolution\index{absolution} absolutism\index{absolutism} absolve\index{absolve} absolver\index{absolver} absorb\index{absorb} absorbed\index{absorbed} absorbency\index{absorbency} absorbent\index{absorbent} absorbs\index{absorbs} absorption\index{absorption} absorptivity\index{absorptivity} abstain\index{abstain} abstemious\index{abstemious} abstemiousness\index{abstemiousness} abstention\index{abstention} abstinence\index{abstinence} abstinent\index{abstinent} abstract\index{abstract} abstracted\index{abstracted} abstractedness\index{abstractedness} abstracter\index{abstracter} abstraction\index{abstraction} abstractionism\index{abstractionism} abstractionist\index{abstractionist} abstractness\index{abstractness} abstractor\index{abstractor} abstruse\index{abstruse} abstruseness\index{abstruseness} absurd\index{absurd} absurdity\index{absurdity} absurdness\index{absurdness} Abu\index{Abu} Abuja\index{Abuja} abundance\index{abundance} abundant\index{abundant} abusable\index{abusable} abuse\index{abuse} abuser\index{abuser} abusive\index{abusive} abusiveness\index{abusiveness} abut\index{abut} abuzz\index{abuzz} abysmal\index{abysmal} abyss\index{abyss} abyssal\index{abyssal} Abyssinia\index{Abyssinia} Abyssinian\index{Abyssinian} Ac\index{Ac} AC\index{AC} acacia\index{acacia} academe\index{academe} academia\index{academia} academic\index{academic} academician\index{academician} academicianship\index{academicianship} academy\index{academy} Acadia\index{Acadia} acanthus\index{acanthus} Acapulco\index{Acapulco} ACAS\index{ACAS} acc.\index{acc.} accede\index{accede} accelerate\index{accelerate} acceleration\index{acceleration} accelerator\index{accelerator} accelerometer\index{accelerometer} accent\index{accent} accented\index{accented} accentual\index{accentual} accentuate\index{accentuate} accentuation\index{accentuation} accept\index{accept} acceptability\index{acceptability} acceptable\index{acceptable} acceptableness\index{acceptableness} acceptably\index{acceptably} acceptance\index{acceptance} acceptant\index{acceptant} accepted\index{accepted} acceptingness\index{acceptingness} acceptor\index{acceptor} access\index{access} accessibility\index{accessibility} accessible\index{accessible} accessibly\index{accessibly} accession\index{accession} accessors\index{accessors} accessory\index{accessory} accidence\index{accidence} accident-prone\index{accident-prone} accident\index{accident} accidental\index{accidental} acclaim\index{acclaim} acclaimer\index{acclaimer} acclamation\index{acclamation} acclimate\index{acclimate} acclimation\index{acclimation} acclimatisation\index{acclimatisation} acclimatise\index{acclimatise} acclimatization\index{acclimatization} acclimatize\index{acclimatize} acclivity\index{acclivity} accolade\index{accolade} accommodate\index{accommodate} accommodating\index{accommodating} accommodation\index{accommodation} accommodative\index{accommodative} accompanied\index{accompanied} accompanier\index{accompanier} accompany\index{accompany} accomplice\index{accomplice} accomplish\index{accomplish} accomplished\index{accomplished} accord\index{accord} accordance\index{accordance} accordant\index{accordant} accordion\index{accordion} accordionist\index{accordionist} accost\index{accost} account\index{account} accountability's\index{accountability's} accountability\index{accountability} accountable\index{accountable} accountably\index{accountably} accountancy\index{accountancy} accountant\index{accountant} accounted\index{accounted} accounting\index{accounting} accoutre\index{accoutre} Accra\index{Accra} accredit\index{accredit} accreditation\index{accreditation} accredited\index{accredited} accreted\index{accreted} accretion\index{accretion} accretive\index{accretive} accrual\index{accrual} accrue\index{accrue} acct\index{acct} acculturate\index{acculturate} acculturation\index{acculturation} accumulate\index{accumulate} accumulation\index{accumulation} accumulative\index{accumulative} accumulator\index{accumulator} accuracy\index{accuracy} accurate\index{accurate} accurately\index{accurately} accurateness\index{accurateness} accursed\index{accursed} accursedness\index{accursedness} accusal\index{accusal} accusation\index{accusation} accusative\index{accusative} accusatory\index{accusatory} accuse\index{accuse} accused\index{accused} accustom\index{accustom} accustomed\index{accustomed} accustomedness\index{accustomedness} ace\index{ace} acellular\index{acellular} acer\index{acer} acerbate\index{acerbate} acerbic\index{acerbic} acerbity\index{acerbity} acetaminophen\index{acetaminophen} acetate\index{acetate} acetic\index{acetic} acetogenic\index{acetogenic} acetone\index{acetone} acetylcholine\index{acetylcholine} acetylene\index{acetylene} Achaean\index{Achaean} ache\index{ache} ached\index{ached} achene\index{achene} aches\index{aches} achievable\index{achievable} achieve\index{achieve} achieved\index{achieved} achievement's\index{achievement's} achievement\index{achievement} achievements\index{achievements} achiever\index{achiever} achieves\index{achieves} achieving\index{achieving} Achilles\index{Achilles} aching\index{aching} achromatic\index{achromatic} achy\index{achy} acid\index{acid} acidification\index{acidification} acidify\index{acidify} acidity\index{acidity} acidophil\index{acidophil} acidophiles\index{acidophiles} acidoses\index{acidoses} acidosis\index{acidosis} acidulous\index{acidulous} Ackerman\index{Ackerman} acknowledge\index{acknowledge} acknowledgeable\index{acknowledgeable} acknowledged\index{acknowledged} ACM\index{ACM} acme\index{acme} acne\index{acne} acolyte\index{acolyte} aconite\index{aconite} acorn\index{acorn} acoustic\index{acoustic} acoustical\index{acoustical} acoustician\index{acoustician} acoustics\index{acoustics} acquaint\index{acquaint} acquaintance\index{acquaintance} acquaintanceship\index{acquaintanceship} acquainted\index{acquainted} acquiesce\index{acquiesce} acquiescence\index{acquiescence} acquiescent\index{acquiescent} acquirable\index{acquirable} acquire\index{acquire} acquirement\index{acquirement} acquisition\index{acquisition} acquisitions\index{acquisitions} acquisitive\index{acquisitive} acquisitiveness\index{acquisitiveness} acquit\index{acquit} acquittal\index{acquittal} acquittance\index{acquittance} acquitter\index{acquitter} acre\index{acre} acreage\index{acreage} acrid\index{acrid} acridity\index{acridity} acridness\index{acridness} acrimonious\index{acrimonious} acrimoniousness\index{acrimoniousness} acrimony\index{acrimony} acrobat\index{acrobat} acrobatic\index{acrobatic} acrobatics\index{acrobatics} acronym\index{acronym} acrophobia\index{acrophobia} acropolis\index{acropolis} across\index{across} acrostic\index{acrostic} acrylate\index{acrylate} acrylic\index{acrylic} act's\index{act's} act\index{act} actinic\index{actinic} actinide\index{actinide} actinium\index{actinium} actinometer\index{actinometer} action\index{action} actionable\index{actionable} actioned\index{actioned} actioning\index{actioning} activate\index{activate} activated\index{activated} activating\index{activating} activation\index{activation} activator\index{activator} active\index{active} actively\index{actively} activeness\index{activeness} activism\index{activism} activity\index{activity} Acton\index{Acton} actor\index{actor} actress\index{actress} actual\index{actual} actuality\index{actuality} actuarial\index{actuarial} actuary\index{actuary} actuate\index{actuate} actuation\index{actuation} actuator\index{actuator} acuity\index{acuity} acumen\index{acumen} acupressure\index{acupressure} acupuncture\index{acupuncture} acute\index{acute} acuteness\index{acuteness} acyclic\index{acyclic} acyclovir\index{acyclovir} ad's\index{ad's} ad\index{ad} adage\index{adage} adagio\index{adagio} Adair\index{Adair} Adam\index{Adam} adamant\index{adamant} Adamski\index{Adamski} Adamson\index{Adamson} adapt\index{adapt} adaptability\index{adaptability} adaptation\index{adaptation} adapted\index{adapted} adaptive\index{adaptive} adaptivity\index{adaptivity} adaptor\index{adaptor} ADC\index{ADC} add-on\index{add-on} add\index{add} addend\index{addend} addenda\index{addenda} addendum\index{addendum} addict\index{addict} addiction\index{addiction} Addis\index{Addis} Addison\index{Addison} addition\index{addition} additional\index{additional} additive\index{additive} additivity\index{additivity} addle\index{addle} addorsed\index{addorsed} address\index{address} addressed\index{addressed} addressee\index{addressee} addresses\index{addresses} addressing\index{addressing} adduce\index{adduce} adducer\index{adducer} adduct\index{adduct} adduction\index{adduction} adductor\index{adductor} Adelaide\index{Adelaide} Adele\index{Adele} Aden\index{Aden} Adenauer\index{Adenauer} adenine\index{adenine} adenoid\index{adenoid} adenoidal\index{adenoidal} adenoma\index{adenoma} adenomata\index{adenomata} adenoviral\index{adenoviral} adenovirus\index{adenovirus} adept\index{adept} adeptness\index{adeptness} adequacy\index{adequacy} adequate\index{adequate} adequateness\index{adequateness} adhere\index{adhere} adherence\index{adherence} adherent\index{adherent} adhesion\index{adhesion} adhesive\index{adhesive} adhesiveness\index{adhesiveness} adiabatic\index{adiabatic} adieu\index{adieu} adipose\index{adipose} Adirondack\index{Adirondack} adiós\index{adiós} adjacency\index{adjacency} adjacent\index{adjacent} adjectival\index{adjectival} adjective\index{adjective} adjoin\index{adjoin} adjourn\index{adjourn} adjudge\index{adjudge} adjudicate\index{adjudicate} adjudication\index{adjudication} adjudicator\index{adjudicator} adjunct\index{adjunct} adjuration\index{adjuration} adjure\index{adjure} adjust\index{adjust} adjusted\index{adjusted} adjustor's\index{adjustor's} adjusts\index{adjusts} adjutant\index{adjutant} Adkins\index{Adkins} Adler\index{Adler} adman\index{adman} admen\index{admen} admin\index{admin} adminicle\index{adminicle} adminicular\index{adminicular} administer\index{administer} administrable\index{administrable} administrate\index{administrate} administration\index{administration} administrator\index{administrator} administratrix\index{administratrix} admirable\index{admirable} admiral\index{admiral} admiralty\index{admiralty} admiration\index{admiration} admire\index{admire} admissibility\index{admissibility} admissible\index{admissible} admission\index{admission} admit\index{admit} admittance\index{admittance} admitted\index{admitted} admixture\index{admixture} admonish\index{admonish} admonisher\index{admonisher} admonition\index{admonition} admonitory\index{admonitory} ado\index{ado} adobe\index{adobe} adolescence's\index{adolescence's} adolescence\index{adolescence} adolescent\index{adolescent} Adolph\index{Adolph} Adonis\index{Adonis} adopt\index{adopt} adopted\index{adopted} adoption\index{adoption} adopts\index{adopts} adorable\index{adorable} adorableness\index{adorableness} adoration\index{adoration} adore\index{adore} adorn\index{adorn} adorned\index{adorned} adrenal\index{adrenal} adrenalin\index{adrenalin} adrenaline\index{adrenaline} Adrian\index{Adrian} Adriatic\index{Adriatic} Adrienne\index{Adrienne} adrift\index{adrift} adroit\index{adroit} adroitness\index{adroitness} ads\index{ads} ADSL\index{ADSL} adsorb\index{adsorb} adsorbate\index{adsorbate} adsorbent\index{adsorbent} adsorption\index{adsorption} ADte\index{ADte} adulate\index{adulate} adulation\index{adulation} adulator\index{adulator} adult\index{adult} adulterant\index{adulterant} adulterate\index{adulterate} adulterated\index{adulterated} adulteration\index{adulteration} adulterer\index{adulterer} adulteress\index{adulteress} adulterous\index{adulterous} adultery\index{adultery} adulthood\index{adulthood} adumbrate\index{adumbrate} adumbration\index{adumbration} advance\index{advance} advantage\index{advantage} advantageous\index{advantageous} advantageousness's\index{advantageousness's} advantageousness\index{advantageousness} advent\index{advent} Adventist's\index{Adventist's} adventist\index{adventist} adventitious\index{adventitious} adventure's\index{adventure's} adventure\index{adventure} adventures\index{adventures} adventuresome\index{adventuresome} adventuress\index{adventuress} adventurism\index{adventurism} adventurous\index{adventurous} adventurously\index{adventurously} adventurousness\index{adventurousness} adverb\index{adverb} adverbial\index{adverbial} adversarial\index{adversarial} adversary\index{adversary} adverse\index{adverse} adverseness\index{adverseness} adversity\index{adversity} advert\index{advert} advertise\index{advertise} advertised\index{advertised} advertising\index{advertising} advice\index{advice} advisabilities\index{advisabilities} advisability's\index{advisability's} advisability\index{advisability} advisable\index{advisable} advise\index{advise} advisedly\index{advisedly} advisee\index{advisee} advisor\index{advisor} advisory\index{advisory} advocacy\index{advocacy} advocate\index{advocate} adware\index{adware} adze\index{adze} Aegean\index{Aegean} aegis\index{aegis} aegrotat\index{aegrotat} Aeneas\index{Aeneas} Aeneid\index{Aeneid} aeolian\index{aeolian} Aeolus\index{Aeolus} aeon\index{aeon} aerate\index{aerate} aeration\index{aeration} aerator\index{aerator} aerial\index{aerial} aerialist\index{aerialist} aerie\index{aerie} aero\index{aero} aero-engine\index{aero-engine} aeroacoustic\index{aeroacoustic} aerobatic\index{aerobatic} aerobic\index{aerobic} aerodrome\index{aerodrome} aerodynamic\index{aerodynamic} aerodynamics\index{aerodynamics} aeroelastic\index{aeroelastic} aeroelasticity\index{aeroelasticity} aerofoil\index{aerofoil} aerogel\index{aerogel} aerogramme\index{aerogramme} aerolite\index{aerolite} aeromagnetic\index{aeromagnetic} aeromedical\index{aeromedical} aeromodeller\index{aeromodeller} aeromodelling\index{aeromodelling} aeronautic\index{aeronautic} aeronautical\index{aeronautical} aeronautics\index{aeronautics} aerophone\index{aerophone} aeroplane\index{aeroplane} aeroponic\index{aeroponic} aeroponically\index{aeroponically} aerosol\index{aerosol} aerospace\index{aerospace} Aeschylus\index{Aeschylus} Aesculapius\index{Aesculapius} Aesop\index{Aesop} aesthete\index{aesthete} aesthetic\index{aesthetic} aestheticism\index{aestheticism} aestival\index{aestival} aestivate\index{aestivate} aether\index{aether} aetiology\index{aetiology} AFAIK\index{AFAIK} afar\index{afar} AFC\index{AFC} affability\index{affability} affable\index{affable} affair\index{affair} affect\index{affect} affectation\index{affectation} affected\index{affected} affectedly\index{affectedly} affecter\index{affecter} affecting\index{affecting} affection\index{affection} affectionate\index{affectionate} affectionately\index{affectionately} affective\index{affective} affects\index{affects} afferent\index{afferent} affiance\index{affiance} affidavit\index{affidavit} affiliate\index{affiliate} affiliated\index{affiliated} affiliation\index{affiliation} affine\index{affine} affinity\index{affinity} affirm\index{affirm} affirmation\index{affirmation} affirmed\index{affirmed} affirms\index{affirms} affix\index{affix} afflatus\index{afflatus} afflict\index{afflict} affliction\index{affliction} affluence\index{affluence} affluent\index{affluent} afford\index{afford} affordable\index{affordable} afforest\index{afforest} afforestation\index{afforestation} affray\index{affray} affricate\index{affricate} affrication\index{affrication} affricative\index{affricative} affright\index{affright} affront\index{affront} Afghan\index{Afghan} Afghani\index{Afghani} Afghanistan\index{Afghanistan} aficionado\index{aficionado} afield\index{afield} afire\index{afire} aflame\index{aflame}
%
% Set index pagestyle
\pagestyle{indexpagestyle}
\printindex
\end{document}
答案1
这里有一个使用类似方法的解决方案\label
- \ref
。它应该适用于任何定制页眉/页脚的包,因为命令\indexentryfirst
和\indexentrylast
始终保留当前页面上的第一个和最后一个索引条目(至少在对文档进行足够频繁的乳胶处理之后),同时设置它们不会干扰页面标记。
\documentclass{article}
\usepackage{filecontents}
\usepackage[xindy]{imakeidx}
\usepackage{titleps}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\indexmark[1]{#1\indexentry{#1}}
\makeatletter
\newcommand\indexentry[1]%
{\@bsphack
\protected@write\@auxout{}%
{\string\newindexentry{#1}{\thepage}}%
\@esphack
}
\newcommand\newindexentry[2]%
{\expandafter\@newindexentryfirst\csname first@#2\endcsname{#1}%
\expandafter\@newindexentrylast \csname last@#2\endcsname{#1}%
}
\newcommand\@newindexentryfirst[2]{\ifx#1\relax\gdef#1{#2}\fi}
\newcommand\@newindexentrylast [2]{\gdef#1{#2}}
\newcommand\indexentryfirst
{\expandafter\@indexentryX\csname first@\thepage\endcsname{First}}
\newcommand\indexentrylast
{\expandafter\@indexentryX\csname last@\thepage\endcsname{Last}}
\newcommand\@indexentryX[2]%
{\ifx#1\relax
\nfss@text{\reset@font\bfseries ??}%
\@latex@warning{#2 index entry on page \thepage \space undefined}%
\else
#1%
\fi
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpagestyle{indexpagestyle}[]%
{\sethead
{\indexentryfirst -- \indexentrylast}%
{}%
{}%
\headrule%
\setfoot{}{\thepage}{}%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{filecontents*}{\jobname.xdy}
(markup-index :open "~n
\begin{theindex}
\providecommand*\lettergroupDefault[1]{}
\providecommand*\lettergroup[1]{\textbf{#1}}
~n"
:close "~n~n\end{theindex}~n"
:tree)
(markup-keyword-list :open "\indexmark{" :close "}" )
\end{filecontents*}
\makeindex[options={-M \jobname.xdy}]
\begin{document}
Aachen\index{Aachen} aardvark\index{aardvark} aargh\index{aargh}
Aarhus\index{Aarhus} Aaron\index{Aaron} Aaronvitch\index{Aaronvitch}
Ababa\index{Ababa} aback\index{aback} abacus\index{abacus}
abaft\index{abaft} abalone\index{abalone} abandon\index{abandon}
abandoner\index{abandoner} abase\index{abase} abaser\index{abaser}
abash\index{abash} abashed\index{abashed} abate\index{abate}
abated\index{abated} abater\index{abater} abattoir\index{abattoir}
Abba\index{Abba} abbess\index{abbess} abbey\index{abbey}
abbot\index{abbot} Abbott\index{Abbott} abbreviate\index{abbreviate}
abbreviated\index{abbreviated} abbreviation\index{abbreviation}
abbé\index{abbé} ABC\index{ABC} abdicate\index{abdicate}
abdication\index{abdication} abdomen\index{abdomen}
abdominal\index{abdominal} abduct\index{abduct}
abductee\index{abductee} abduction\index{abduction}
abductor\index{abductor} Abdul\index{Abdul} Abe\index{Abe}
abeam\index{abeam} Abel\index{Abel} Abelard\index{Abelard}
Abelson\index{Abelson} Aberconwy\index{Aberconwy}
Aberdeen\index{Aberdeen} Aberdeenshire\index{Aberdeenshire}
Abernathy\index{Abernathy} aberrant\index{aberrant}
aberration\index{aberration} Aberystwyth\index{Aberystwyth}
abet\index{abet} abettor\index{abettor} abeyance\index{abeyance}
abeyant\index{abeyant} abhor\index{abhor} abhorrence\index{abhorrence}
abhorrent\index{abhorrent} abhorrer\index{abhorrer}
abidance\index{abidance} abide\index{abide} abider\index{abider}
Abidjan\index{Abidjan} Abigail\index{Abigail} Abilene\index{Abilene}
ability\index{ability} abiogenesis\index{abiogenesis}
abiogenic\index{abiogenic} abiotic\index{abiotic} abject\index{abject}
abjection\index{abjection} abjectness\index{abjectness}
abjuration\index{abjuration} abjure\index{abjure} ablate\index{ablate}
ablation\index{ablation} ablaze\index{ablaze}
able-bodied\index{able-bodied} able\index{able} abler\index{abler}
abloom\index{abloom} ablution\index{ablution} abnegate\index{abnegate}
abnegation\index{abnegation} abnormal\index{abnormal}
abnormality\index{abnormality} aboard\index{aboard} abode\index{abode}
abolish\index{abolish} abolition\index{abolition}
abolitionism\index{abolitionism} abolitionist\index{abolitionist}
abominable\index{abominable} abominate\index{abominate}
abomination\index{abomination} aboriginal\index{aboriginal}
Aboriginals\index{Aboriginals} aborigine\index{aborigine}
abort\index{abort} aborter\index{aborter} abortion\index{abortion}
abortionist\index{abortionist} abortive\index{abortive}
abound\index{abound} about\index{about} above\index{above}
aboveboard\index{aboveboard} aboveground\index{aboveground}
abracadabra\index{abracadabra} abrade\index{abrade}
abrader\index{abrader} Abraham\index{Abraham} Abram\index{Abram}
abrasion\index{abrasion} abrasive\index{abrasive}
abrasiveness\index{abrasiveness} abreaction\index{abreaction}
abreast\index{abreast} abridge\index{abridge} abridged\index{abridged}
abridger\index{abridger} abroad\index{abroad} abrogate\index{abrogate}
abrogation\index{abrogation} abrogator\index{abrogator}
abrupt\index{abrupt} abruptness\index{abruptness} abs\index{abs}
abscess\index{abscess} abscissa\index{abscissa}
abscissae\index{abscissae} abscission\index{abscission}
abscond\index{abscond} abseil\index{abseil} abseiler\index{abseiler}
absence\index{absence} absent-minded\index{absent-minded}
absent-mindedness\index{absent-mindedness} absent\index{absent}
absentee\index{absentee} absenteeism\index{absenteeism}
absenter\index{absenter} absentia\index{absentia}
absinthe\index{absinthe} absolute\index{absolute}
absoluteness\index{absoluteness} absolution\index{absolution}
absolutism\index{absolutism} absolve\index{absolve}
absolver\index{absolver} absorb\index{absorb} absorbed\index{absorbed}
absorbency\index{absorbency} absorbent\index{absorbent}
absorbs\index{absorbs} absorption\index{absorption}
absorptivity\index{absorptivity} abstain\index{abstain}
abstemious\index{abstemious} abstemiousness\index{abstemiousness}
abstention\index{abstention} abstinence\index{abstinence}
abstinent\index{abstinent} abstract\index{abstract}
abstracted\index{abstracted} abstractedness\index{abstractedness}
abstracter\index{abstracter} abstraction\index{abstraction}
abstractionism\index{abstractionism}
abstractionist\index{abstractionist} abstractness\index{abstractness}
abstractor\index{abstractor} abstruse\index{abstruse}
abstruseness\index{abstruseness} absurd\index{absurd}
absurdity\index{absurdity} absurdness\index{absurdness} Abu\index{Abu}
Abuja\index{Abuja} abundance\index{abundance} abundant\index{abundant}
abusable\index{abusable} abuse\index{abuse} abuser\index{abuser}
abusive\index{abusive} abusiveness\index{abusiveness} abut\index{abut}
abuzz\index{abuzz} abysmal\index{abysmal} abyss\index{abyss}
abyssal\index{abyssal} Abyssinia\index{Abyssinia}
Abyssinian\index{Abyssinian} Ac\index{Ac} AC\index{AC}
acacia\index{acacia} academe\index{academe} academia\index{academia}
academic\index{academic} academician\index{academician}
academicianship\index{academicianship} academy\index{academy}
Acadia\index{Acadia} acanthus\index{acanthus} Acapulco\index{Acapulco}
ACAS\index{ACAS} acc.\index{acc.} accede\index{accede}
accelerate\index{accelerate} acceleration\index{acceleration}
accelerator\index{accelerator} accelerometer\index{accelerometer}
accent\index{accent} accented\index{accented}
accentual\index{accentual} accentuate\index{accentuate}
accentuation\index{accentuation} accept\index{accept}
acceptability\index{acceptability} acceptable\index{acceptable}
acceptableness\index{acceptableness} acceptably\index{acceptably}
acceptance\index{acceptance} acceptant\index{acceptant}
accepted\index{accepted} acceptingness\index{acceptingness}
acceptor\index{acceptor} access\index{access}
accessibility\index{accessibility} accessible\index{accessible}
accessibly\index{accessibly} accession\index{accession}
accessors\index{accessors} accessory\index{accessory}
accidence\index{accidence} accident-prone\index{accident-prone}
accident\index{accident} accidental\index{accidental}
acclaim\index{acclaim} acclaimer\index{acclaimer}
acclamation\index{acclamation} acclimate\index{acclimate}
acclimation\index{acclimation} acclimatisation\index{acclimatisation}
acclimatise\index{acclimatise} acclimatization\index{acclimatization}
acclimatize\index{acclimatize} acclivity\index{acclivity}
accolade\index{accolade} accommodate\index{accommodate}
accommodating\index{accommodating} accommodation\index{accommodation}
accommodative\index{accommodative} accompanied\index{accompanied}
accompanier\index{accompanier} accompany\index{accompany}
accomplice\index{accomplice} accomplish\index{accomplish}
accomplished\index{accomplished} accord\index{accord}
accordance\index{accordance} accordant\index{accordant}
accordion\index{accordion} accordionist\index{accordionist}
accost\index{accost} account\index{account}
accountability's\index{accountability's}
accountability\index{accountability} accountable\index{accountable}
accountably\index{accountably} accountancy\index{accountancy}
accountant\index{accountant} accounted\index{accounted}
accounting\index{accounting} accoutre\index{accoutre}
Accra\index{Accra} accredit\index{accredit}
accreditation\index{accreditation} accredited\index{accredited}
accreted\index{accreted} accretion\index{accretion}
accretive\index{accretive} accrual\index{accrual} accrue\index{accrue}
acct\index{acct} acculturate\index{acculturate}
acculturation\index{acculturation} accumulate\index{accumulate}
accumulation\index{accumulation} accumulative\index{accumulative}
accumulator\index{accumulator} accuracy\index{accuracy}
accurate\index{accurate} accurately\index{accurately}
accurateness\index{accurateness} accursed\index{accursed}
accursedness\index{accursedness} accusal\index{accusal}
accusation\index{accusation} accusative\index{accusative}
accusatory\index{accusatory} accuse\index{accuse}
accused\index{accused} accustom\index{accustom}
accustomed\index{accustomed} accustomedness\index{accustomedness}
ace\index{ace} acellular\index{acellular} acer\index{acer}
acerbate\index{acerbate} acerbic\index{acerbic}
acerbity\index{acerbity} acetaminophen\index{acetaminophen}
acetate\index{acetate} acetic\index{acetic}
acetogenic\index{acetogenic} acetone\index{acetone}
acetylcholine\index{acetylcholine} acetylene\index{acetylene}
Achaean\index{Achaean} ache\index{ache} ached\index{ached}
achene\index{achene} aches\index{aches} achievable\index{achievable}
achieve\index{achieve} achieved\index{achieved}
achievement's\index{achievement's} achievement\index{achievement}
achievements\index{achievements} achiever\index{achiever}
achieves\index{achieves} achieving\index{achieving}
Achilles\index{Achilles} aching\index{aching}
achromatic\index{achromatic} achy\index{achy} acid\index{acid}
acidification\index{acidification} acidify\index{acidify}
acidity\index{acidity} acidophil\index{acidophil}
acidophiles\index{acidophiles} acidoses\index{acidoses}
acidosis\index{acidosis} acidulous\index{acidulous}
Ackerman\index{Ackerman} acknowledge\index{acknowledge}
acknowledgeable\index{acknowledgeable}
acknowledged\index{acknowledged} ACM\index{ACM} acme\index{acme}
acne\index{acne} acolyte\index{acolyte} aconite\index{aconite}
acorn\index{acorn} acoustic\index{acoustic}
acoustical\index{acoustical} acoustician\index{acoustician}
acoustics\index{acoustics} acquaint\index{acquaint}
acquaintance\index{acquaintance}
acquaintanceship\index{acquaintanceship} acquainted\index{acquainted}
acquiesce\index{acquiesce} acquiescence\index{acquiescence}
acquiescent\index{acquiescent} acquirable\index{acquirable}
acquire\index{acquire} acquirement\index{acquirement}
acquisition\index{acquisition} acquisitions\index{acquisitions}
acquisitive\index{acquisitive} acquisitiveness\index{acquisitiveness}
acquit\index{acquit} acquittal\index{acquittal}
acquittance\index{acquittance} acquitter\index{acquitter}
acre\index{acre} acreage\index{acreage} acrid\index{acrid}
acridity\index{acridity} acridness\index{acridness}
acrimonious\index{acrimonious} acrimoniousness\index{acrimoniousness}
acrimony\index{acrimony} acrobat\index{acrobat}
acrobatic\index{acrobatic} acrobatics\index{acrobatics}
acronym\index{acronym} acrophobia\index{acrophobia}
acropolis\index{acropolis} across\index{across}
acrostic\index{acrostic} acrylate\index{acrylate}
acrylic\index{acrylic} act's\index{act's} act\index{act}
actinic\index{actinic} actinide\index{actinide}
actinium\index{actinium} actinometer\index{actinometer}
action\index{action} actionable\index{actionable}
actioned\index{actioned} actioning\index{actioning}
activate\index{activate} activated\index{activated}
activating\index{activating} activation\index{activation}
activator\index{activator} active\index{active}
actively\index{actively} activeness\index{activeness}
activism\index{activism} activity\index{activity} Acton\index{Acton}
actor\index{actor} actress\index{actress} actual\index{actual}
actuality\index{actuality} actuarial\index{actuarial}
actuary\index{actuary} actuate\index{actuate}
actuation\index{actuation} actuator\index{actuator}
acuity\index{acuity} acumen\index{acumen}
acupressure\index{acupressure} acupuncture\index{acupuncture}
acute\index{acute} acuteness\index{acuteness} acyclic\index{acyclic}
acyclovir\index{acyclovir} ad's\index{ad's} ad\index{ad}
adage\index{adage} adagio\index{adagio} Adair\index{Adair}
Adam\index{Adam} adamant\index{adamant} Adamski\index{Adamski}
Adamson\index{Adamson} adapt\index{adapt}
adaptability\index{adaptability} adaptation\index{adaptation}
adapted\index{adapted} adaptive\index{adaptive}
adaptivity\index{adaptivity} adaptor\index{adaptor} ADC\index{ADC}
add-on\index{add-on} add\index{add} addend\index{addend}
addenda\index{addenda} addendum\index{addendum} addict\index{addict}
addiction\index{addiction} Addis\index{Addis} Addison\index{Addison}
addition\index{addition} additional\index{additional}
additive\index{additive} additivity\index{additivity}
addle\index{addle} addorsed\index{addorsed} address\index{address}
addressed\index{addressed} addressee\index{addressee}
addresses\index{addresses} addressing\index{addressing}
adduce\index{adduce} adducer\index{adducer} adduct\index{adduct}
adduction\index{adduction} adductor\index{adductor}
Adelaide\index{Adelaide} Adele\index{Adele} Aden\index{Aden}
Adenauer\index{Adenauer} adenine\index{adenine} adenoid\index{adenoid}
adenoidal\index{adenoidal} adenoma\index{adenoma}
adenomata\index{adenomata} adenoviral\index{adenoviral}
adenovirus\index{adenovirus} adept\index{adept}
adeptness\index{adeptness} adequacy\index{adequacy}
adequate\index{adequate} adequateness\index{adequateness}
adhere\index{adhere} adherence\index{adherence}
adherent\index{adherent} adhesion\index{adhesion}
adhesive\index{adhesive} adhesiveness\index{adhesiveness}
adiabatic\index{adiabatic} adieu\index{adieu} adipose\index{adipose}
Adirondack\index{Adirondack} adiós\index{adiós}
adjacency\index{adjacency} adjacent\index{adjacent}
adjectival\index{adjectival} adjective\index{adjective}
adjoin\index{adjoin} adjourn\index{adjourn} adjudge\index{adjudge}
adjudicate\index{adjudicate} adjudication\index{adjudication}
adjudicator\index{adjudicator} adjunct\index{adjunct}
adjuration\index{adjuration} adjure\index{adjure} adjust\index{adjust}
adjusted\index{adjusted} adjustor's\index{adjustor's}
adjusts\index{adjusts} adjutant\index{adjutant} Adkins\index{Adkins}
Adler\index{Adler} adman\index{adman} admen\index{admen}
admin\index{admin} adminicle\index{adminicle}
adminicular\index{adminicular} administer\index{administer}
administrable\index{administrable} administrate\index{administrate}
administration\index{administration}
administrator\index{administrator}
administratrix\index{administratrix} admirable\index{admirable}
admiral\index{admiral} admiralty\index{admiralty}
admiration\index{admiration} admire\index{admire}
admissibility\index{admissibility} admissible\index{admissible}
admission\index{admission} admit\index{admit}
admittance\index{admittance} admitted\index{admitted}
admixture\index{admixture} admonish\index{admonish}
admonisher\index{admonisher} admonition\index{admonition}
admonitory\index{admonitory} ado\index{ado} adobe\index{adobe}
adolescence's\index{adolescence's} adolescence\index{adolescence}
adolescent\index{adolescent} Adolph\index{Adolph} Adonis\index{Adonis}
adopt\index{adopt} adopted\index{adopted} adoption\index{adoption}
adopts\index{adopts} adorable\index{adorable}
adorableness\index{adorableness} adoration\index{adoration}
adore\index{adore} adorn\index{adorn} adorned\index{adorned}
adrenal\index{adrenal} adrenalin\index{adrenalin}
adrenaline\index{adrenaline} Adrian\index{Adrian}
Adriatic\index{Adriatic} Adrienne\index{Adrienne} adrift\index{adrift}
adroit\index{adroit} adroitness\index{adroitness} ads\index{ads}
ADSL\index{ADSL} adsorb\index{adsorb} adsorbate\index{adsorbate}
adsorbent\index{adsorbent} adsorption\index{adsorption}
ADte\index{ADte} adulate\index{adulate} adulation\index{adulation}
adulator\index{adulator} adult\index{adult}
adulterant\index{adulterant} adulterate\index{adulterate}
adulterated\index{adulterated} adulteration\index{adulteration}
adulterer\index{adulterer} adulteress\index{adulteress}
adulterous\index{adulterous} adultery\index{adultery}
adulthood\index{adulthood} adumbrate\index{adumbrate}
adumbration\index{adumbration} advance\index{advance}
advantage\index{advantage} advantageous\index{advantageous}
advantageousness's\index{advantageousness's}
advantageousness\index{advantageousness} advent\index{advent}
Adventist's\index{Adventist's} adventist\index{adventist}
adventitious\index{adventitious} adventure's\index{adventure's}
adventure\index{adventure} adventures\index{adventures}
adventuresome\index{adventuresome} adventuress\index{adventuress}
adventurism\index{adventurism} adventurous\index{adventurous}
adventurously\index{adventurously}
adventurousness\index{adventurousness} adverb\index{adverb}
adverbial\index{adverbial} adversarial\index{adversarial}
adversary\index{adversary} adverse\index{adverse}
adverseness\index{adverseness} adversity\index{adversity}
advert\index{advert} advertise\index{advertise}
advertised\index{advertised} advertising\index{advertising}
advice\index{advice} advisabilities\index{advisabilities}
advisability's\index{advisability's} advisability\index{advisability}
advisable\index{advisable} advise\index{advise}
advisedly\index{advisedly} advisee\index{advisee}
advisor\index{advisor} advisory\index{advisory}
advocacy\index{advocacy} advocate\index{advocate} adware\index{adware}
adze\index{adze} Aegean\index{Aegean} aegis\index{aegis}
aegrotat\index{aegrotat} Aeneas\index{Aeneas} Aeneid\index{Aeneid}
aeolian\index{aeolian} Aeolus\index{Aeolus} aeon\index{aeon}
aerate\index{aerate} aeration\index{aeration} aerator\index{aerator}
aerial\index{aerial} aerialist\index{aerialist} aerie\index{aerie}
aero\index{aero} aero-engine\index{aero-engine}
aeroacoustic\index{aeroacoustic} aerobatic\index{aerobatic}
aerobic\index{aerobic} aerodrome\index{aerodrome}
aerodynamic\index{aerodynamic} aerodynamics\index{aerodynamics}
aeroelastic\index{aeroelastic} aeroelasticity\index{aeroelasticity}
aerofoil\index{aerofoil} aerogel\index{aerogel}
aerogramme\index{aerogramme} aerolite\index{aerolite}
aeromagnetic\index{aeromagnetic} aeromedical\index{aeromedical}
aeromodeller\index{aeromodeller} aeromodelling\index{aeromodelling}
aeronautic\index{aeronautic} aeronautical\index{aeronautical}
aeronautics\index{aeronautics} aerophone\index{aerophone}
aeroplane\index{aeroplane} aeroponic\index{aeroponic}
aeroponically\index{aeroponically} aerosol\index{aerosol}
aerospace\index{aerospace} Aeschylus\index{Aeschylus}
Aesculapius\index{Aesculapius} Aesop\index{Aesop}
aesthete\index{aesthete} aesthetic\index{aesthetic}
aestheticism\index{aestheticism} aestival\index{aestival}
aestivate\index{aestivate} aether\index{aether}
aetiology\index{aetiology} AFAIK\index{AFAIK} afar\index{afar}
AFC\index{AFC} affability\index{affability} affable\index{affable}
affair\index{affair} affect\index{affect}
affectation\index{affectation} affected\index{affected}
affectedly\index{affectedly} affecter\index{affecter}
affecting\index{affecting} affection\index{affection}
affectionate\index{affectionate} affectionately\index{affectionately}
affective\index{affective} affects\index{affects}
afferent\index{afferent} affiance\index{affiance}
affidavit\index{affidavit} affiliate\index{affiliate}
affiliated\index{affiliated} affiliation\index{affiliation}
affine\index{affine} affinity\index{affinity} affirm\index{affirm}
affirmation\index{affirmation} affirmed\index{affirmed}
affirms\index{affirms} affix\index{affix} afflatus\index{afflatus}
afflict\index{afflict} affliction\index{affliction}
affluence\index{affluence} affluent\index{affluent}
afford\index{afford} affordable\index{affordable}
afforest\index{afforest} afforestation\index{afforestation}
affray\index{affray} affricate\index{affricate}
affrication\index{affrication} affricative\index{affricative}
affright\index{affright} affront\index{affront} Afghan\index{Afghan}
Afghani\index{Afghani} Afghanistan\index{Afghanistan}
aficionado\index{aficionado} afield\index{afield} afire\index{afire}
aflame\index{aflame}
%
% Set index pagestyle
\clearpage
\pagestyle{indexpagestyle}
\printindex
\end{document}
答案2
以下是符合该方法精神的解决方案fancyhdr
。要点是titleps
按以下方式定义页面样式。
\makeatletter
\newcommand\MarkbothHack
{\let\ORIGttl@titlemarks\ttl@titlemarks
\let\ttl@titlemarks\relax
}
\newcommand\UndoMarkbothHack
{\clearpage
\markboth{}{}%
\let\ttl@titlemarks\ORIGttl@titlemarks
}
\makeatother
\newcommand\wordrange{\rightmark\ -- \leftmark}
\newpagestyle{indexpagestyle}%
{\sethead{\wordrange}{}{}%
\headrule
\setfoot{}{\thepage}{}%
}%
用法:
\clearpage
\MarkbothHack
\pagestyle{indexpagestyle}%
\printindex
\UndoMarkbothHack
更复杂的定义是\wordrange
避免在页面上没有索引条目(可能发生在双面文档中)或只有一个索引条目(可能发生在单列索引的情况下)的情况下使用连字符。
\usepackage{ifthen}
\newcommand\wordrange
{\ifthenelse{\equal{\leftmark}{}}%
{\rightmark}%
{\ifthenelse{\equal{\rightmark}{\leftmark}}%
{\rightmark}%
{\rightmark\ -- \leftmark}%
}
}
以下是示例代码,在book
下面的注释中。通过(取消)注释相应的行,您可以在fancyhdr
和之间进行选择titleps
,以及在单列和双列索引之间进行选择。在单列索引中,最后一个索引页仅包含一个条目,以证明的定义\wordrange
也能正确处理这种情况。
\documentclass{book}
\usepackage{ifthen}
\usepackage{filecontents}
\usepackage[xindy]{imakeidx}
%\usepackage{fancyhdr}
\usepackage{titleps}
\usepackage{lipsum}
\makeatletter
\@ifpackageloaded{fancyhdr}%
{\fancypagestyle{indexpagestyle}%
{\fancyhead{}
\fancyhead[RO,LE]{\wordrange}
}
\newcommand\MarkbothHack{}
\newcommand\UndoMarkbothHack{\markboth{}{}}
}%
{\@ifpackageloaded{titleps}%
{\newpagestyle{indexpagestyle}%
{\sethead[][][\wordrange]{\wordrange}{}{}%
\headrule
\setfoot{}{\thepage}{}%
}%
\newcommand\MarkbothHack
{\let\ORIGttl@titlemarks\ttl@titlemarks
\let\ttl@titlemarks\relax
}
\newcommand\UndoMarkbothHack
{\clearpage
\markboth{}{}%
\let\ttl@titlemarks\ORIGttl@titlemarks
}
}%
{}
}
\makeatother
\newcommand\wordrange
{\ifthenelse{\equal{\leftmark}{}}%
{\rightmark}%
{\ifthenelse{\equal{\rightmark}{\leftmark}}%
{\rightmark}%
{\rightmark\ -- \leftmark}%
}
}
\newcommand{\indexmark}[1]{#1\markboth{#1}{#1}}
\makeindex[options={-M \jobname.xdy}] % two columns
%\makeindex[options={-M \jobname.xdy},columns=1] % one column
\begin{filecontents*}{\jobname.xdy}
(markup-index :open "~n
\begin{theindex}
\providecommand*\lettergroupDefault[1]{}
\providecommand*\lettergroup[1]{\textbf{#1}}
~n"
:close "~n~n\end{theindex}~n"
:tree)
(markup-keyword-list :open "\indexmark{" :close "}" )
\end{filecontents*}
\begin{document}
Aachen\index{Aachen} aardvark\index{aardvark} aargh\index{aargh}
Aarhus\index{Aarhus} Aaron\index{Aaron} Aaronvitch\index{Aaronvitch}
Ababa\index{Ababa} aback\index{aback} abacus\index{abacus}
abaft\index{abaft} abalone\index{abalone} abandon\index{abandon}
abandoner\index{abandoner} abase\index{abase} abaser\index{abaser}
abash\index{abash} abashed\index{abashed} abate\index{abate}
abated\index{abated} abater\index{abater} abattoir\index{abattoir}
Abba\index{Abba} abbess\index{abbess} abbey\index{abbey}
abbot\index{abbot} Abbott\index{Abbott} abbreviate\index{abbreviate}
abbreviated\index{abbreviated} abbreviation\index{abbreviation}
abbé\index{abbé} ABC\index{ABC} abdicate\index{abdicate}
abdication\index{abdication} abdomen\index{abdomen}
abdominal\index{abdominal} abduct\index{abduct}
abductee\index{abductee} abduction\index{abduction}
abductor\index{abductor} Abdul\index{Abdul} Abe\index{Abe}
abeam\index{abeam} Abel\index{Abel} Abelard\index{Abelard}
Abelson\index{Abelson} Aberconwy\index{Aberconwy}
Aberdeen\index{Aberdeen} Aberdeenshire\index{Aberdeenshire}
Abernathy\index{Abernathy} aberrant\index{aberrant}
aberration\index{aberration} Aberystwyth\index{Aberystwyth}
abet\index{abet} abettor\index{abettor} abeyance\index{abeyance}
abeyant\index{abeyant} abhor\index{abhor} abhorrence\index{abhorrence}
abhorrent\index{abhorrent} abhorrer\index{abhorrer}
abidance\index{abidance} abide\index{abide} abider\index{abider}
Abidjan\index{Abidjan} Abigail\index{Abigail} Abilene\index{Abilene}
ability\index{ability} abiogenesis\index{abiogenesis}
abiogenic\index{abiogenic} abiotic\index{abiotic} abject\index{abject}
abjection\index{abjection} abjectness\index{abjectness}
abjuration\index{abjuration} abjure\index{abjure} ablate\index{ablate}
ablation\index{ablation} ablaze\index{ablaze}
able-bodied\index{able-bodied} able\index{able} abler\index{abler}
abloom\index{abloom} ablution\index{ablution} abnegate\index{abnegate}
abnegation\index{abnegation} abnormal\index{abnormal}
abnormality\index{abnormality} aboard\index{aboard} abode\index{abode}
abolish\index{abolish} abolition\index{abolition}
abolitionism\index{abolitionism} abolitionist\index{abolitionist}
abominable\index{abominable} abominate\index{abominate}
abomination\index{abomination} aboriginal\index{aboriginal}
Aboriginals\index{Aboriginals} aborigine\index{aborigine}
abort\index{abort} aborter\index{aborter} abortion\index{abortion}
abortionist\index{abortionist} abortive\index{abortive}
abound\index{abound} about\index{about} above\index{above}
aboveboard\index{aboveboard} aboveground\index{aboveground}
abracadabra\index{abracadabra} abrade\index{abrade}
abrader\index{abrader} Abraham\index{Abraham} Abram\index{Abram}
abrasion\index{abrasion} abrasive\index{abrasive}
abrasiveness\index{abrasiveness} abreaction\index{abreaction}
abreast\index{abreast} abridge\index{abridge} abridged\index{abridged}
abridger\index{abridger} abroad\index{abroad} abrogate\index{abrogate}
abrogation\index{abrogation} abrogator\index{abrogator}
abrupt\index{abrupt} abruptness\index{abruptness} abs\index{abs}
abscess\index{abscess} abscissa\index{abscissa}
abscissae\index{abscissae} abscission\index{abscission}
abscond\index{abscond} abseil\index{abseil} abseiler\index{abseiler}
absence\index{absence} absent-minded\index{absent-minded}
absent-mindedness\index{absent-mindedness} absent\index{absent}
absentee\index{absentee} absenteeism\index{absenteeism}
absenter\index{absenter} absentia\index{absentia}
absinthe\index{absinthe} absolute\index{absolute}
absoluteness\index{absoluteness} absolution\index{absolution}
absolutism\index{absolutism} absolve\index{absolve}
absolver\index{absolver} absorb\index{absorb} absorbed\index{absorbed}
absorbency\index{absorbency} absorbent\index{absorbent}
absorbs\index{absorbs} absorption\index{absorption}
absorptivity\index{absorptivity} abstain\index{abstain}
abstemious\index{abstemious} abstemiousness\index{abstemiousness}
abstention\index{abstention} abstinence\index{abstinence}
abstinent\index{abstinent} abstract\index{abstract}
abstracted\index{abstracted} abstractedness\index{abstractedness}
abstracter\index{abstracter} abstraction\index{abstraction}
abstractionism\index{abstractionism}
abstractionist\index{abstractionist} abstractness\index{abstractness}
abstractor\index{abstractor} abstruse\index{abstruse}
abstruseness\index{abstruseness} absurd\index{absurd}
absurdity\index{absurdity} absurdness\index{absurdness} Abu\index{Abu}
Abuja\index{Abuja} abundance\index{abundance} abundant\index{abundant}
abusable\index{abusable} abuse\index{abuse} abuser\index{abuser}
abusive\index{abusive} abusiveness\index{abusiveness} abut\index{abut}
abuzz\index{abuzz} abysmal\index{abysmal} abyss\index{abyss}
abyssal\index{abyssal} Abyssinia\index{Abyssinia}
Abyssinian\index{Abyssinian} Ac\index{Ac} AC\index{AC}
acacia\index{acacia} academe\index{academe} academia\index{academia}
academic\index{academic} academician\index{academician}
academicianship\index{academicianship} academy\index{academy}
Acadia\index{Acadia} acanthus\index{acanthus} Acapulco\index{Acapulco}
ACAS\index{ACAS} acc.\index{acc.} accede\index{accede}
accelerate\index{accelerate} acceleration\index{acceleration}
accelerator\index{accelerator} accelerometer\index{accelerometer}
accent\index{accent} accented\index{accented}
accentual\index{accentual} accentuate\index{accentuate}
accentuation\index{accentuation} accept\index{accept}
acceptability\index{acceptability} acceptable\index{acceptable}
acceptableness\index{acceptableness} acceptably\index{acceptably}
acceptance\index{acceptance} acceptant\index{acceptant}
accepted\index{accepted} acceptingness\index{acceptingness}
acceptor\index{acceptor} access\index{access}
accessibility\index{accessibility} accessible\index{accessible}
accessibly\index{accessibly} accession\index{accession}
accessors\index{accessors} accessory\index{accessory}
accidence\index{accidence} accident-prone\index{accident-prone}
accident\index{accident} accidental\index{accidental}
acclaim\index{acclaim} acclaimer\index{acclaimer}
acclamation\index{acclamation} acclimate\index{acclimate}
acclimation\index{acclimation} acclimatisation\index{acclimatisation}
acclimatise\index{acclimatise} acclimatization\index{acclimatization}
acclimatize\index{acclimatize} acclivity\index{acclivity}
accolade\index{accolade} accommodate\index{accommodate}
accommodating\index{accommodating} accommodation\index{accommodation}
accommodative\index{accommodative} accompanied\index{accompanied}
accompanier\index{accompanier} accompany\index{accompany}
accomplice\index{accomplice} accomplish\index{accomplish}
accomplished\index{accomplished} accord\index{accord}
accordance\index{accordance} accordant\index{accordant}
accordion\index{accordion} accordionist\index{accordionist}
accost\index{accost} account\index{account}
accountability's\index{accountability's}
accountability\index{accountability} accountable\index{accountable}
accountably\index{accountably} accountancy\index{accountancy}
accountant\index{accountant} accounted\index{accounted}
accounting\index{accounting} accoutre\index{accoutre}
Accra\index{Accra} accredit\index{accredit}
accreditation\index{accreditation} accredited\index{accredited}
accreted\index{accreted} accretion\index{accretion}
accretive\index{accretive} accrual\index{accrual} accrue\index{accrue}
acct\index{acct} acculturate\index{acculturate}
acculturation\index{acculturation} accumulate\index{accumulate}
accumulation\index{accumulation} accumulative\index{accumulative}
accumulator\index{accumulator} accuracy\index{accuracy}
accurate\index{accurate} accurately\index{accurately}
accurateness\index{accurateness} accursed\index{accursed}
accursedness\index{accursedness} accusal\index{accusal}
accusation\index{accusation} accusative\index{accusative}
accusatory\index{accusatory} accuse\index{accuse}
accused\index{accused} accustom\index{accustom}
accustomed\index{accustomed} accustomedness\index{accustomedness}
ace\index{ace} acellular\index{acellular} acer\index{acer}
acerbate\index{acerbate} acerbic\index{acerbic}
acerbity\index{acerbity} acetaminophen\index{acetaminophen}
acetate\index{acetate} acetic\index{acetic}
acetogenic\index{acetogenic} acetone\index{acetone}
acetylcholine\index{acetylcholine} acetylene\index{acetylene}
Achaean\index{Achaean} ache\index{ache} ached\index{ached}
achene\index{achene} aches\index{aches} achievable\index{achievable}
achieve\index{achieve} achieved\index{achieved}
achievement's\index{achievement's} achievement\index{achievement}
achievements\index{achievements} achiever\index{achiever}
achieves\index{achieves} achieving\index{achieving}
Achilles\index{Achilles} aching\index{aching}
achromatic\index{achromatic} achy\index{achy} acid\index{acid}
acidification\index{acidification} acidify\index{acidify}
acidity\index{acidity} acidophil\index{acidophil}
acidophiles\index{acidophiles} acidoses\index{acidoses}
acidosis\index{acidosis} acidulous\index{acidulous}
Ackerman\index{Ackerman} acknowledge\index{acknowledge}
acknowledgeable\index{acknowledgeable}
acknowledged\index{acknowledged} ACM\index{ACM} acme\index{acme}
acne\index{acne} acolyte\index{acolyte} aconite\index{aconite}
acorn\index{acorn} acoustic\index{acoustic}
acoustical\index{acoustical} acoustician\index{acoustician}
acoustics\index{acoustics} acquaint\index{acquaint}
acquaintance\index{acquaintance}
acquaintanceship\index{acquaintanceship} acquainted\index{acquainted}
acquiesce\index{acquiesce} acquiescence\index{acquiescence}
acquiescent\index{acquiescent} acquirable\index{acquirable}
acquire\index{acquire} acquirement\index{acquirement}
acquisition\index{acquisition} acquisitions\index{acquisitions}
acquisitive\index{acquisitive} acquisitiveness\index{acquisitiveness}
acquit\index{acquit} acquittal\index{acquittal}
acquittance\index{acquittance} acquitter\index{acquitter}
acre\index{acre} acreage\index{acreage} acrid\index{acrid}
acridity\index{acridity} acridness\index{acridness}
acrimonious\index{acrimonious} acrimoniousness\index{acrimoniousness}
acrimony\index{acrimony} acrobat\index{acrobat}
acrobatic\index{acrobatic} acrobatics\index{acrobatics}
acronym\index{acronym} acrophobia\index{acrophobia}
acropolis\index{acropolis} across\index{across}
acrostic\index{acrostic} acrylate\index{acrylate}
acrylic\index{acrylic} act's\index{act's} act\index{act}
actinic\index{actinic} actinide\index{actinide}
actinium\index{actinium} actinometer\index{actinometer}
action\index{action} actionable\index{actionable}
actioned\index{actioned} actioning\index{actioning}
activate\index{activate} activated\index{activated}
activating\index{activating} activation\index{activation}
activator\index{activator} active\index{active}
actively\index{actively} activeness\index{activeness}
activism\index{activism} activity\index{activity} Acton\index{Acton}
actor\index{actor} actress\index{actress} actual\index{actual}
actuality\index{actuality} actuarial\index{actuarial}
actuary\index{actuary} actuate\index{actuate}
actuation\index{actuation} actuator\index{actuator}
acuity\index{acuity} acumen\index{acumen}
acupressure\index{acupressure} acupuncture\index{acupuncture}
acute\index{acute} acuteness\index{acuteness} acyclic\index{acyclic}
acyclovir\index{acyclovir} ad's\index{ad's} ad\index{ad}
adage\index{adage} adagio\index{adagio} Adair\index{Adair}
Adam\index{Adam} adamant\index{adamant} Adamski\index{Adamski}
Adamson\index{Adamson} adapt\index{adapt}
adaptability\index{adaptability} adaptation\index{adaptation}
adapted\index{adapted} adaptive\index{adaptive}
adaptivity\index{adaptivity} adaptor\index{adaptor} ADC\index{ADC}
add-on\index{add-on} add\index{add} addend\index{addend}
addenda\index{addenda} addendum\index{addendum} addict\index{addict}
addiction\index{addiction} Addis\index{Addis} Addison\index{Addison}
addition\index{addition} additional\index{additional}
additive\index{additive} additivity\index{additivity}
addle\index{addle} addorsed\index{addorsed} address\index{address}
addressed\index{addressed} addressee\index{addressee}
addresses\index{addresses} addressing\index{addressing}
adduce\index{adduce} adducer\index{adducer} adduct\index{adduct}
adduction\index{adduction} adductor\index{adductor}
Adelaide\index{Adelaide} Adele\index{Adele} Aden\index{Aden}
Adenauer\index{Adenauer} adenine\index{adenine} adenoid\index{adenoid}
adenoidal\index{adenoidal} adenoma\index{adenoma}
adenomata\index{adenomata} adenoviral\index{adenoviral}
adenovirus\index{adenovirus} adept\index{adept}
adeptness\index{adeptness} adequacy\index{adequacy}
adequate\index{adequate} adequateness\index{adequateness}
adhere\index{adhere} adherence\index{adherence}
adherent\index{adherent} adhesion\index{adhesion}
adhesive\index{adhesive} adhesiveness\index{adhesiveness}
adiabatic\index{adiabatic} adieu\index{adieu} adipose\index{adipose}
Adirondack\index{Adirondack} adiós\index{adiós}
adjacency\index{adjacency} adjacent\index{adjacent}
adjectival\index{adjectival} adjective\index{adjective}
adjoin\index{adjoin} adjourn\index{adjourn} adjudge\index{adjudge}
adjudicate\index{adjudicate} adjudication\index{adjudication}
adjudicator\index{adjudicator} adjunct\index{adjunct}
adjuration\index{adjuration} adjure\index{adjure} adjust\index{adjust}
adjusted\index{adjusted} adjustor's\index{adjustor's}
adjusts\index{adjusts} adjutant\index{adjutant} Adkins\index{Adkins}
Adler\index{Adler} adman\index{adman} admen\index{admen}
admin\index{admin} adminicle\index{adminicle}
adminicular\index{adminicular} administer\index{administer}
administrable\index{administrable} administrate\index{administrate}
administration\index{administration}
administrator\index{administrator}
administratrix\index{administratrix} admirable\index{admirable}
admiral\index{admiral} admiralty\index{admiralty}
admiration\index{admiration} admire\index{admire}
admissibility\index{admissibility} admissible\index{admissible}
admission\index{admission} admit\index{admit}
admittance\index{admittance} admitted\index{admitted}
admixture\index{admixture} admonish\index{admonish}
admonisher\index{admonisher} admonition\index{admonition}
admonitory\index{admonitory} ado\index{ado} adobe\index{adobe}
adolescence's\index{adolescence's} adolescence\index{adolescence}
adolescent\index{adolescent} Adolph\index{Adolph} Adonis\index{Adonis}
adopt\index{adopt} adopted\index{adopted} adoption\index{adoption}
adopts\index{adopts} adorable\index{adorable}
adorableness\index{adorableness} adoration\index{adoration}
adore\index{adore} adorn\index{adorn} adorned\index{adorned}
adrenal\index{adrenal} adrenalin\index{adrenalin}
adrenaline\index{adrenaline} Adrian\index{Adrian}
Adriatic\index{Adriatic} Adrienne\index{Adrienne} adrift\index{adrift}
adroit\index{adroit} adroitness\index{adroitness} ads\index{ads}
ADSL\index{ADSL} adsorb\index{adsorb} adsorbate\index{adsorbate}
adsorbent\index{adsorbent} adsorption\index{adsorption}
ADte\index{ADte} adulate\index{adulate} adulation\index{adulation}
adulator\index{adulator}
\clearpage
\MarkbothHack
\pagestyle{indexpagestyle}
\printindex
\UndoMarkbothHack
\chapter*{Foo}
\lipsum
\end{document}