; TeX output 1997.01.23:0051so0#DtGGcmr17The7t߆TG cmtt12variorefpacqkage!", cmsy10޲XQ cmr12FVrankMittelbacrh37 1995/10/19.!Kt : cmbx9Abstractэoo cmr9ThisMpac9k|ragede nesthecommandsߤN cmtt9\vrefand\vpagerefforL5Aacmr6A TuAEXc.25" cmmi9"%â. b\vref;issimilarto\refbutaddsanadditionalpagereference,Dvlik9e`onthebfacingpage'or`onpage27'whenev9erthecorrespAonding\labelisnotonbthesamepage.AThecommand\vpagerefisav|rariationto\pagerefwithba;Vsimilarfunctionalit9y:.wGeneratedstringsarecustomizablesothatthesebcommandsTareusablewithotherlanguages.!čI!Nff cmbx121aLIntros3ductionIK`y cmr10Inzmanycasesitishelpfulwhenreferingtoa gureortabletoputbGotha"xtheend nalawarning:Deveryuseof\vrefwillinternallygeneratetwoImacropXnamestokeeptrackofthestringpGositionswithinthedocument.AsaIresultyoumayrunoutofnamespaceormainmemoryifyoumakehavyuseofIthis#macroonasmallTU>'ExXinstallation.-0F*orthisreasontheprimitivecommand3P\fullrefI\fullrefҲisalsoprovided.?ThiscommandcanbGeusedwheneveryouknowforIsureUUthatlabGelandreferencecan'tfallontonearbypages.I5aLTheffdos3cumentationdriver leIThenextbitofcoGdecontainsthedocumentationdriver leforTU>'ExX,i.e.,the leIthatVwillproGducethedocumentationyouarecurrentlyreading.ItwillbGeextractedIfromUUthis lebythedocstripprogram.LsٓRcmr71S cmsy9h$ow cmss9driveroi Ls2S\documentclass{ltxdoc}Ls3S\usepackage{varioref}Ls4S\GetFileInfo{varioref.sty}Ls5S\setlength\hfuzz{1pt}X%ignoreslightoverfullsLs6S\EnableCrossrefsLs7S%\DisableCrossrefs,%Say\DisableCrossrefsifindexisreadyLs8Ls9S\RecordChanges!%GatherupdateinformationI10S%\OnlyDescriptionX%commentoutforimplementationdetailsI11S\begin{document}3soI12ap\DocInput{varioref.dtx} I13S\end{document}I14Sh=driveroi!čI6aLTheffimplementationIThemainimplementationideaistogenerateaninternallabGelcommandforevery I\vpagerefandcomparethepagereferenceofthislabGelwiththepagereferenceofItheuser-requestedlabGel.@SincethismeansoneadditionalmacronameforeachuseIof2\vpagereforvref(whichisimplementedintermsof\vpageref)thememoryIrequirements ofthispackqagemaybGehighintermsofmainandmacronameImemory*.+SincetheinformationheldintheinternallabGelsisusedonlyonceoneIcould^envisionadi erentschemeifsuitableprimitivesforthiskindof\oneplaceIinformation"-:wouldbGeprovidedbyL5ffA͉TU>'ExX.diThistypGeofdatastructureisplannedIforUUL5ffA͉TU>'ExX3butforthemomentwehavetolivewiththememoryrestrictions.XW*eeSstartbycheckingifthis lewasalreadyloaded.IfnotweidentifytheIcurrent8version.h8Thisisactuallydoneatthetopofthe le,>esowecommentitoutIhereI15Shpack9age#g i I16S%\NeedsTeXFormat{LaTeX2e}[1994/06/01]I17S%\ProvidesPackage{varioref}[\filedate\space\fileversion\spaceI18S%c9NLaTeX2epackageforextendedreferences(FMi)] L\vref@addtoIT*osuppGorttheuseofbabelwewanttoaddtheadditionalstringstothe I\extrashlanguage[i2commands.ۄSincex\addtointhecurrentimplementationofIbabGeljhasabugthatdoesnotallowtouseargumentscontaininghashmarksweIdoUUthisbyhand.I19S\def\vref@addto#1#2{% I20]#2%I21]\@temptokena{#2}%I22]\ifx#1\undefinedI23kJ\edef#1{\the\@temptokena}%I24]\elseI25kJ\toks@\expandafter{#1}%I26kJ\edef#1{\the\toks@\the\@temptokena}%I27]\fiI28]\@temptokena{}\toks@\@temptokenaI29S}I30S\@onlypreamble\vref@addto6I)N cmbx126.1gOptionsuTb\vref@excuseIExcuseUUthatwedon'tknowthestringsforacertainlanguage.I31S\def\vref@excuse#1{%I32]\PackageWarningNoLine{varioref}{Sorry,language`#1'I33]notsupported%I34]\MessageBreakI35]byinthisversion.I36]Englishstringsusedbydefault.I37]\MessageBreakI38]PleaseModify\protect\reftext...commandsmanually.%4+csoI39]\MessageBreak\MessageBreak I40]IfyoucansuggesttranslationsforI41]thislanguage,%I42]\MessageBreakI43]pleasemailyourthemI44]totheauthorofthispackage}}I45S\@onlypreamble\vref@excuset\reftextfaceafter 9\reftextfacebefore \reftextafter 6\reftextbefore f\reftextcurrentITheȀoptionsdosetthethemacrosthatgeneratethetextualstrings.GNote,Jthat ItheyqMdonotstartwithaspace,KthespaceisalreadyaddedinthemainmacroIbGelow.I46S\DeclareOption{american} I47]{\vref@addto\extrasamerican{%%I48f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%I49f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}I50=page}%I51f\def\reftextafter{onthe\reftextvario{following}{next}page}%I52f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageI53=before}}%I54f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%I55f\def\reftextfaraway#1{onpage~\pageref{#1}}%I56]}}I57S\DeclareOption{austrian}I58]{\vref@excuse{austrian}%I59ap\vref@addto\extrasaustrian{%I60f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%I61f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}I62=page}%I63f\def\reftextafter{onthe\reftextvario{following}{next}page}%I64f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageI65=before}}%I66f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%I67f\def\reftextfaraway#1{onpage~\pageref{#1}}%I68]}}IT*extUUforbrazildefaultswascontributedbyAlcinoDallIgnaJunior I(adij@di.ufpe.br).I69S\DeclareOption{brazil}I70]{\vref@addto\extrabrazil{%I71f\def\reftextfaceafter{na\reftextvario{p\'aginaoposta}{pr\'oximaI72=p\'agina}}%I73f\def\reftextfacebefore{nap\'agina\reftextvario{oposta}{anterior}}%I74f\def\reftextafter{na\reftextvario{p\'aginaseguinte}{pr\'oximaI75=p\'agina}}%I76f\def\reftextbefore{nap\'agina\reftextvario{anterior}{precedente}}%I77f\def\reftextcurrent,{\reftextvario{nestap\'agina}{nap\'aginaI78=corrente}}%I79f\def\reftextfaraway#1{nap\'agina~\pageref{#1}}%I80]}}IT*ext8forBretondefaultswascontributedbyChristianROLLAND8(Christian.Rolland@univ-brest.fr). I81S\DeclareOption{breton}I82]{\vref@excuse{breton}%56ޠsoI83ap\vref@addto\extrasbreton{% I84f\def\reftextfaceafter{wararbajenn\reftextvario{a-dal}{daheul}}%I85f\def\reftextfacebefore{wararbajenn\reftextvario{a-dal}{a-raok}}%I86f\def\reftextafter{wararbajenndaheul}%I87f\def\reftextbeforeX{wararbajenna-raok}%I88f\def\reftextcurrent,{warar\reftextvario{bajenn-ma\~n}%I8918{bajennwar-wel}}%I90f\def\reftextfaraway#1{wararbajenn~\pageref{#1}}%I91]}}I92S\DeclareOption{catalan}I93]{\vref@excuse{catalan}%I94ap\vref@addto\extrascatalan{%I95f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%I96f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}I97=page}%I98f\def\reftextafter{onthe\reftextvario{following}{next}page}%I99f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageE100=before}}%E101f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%E102f\def\reftextfaraway#1{onpage~\pageref{#1}}%E103]}}E104S\DeclareOption{croatian}E105]{\vref@excuse{croatian}%E106ap\vref@addto\extrascroatian{%E107f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%E108f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}E109=page}%E110f\def\reftextafter{onthe\reftextvario{following}{next}page}%E111f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageE112=before}}%E113f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%E114f\def\reftextfaraway#1{onpage~\pageref{#1}}%E115]}}E116S\DeclareOption{czech}E117]{\vref@excuse{czech}%E118ap\vref@addto\extrasczech{%E119f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%E120f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}E121=page}%E122f\def\reftextafter{onthe\reftextvario{following}{next}page}%E123f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageE124=before}}%E125f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%E126f\def\reftextfaraway#1{onpage~\pageref{#1}}%E127]}}IDefaultsUUforDanishprovidedbyT*orstenMartinsen(tmar91@kom.auc.dk). E128S\DeclareOption{danish}E129]{\vref@addto\extrasdanish{%E130f\def\reftextfaceafter{p\aa{}\reftextvario{modst\aaende}%E13118{n\aeste}side}%E132f\def\reftextfacebefore{p\aa{}\reftextvario{modst\aaende}%E13318{forrige}side}%E134f\def\reftextafter{p\aa{}\reftextvario{denf\olgende}%E13518{n\aeste}side}%6CsoE136f\def\reftextbeforeX{p\aa{}\reftextvario{forrigeside} E13718{foreg\aaendeside}}%E138f\def\reftextcurrent,{p\aa{}denneside}%E139f\def\reftextfaraway#1{p\aa{}side~\pageref{#1}}%E140]}}@IDefault{stringfordutchhavebGeencontributedbyF*rankPoppGe.thisoptioncur- IrentlyGsuppGortsoneadditionalstringmacro\refpagenamesothatyoucaneasilyIchangeytobladzijdeinsteadofpaginaifyoupreferthiswordfor\page".MHow-Iever,ReIQwillQnotguaranteethatthiswillsurvivefutureversionsofthispackqage,ResoIuseitonyourownrisk(youcanalwaysupGdatethefullstringstobeonthesafeIside). @E141S\DeclareOption{dutch} E142]{\vref@addto\extrasdutch{%E143f\def\refpagename{pagina}%E144f\def\reftextfaceafter{opde\reftextvario{rechter\refpagename}%E145J{\refpagename\hiernaast}}%E146f\def\reftextfacebefore{opde\reftextvario{linker\refpagename}%E147c{\refpagename\hiernaast}}%E148f\def\reftextafter{opde\reftextvario{volgende\refpagename}%E149-{\refpagename\hierna}}%E150f\def\reftextbeforeX{opde\reftextvario{vorige\refpagename}%E151J{\refpagename\hiervoor}}%E152f\def\reftextcurrent,{opdeze\refpagename}%E153f\def\reftextfaraway#1{op\refpagename~\pageref{#1}}%E154]}}E155S\DeclareOption{english}E156]{\vref@addto\extrasenglish{%E157f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%E158f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}E159=page}%E160f\def\reftextafter{onthe\reftextvario{following}{next}page}%E161f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageE162=before}}%E163f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%E164f\def\reftextfaraway#1{onpage~\pageref{#1}}%E165]}}E166S\DeclareOption{esperanto}E167]{\vref@excuse{esperanto}%E168ap\vref@addto\extrasesperanto{%E169f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%E170f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}E171=page}%E172f\def\reftextafter{onthe\reftextvario{following}{next}page}%E173f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageE174=before}}%E175f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%E176f\def\reftextfaraway#1{onpage~\pageref{#1}}%E177]}}ITheUU nnishstringsweresuggestedbyMattiRintala(bitti@cs.tut.fi). @E178S\DeclareOption{finnish}E179]{\vref@addto\extrasfinnish{%E180f\def\reftextfaceafter{\reftextvario{viereisell\"a}%E181{seuraavalla}sivulla}%7OsoE182f\def\reftextfacebefore{\reftextvario{viereisell\"a}% E183{edellisell\"a}sivulla}%E184f\def\reftextafter{seuraavallasivulla}%E185f\def\reftextbeforeX{edellisell\"asivulla}%E186f\def\reftextcurrent,{t\"all\"asivulla}%E187f\def\reftextfaraway#1{sivulla~\pageref{#1}}%E188]}}ۍIF*renchUUdefaultsareprovidedbyDanielFlippGo. ۍE189S\DeclareOption{french}E190]{\vref@addto\extrasfrench{%E191f\def\reftextfaceafter{page\reftextvario{ci-contre}{suivante}}%E192f\def\reftextfacebefore{page\reftextvario{ci-contre}%E193΃{pr\'ec\'edente}}%E194f\def\reftextafter{pagesuivante}%E195f\def\reftextbeforeX{pagepr\'ec\'edente}%E196f\def\reftextcurrent,{delapr\'esentepage}%E197f\def\reftextfaraway#1{page~\pageref{#1}}%E198]}}E199S\DeclareOption{galician}E200]{\vref@excuse{galician}%E201ap\vref@addto\extrasgalician{%E202f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%E203f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}E204=page}%E205f\def\reftextafter{onthe\reftextvario{following}{next}page}%E206f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageE207=before}}%E208f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%E209f\def\reftextfaraway#1{onpage~\pageref{#1}}%E210]}}IThereȪarenogoGodȪvqariantsforGerman(IȆthinkandstillthinkbutthisisamatter Iof&taste:-).:Thefollowingde nitionswererecentlysuggestedtomebutsinceIthe5originalareinforalongtimeidon'twant5tochangethemnowsincethatIcould8makealotofdoGcumentschangetheirformatting.hIfyoufancythem,=addaIrede nitionUUofthecorrespGondingmacro(s)tothepreambleofyourdoGcument.m[X\def\reftextfaceafter{aufder\reftextvario x?{gegen\"uberliegenden}{anderen}Seite}%[X\def\reftextfacebefore{aufder\reftextvariox?{gegen\"uberliegenden}{anderen}Seite}%[X\def\reftextafter{aufder\reftextvariox?{n\"achsten}{folgenden}Seite}%[X\def\reftextbeforeX{aufder\reftextvariox?{vorigen}{vorhergehenden}Seite}%[X\def\reftextcurrent,{\reftextvariox?{aufdieser}{diese}Seite}%E211S\DeclareOption{german}E212]{\vref@addto\extrasgerman{%E213f\def\reftextfaceafter{aufdern\"achstenSeite}%E214f\def\reftextfacebefore{aufdervorherigenSeite}%E215f\let\reftextafter\reftextfaceafterE216f\let\reftextbeforeX\reftextfacebeforeE217f\def\reftextcurrent,{aufdieserSeite}%8 \ܠsoE218f\def\reftextfaraway#1{aufSeite~\pageref{#1}}% E219]}}33IDefaultsforItaliansuggestedbyGiovqanniPensa(pensa@dsi.unimi.it)with IiTU>'ExXnici. E220S\DeclareOption{italian}E221]{\vref@excuse{italian}%E222ap\vref@addto\extrasitalian{%E223f\def\reftextfaceafter{\reftextvario{afronte}%E224={nellapaginasuccessiva}}%E225f\def\reftextfacebefore{\reftextvario{afronte}%E226={nellapaginaprecedente}}%E227f\def\reftextafter{nellapagina\reftextvario{seguente}%E228={successiva}}%E229f\def\reftextbeforeX{nellapaginaprecedente}%E230f\def\reftextcurrent,{inquestapagina}%E231f\def\reftextfaraway#1{apagina~\pageref{#1}}%E232]}}E233S\DeclareOption{magyar}E234]{\vref@excuse{magyar}%E235ap\vref@addto\extrasmagyar{%E236f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%E237f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}E238=page}%E239f\def\reftextafter{onthe\reftextvario{following}{next}page}%E240f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageE241=before}}%E242f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%E243f\def\reftextfaraway#1{onpage~\pageref{#1}}%E244]}}ITheNorwegianand`nynorsktranslationshavebGeenprovidedbyDagFLangmyhrI. E245S\DeclareOption{norsk}E246]{\vref@addto\extrasnorsk{%E247f\def\reftextfaceafter{p\aa{}\reftextvario{motst\aa{}ende}{neste}E248=side}%E249f\def\reftextfacebefore{p\aa{}\reftextvario{motst\aa{}ende}{forrige}E250=side}%E251f\def\reftextafter{p\aa{}\reftextvario{sidenetter}%E25218{nesteside}}%E253f\def\reftextbeforeX{p\aa{}\reftextvario{sidenforan}%E25418{forrigeside}}%E255f\def\reftextcurrent,{p\aa{}dennesiden}%E256f\def\reftextfaraway#1{p\aa{}side~\pageref{#1}}%E257]}}E258S\DeclareOption{nynorsk}E259]{\vref@addto\extrasnynorsk{%E260f\def\reftextfaceafter{p\aa{}den\reftextvario{motst\aa{}ande}%E261P{neste}sida}%E262f\def\reftextfacebefore{p\aa{}den\reftextvario{motst\aa{}ande}%E263P{f\o{}rre}sida}%E264f\def\reftextafter{p\aa{}\reftextvario{sidaetter}%E26518{dennestesida}}%E266f\def\reftextbeforeX{p\aa{}\reftextvario{sidaf\o{}r}%9 iYsoE267#v{denf\o{}rresida}}% E268f\def\reftextcurrent,{p\aa{}dennesida}%E269f\def\reftextfaraway#1{p\aa{}side~\pageref{#1}}%E270]}}E271S\DeclareOption{polish}E272]{\vref@excuse{polish}%E273ap\vref@addto\extraspolish{%E274f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%E275f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}E276=page}%E277f\def\reftextafter{onthe\reftextvario{following}{next}page}%E278f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageE279=before}}%E280f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%E281f\def\reftextfaraway#1{onpage~\pageref{#1}}%E282]}}E283S\DeclareOption{portuges}E284]{\vref@excuse{portuges}%E285ap\vref@addto\extrasportuges{%E286f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%E287f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}E288=page}%E289f\def\reftextafter{onthe\reftextvario{following}{next}page}%E290f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageE291=before}}%E292f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%E293f\def\reftextfaraway#1{onpage~\pageref{#1}}%E294]}}E295S\DeclareOption{romanian}E296]{\vref@excuse{romanian}%E297ap\vref@addto\extrasromanian{%E298f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%E299f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}E300=page}%E301f\def\reftextafter{onthe\reftextvario{following}{next}page}%E302f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageE303=before}}%E304f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%E305f\def\reftextfaraway#1{onpage~\pageref{#1}}%E306]}}E307S\DeclareOption{russian}E308]{\vref@excuse{russian}%E309ap\vref@addto\extrasrussian{%E310f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%E311f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}E312=page}%E313f\def\reftextafter{onthe\reftextvario{following}{next}page}%E314f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageE315=before}}%E316f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%E317f\def\reftextfaraway#1{onpage~\pageref{#1}}%E318]}}E319S\DeclareOption{slovak}E320]{\vref@excuse{slovak}%10 u9soE321ap\vref@addto\extrasslovak{% E322f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%E323f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}E324=page}%E325f\def\reftextafter{onthe\reftextvario{following}{next}page}%E326f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageE327=before}}%E328f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%E329f\def\reftextfaraway#1{onpage~\pageref{#1}}%E330]}}E331S\DeclareOption{slovene}E332]{\vref@excuse{slovene}%E333ap\vref@addto\extrasslovene{%E334f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%E335f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}E336=page}%E337f\def\reftextafter{onthe\reftextvario{following}{next}page}%E338f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{pageE339=before}}%E340f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%E341f\def\reftextfaraway#1{onpage~\pageref{#1}}%E342]}}IT*extUUforspanishdefaultswascontributedbyJulioSanchez(jsanchez@gmv.es).E343S\DeclareOption{spanish}E344]{\vref@addto\extrasspanish{%E345f\def\reftextfaceafter{enlap\'aginasiguiente}%E346f\def\reftextfacebefore{enlap\'aginaanterior}%E347f\let\reftextafter\reftextfaceafterE348f\let\reftextbeforeX\reftextfacebeforeE349f\def\reftextcurrent,{enestap\'agina}%E350f\def\reftextfaraway#1{enlap\'agina~\pageref{#1}}%E351]}}IThe8textforswedishwascontributedbyMatsDahlgren(matsd@physchem.kth.se). E352S\DeclareOption{swedish}E353]{\vref@addto\extrasswedish{%E354kJ\def\reftextfaceafter{p\aa\\reftextvario{motst\aaende}%E355(J {n\"{a}sta}sida}%E356kJ\def\reftextfacebefore{p\aa\\reftextvario{motst\aaende}%E3576{f\"{o}reg\aaende}sida}%E358kJ\def\reftextafter{p\aa\\reftextvario{f\"{o}ljande}%E359#v{n\"{a}sta}sida}%E360kJ\def\reftextbeforeX{p\aa\f\"{o}reg\aaendesida}%E361kJ\def\reftextcurrent,{p\aa\dennasida}%E362kJ\def\reftextfaraway#1{p\aa\sidan~\pageref{#1}}%E363]}}E364S\DeclareOption{turkish}E365]{\vref@excuse{turkish}%E366ap\vref@addto\extrasturkish{%E367f\def\reftextfaceafter{onthe\reftextvario{facing}{next}page}%E368f\def\reftextfacebefore{onthe\reftextvario{facing}{preceding}E369=page}%E370f\def\reftextafter{onthe\reftextvario{following}{next}page}%11 vsoE371f\def\reftextbeforeX{onthe\reftextvario{precedingpage}{page E372=before}}%E373f\def\reftextcurrent,{on\reftextvario{this}{thecurrent}page}%E374f\def\reftextfaraway#1{onpage~\pageref{#1}}%E375]}}ߍIW*esuppGortfrancaisasanalternativetofrenchsincepGeoplemightbGeusedtoit, IbutUUwediscurrageit. ߍE376S\DeclareOption{francais}{%E377ap\typeout{Pleaseuse`french'insteadof`francais'}%E378ap\ExecuteOptions{french}}E379S\DeclareOption{germanb}{%E380ap\typeout{Pleaseuse`german'insteadof`germanb'}%E381ap\ExecuteOptions{german}}XAfteralloptionsaredeclaredweexecutethedefaultoptionenglishtosetupItheUVdefaultsandthencall\ProcessOptions*tohandleanyoptionpassedtotheIpackqage.ThedbstarformisusedsincewewanttoexecutetheoptionsintheorderItheyUUaregiven(incasethisisn'tusedtogetherwiththebabelpackqage). ߍE382S\ExecuteOptions{english}E383S\ProcessOptions*I6.2gDe ningthemainmacrosuT3P\vr@cntIT*o*generatenewlabGelsweuseacounterandconstructtheinternallabGelnamesbyIpre xing-thecurrentcountervqaluewiththestringvr@.dW*eneedaL5ffA͉TU>'ExXcounterItoUUget\includeshandledcorrectly*. ߍE384S\newcounter{vrcnt}$\vpageref\@vpagerefITheuTcommand\vpagerefgeneratestheappropriatestringby rstparsingtheIoptional$arguments(ifany)andthencomparestheinternalandtheuserlabGel.IThisUUcommandshouldbGerobustsincetheusermightputitanywhere.E385S\DeclareRobustCommand\vpageref{\@ifnextchar[%ߍITheޞdefaultforthe rstoptionalargumentisthestringhiddeninthemacroI\reftextcurrent.E386]\@vpageref{\@vpageref[\reftextcurrent]}% E387S}E388S\def\@vpageref[#1]{\@ifnextchar[%ߍITheޟdefaultforthesecondoptionalargumentisaspacewhichispre xedbyI\unskipUUtogetridofanyleadingspaceinsertedalready*. ߍE389]{\@@vpageref{#1}}{\@@vpageref{#1}[\unskip\space]}} L\@@vpagerefIThe\@@vpagerefmacro nallygeneratesthereferencesbycomparingthevqalueIofUUaninternallabGelwiththevqalueoftheuserlabel.E390S\def\@@vpageref#1[#2]#3{%ߍIFirstitswitchestohorizontalmoGdeifnecessaryandalsoremovesanyleadingIspace.E391]\leavevmode\unskipߍIThen>itadvqancesthecounter\c@vrcntbyonewhichisusedtogenerateinternalIlabGelUUnames.E392]\global\advance\c@vrcnt\@ne12 ݠsoITheneitcheckseifforthecurrentvqalueof\c@vrcntalabGelcommandwasissued Iin;thelastrun.fzIfnotitpretendsthattherewasonewiththevqalue{??}{??}.IThereafterUUitstoresthethepagerefvqalueforthislabGelinthemacro\@tempa.E393]\@ifundefined{r@\the\c@vrcnt@vr}% E394~0{\@namedef{r@\the\c@vrcnt@vr}{{??}{??}}}{}%E395]\edef\@tempa{\expandafter\expandafter\expandafterE396D\@cdr\csnamer@\the\c@vrcnt@vr\endcsnameE397D\@nil}%IHereUUwecheckthatthegeneratedtextisnotgoingacrossapagebGoundary*.E398]\@ifundefined{r@\the\c@vrcnt@xvr}%E399~0{\@namedef{r@\the\c@vrcnt@xvr}{{??}{??}}}{}%E400]\edef\@tempb{\expandafter\expandafter\expandafterE401D\@cdr\csnamer@\the\c@vrcnt@xvr\endcsnameE402D\@nil}%E403]{\let\@currentlabel\@emptyIIn9bversion1.0lthelabGelstringhasbeenturnedaroundsothatthenumber9bcomes I rst.kThiswasdonetoalloweasyexplicitexpansionofthenumbGerbeforeitisIpassedctothe\labelcommand.rInthebabGelsystemtheargumentoflabelwasInotcexpandedwiththeresultthatwronglabGelstringshavecbeengenerated.iThisIisVageneralproblemthatmightneedacompletelydi erentsolutioninbabGelbutIfor=nowthechangebGelow(andinsomeotherplacesinthecoGde)shouldsolvetheIproblemUUforthisspGecialcombinationofpackqages.E404ap\expandafter\label\expandafter{\the\c@vrcnt@xvr}}% E405]\ifx\@tempa\@tempb\elseIIf~QbGothpointsdonotfallontothesamepagewitheitherissueanerrororawarningImessage.E406]\vref@err{\noexpand\vrefatpageboundary E407]\@tempb-\@tempa\space(mayloop)%E408]}%E409]\fiISameȓgamefortheuserrequestedlabGel;1thistimethepagereferenceissavedȓin I\@tempb.E410]\@ifundefined{r@#3}{\@namedef{r@#3}{{??}{??}}}{}%E411]\edef\@tempb{\expandafter\expandafter\expandafterE412D\@cdr\csnamer@#3\endcsnameE413D\@nil}%INow)thisisnotpGossiblebecauseitwouldresultingetting`LabelsmayhaveIchanged...'warnings&foreveryrun.NowwearereadytoproGducethetextualIstrings.cSince)wehaveremovedanyleadingspacewenowinsertaspaceandthenIcompareUUthetwoUUpagereferences.E414]\spaceE415]\ifx\@tempa\@tempb13"soIIfttheyarethesameweinsertthe rstargumentintotheinputstream.GOtherwise IweDainsertthesecondargument.l RecallthatthosearethetwooptionalargumentsIofUU....E416f#1% E417]\elseE418f#2%INow%swecheckifthepagenumbGerofthereferencedob8ject(storedin\@tempbisa IsingleUUpGositivenumbGer.E419f\is@pos@number\@tempbE420t{%IIfso, wecheckifthecurrentpGosition(storedin\@tempa)isapositivenumbGer. IIfvthisisthecaseweassignthisnumbGertothecounterregister\@tempcntaandIaddUUonetoit.E421yw^\is@pos@number\@tempa E422~0{\@tempcnta\@tempaE423\advance\@tempcnta\@neE424~0}%IIfitisnotapGositivenumbGerweassignthelargestpGossiblenumbGerto\@tempcnta IandUUtherebypretendingthatlabGelandreferencearemilesawayfromeachother.E425~0{\@tempcnta\maxdimen}%INowswearereadytocheckifreferenceandob8jectareonnearbypages.\@tempb IwillexpandtothepagenumbGeroftheob8ject(andweknowthatthisisanumbGer)Iand0\@tempcntaiseitheronehigherthanthereferencepageorcompletelyoutofIbGounds.Soifbothrepresendthesamevqaluethentheob8jectliesonepageafterIitsUUreference.E426yw^\ifnum\@tempb=\@tempcntaIThusciftheob8jectfallsontoanoGddpagethenthereferenceisonthefacingevenIpage(andsoweinsert\reftextfaceafter),otherwisetheob8jectcannotbGeseenIfrom )thereference(andweininsert\reftextafter).DDon'tbGesurprisedifweIaresnotusing\@tempbinthecheck.O"Sinces\@tempcntahasthesamevqalueitisIfasterUUtousetheregisterinsteadofparsingthemacrocontentsUUanew.E427~0\ifodd\@tempcntaIIn;factwearegoingtouse\reftextfaceafteronlyifwearedoingtwo-sidedIprinting,KotherwiseW\reftextafterisalwaysused..Sincethevqalueof\if@twosideIisevqaluatedbGeforereadinginpackageswecoulddobGetter(savingsometokens)IbyUUde ningthecurrentmacroindepGendenceofthisboolean.E428 \if@twoside E429L\reftextfaceafterE430 \elseE431L\reftextafterE432 \fiE433~0\elseE434 \reftextafterE435~0\fiIIf8theob8jectisnotonthepagefollowingthereferencewecheckifitisonthe IpagebGeforethereference.?InL5ffA͉TU>'ExXthissituationisnottoocommon,forex-Iampleϕwith oatsitnormallydoGesnotoccur,%butofcourseitisn'timpossibleifIyoumorethanonereferencetothesameob8ject,B[orifyouhavebackreferences14soIto-isections,cntheorems,etc.T*otestthiswenowsubstracttwofromthecurrent Ivqalue?tof\@tempcnta(whichwassettoonehigherasthereferencepagenumbGer).INote,EthatAsubstractionisalsopGossibleifthevqaluewas\maxdimen|westillgetIsomethingUUthatismuchUUlargerthananysensiblepagenumbGer. ⍍E436yw^\else E437\advance\@tempcnta-2⍑IIf{now\@tempband\@tempcntahavethesamevqaluethentheob8jectliesonepageIbGeforeUUthereference.E438\ifnum\@tempb=\@tempcnta⍑IAgainRwehavetocheckforoGddorevenpagestodistinguishbGetweenthefacingIandUUthenon-facingsituation.E439]\ifodd\@tempcnta E440\reftextbeforeE441]\else⍑IAgainUUthe\reftextfacebeforeonlyif@twosideevqaluatestotrue.E442\if@twosideE443D\reftextfacebeforeE444\elseE445D\reftextbeforeE446\fiE447]\fi⍑IIftheabGovetestalsoreturnsfalsethenwehaveob8jectandreferencesonpages IwhichYarefarawayordon'tcontainsimplepagenumbGers.vThereforewegenerateIthe+?\reftextfarawaystring.cRecallthatthisisamacrowhichhastheuserlabGelIasUUanargument.E448\else E449]\reftextfaraway{#3}%E450\fiE451yw^\fiE452t}%⍑IW*e 1dothesameifour rsttest(thatthepagewiththeob8jecthasapGositivepage InumbGer)UUturnsouttobefalse.E453t{\reftextfaraway{#3}}%E454]\fi⍑IFinally=wegeneratetheinternallabGelsothatitcanbecheck=onthenextrun. IThis!meansthatwecomparethepGositionafterthestringwiththepositionoftheIreferencedob8ject.Thereisonethingtonote:ntoconservespaceweloGcallymakeI\@currentlabelq0emptysinceweareonlyinterestedinthepagenumbGervqalueofIthisUUinternallabGel.E455]{\let\@currentlabel\@empty E456ap\expandafter\label\expandafter{\the\c@vrcnt@vr}}%E457S}b\vrefwarning $\vref@errIWhen=the\vrefcommanddetectsapGossiblecrossingover=apageboundaryit Iwill%call\vref@errtogenerateanerrormessage.^7DuringdoGcumentpreparationIoneUUcanturnsucherrorsintowarningsbyissuinga\vrefwarningdeclaration.E458S\def\vrefwarning{\def\vref@err{\PackageWarning{varioref}}} E459S\def\vref@err#1{\PackageError{varioref}{#1}%E460f{Pleasecheckthepagesinquestion.Youmightneedtoreplace15soE461kJthe\string\vref\MessageBreak E462kJor\noexpand\vpagerefbyanormal\noexpand\(page)reftoE463kJstopLaTeXrunningforever.}}'|\vrefIUndoGc E464S\DeclareRobustCommand\vref[1]{%E465]\unskip~\ref{#1}%E466]\@vpageref[\unskip]{#1}%E467S} 6\is@pos@numberITheAutilitymacro\is@pos@numbertakesthreearguments:gastringthatistested IforSbGeingavqalidintegerandtheactionstobetakenincasethetestcomesoutItrueUUorfalse.XW*eRstartbypassingthestringtothemacro\is@pos@numafterpre xingitIwithSa0andaddingaspaceafterit.q2T*ohaveSawellde nedendingpGointwealsoIaddUU\@nilattheend. E468S\def\is@pos@number#1{\is@pos@num0#1\space\@nil} INowweparsetheenlargedstringintoacounterregister.DT*ogetcontrolbackafterIeverythingthatisregardedbyTU>'ExXasanumbGerisputintothatregisterweassignI\is@pos@num@Ztothe\afterassignmenttoken.Sincethestringstartedwith0,IwecanbGesurethattheregisterassignmentwillbGecarriedoutwithoutanerrorImessage.qInUUcaseofcounterassignmentsleadingzerosarediscarded.E469S\def\is@pos@num{\afterassignment\is@pos@num@\count@} INowwehavetocheckwhetherornotthewholestringwasparsedintothatIregisterorsomeremainderwasleftover.sSincewehaveaddeda\@niltokenatItheveryendwecanusethattodelimittheargumentof\is@pos@num@.ENote,Ithat`theaddedspacein\is@pos@numberabGove`getsparsedaway`bythecounterIassignment.eIf1itwouldbGemissing,8andthefullstringwouldconsistofanumbGer,ITU>'ExXwouldftrytoreplace\@nilbyitsde nitiontoseeifitwouldcontainadditionalIdigitsUUandthuswewouldbGeintroubleatthispoint.E470S\def\is@pos@num@#1\@nil{% INowO;wehavetocheckiftheargumentisempty*.oWecandothiswithan\iftestI(i.e.,qinkanexpandableway)ksinceweknowforsurethatitcannotstartwithaIdigitE471]\if0#10% IDepGendingontheresultweexecutethesecondorthirdargumentofthecommandI\is@pos@number Eusingatechniquethatremovesthe\elseor\fifromtheinputIstreamw rst,@sothatinprincipleinputstreamparsingcouldbGedonefromwithinItheUUarguments.E472f\expandafter\@firstoftwo\else E473f\expandafter\@secondoftwo s,\fi}\reftextvarioIThisFmacrogivesalittlebitofrandomvqariationinthetextbGecausetheoutcomeIdepGendsUUonthenumberUUof\vrefcommandsseenbefore.E474S\def\reftextvario#1#2{\ifodd\c@vrcnt#1\else#2\fi}y\fullrefIAnd hereistheprimitivecommandthatalwaysproGducesa\refanda\pageref.E475S\def\fullref#1{\ref{#1}\reftextfaraway{#1}} E476Sh=pack9age#g i16soIChangeffHistory獍zI1.0f X\reftextcurrent:8*InsertedmissingghashTmark{~}.΍}.}.}.}.}.}.}.}.}.}.}.}.}. &P11I1.0jX\reftextcurrent:Addedfrenc9hgdefaults0}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 98I1.0kX\reftextcurrent:6Correctedmis-gspAelledTcmd`extrasspanish\}.΍}.}. &P11I1.0lX\@@vpageref:KExplicitlyexpand`la-gbAelTargumen9tforbabelYQ}.΍}. 13,15X\reftextcurrent:v'Addeddutc9hde-gfaultsX=}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 97I1.0nX\reftextcurrent:3AddedDanishgdefaults0}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 96I1.0pX\reftextcurrent:Addedsw9edishgstringstW}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. &P11Iv0.1eX\vr@cnt:TuseLaT:eXcoun9ter}.΍}.}. fJ12Iv0.1fX\@@vpageref:AddanotherlabAeltogcatc9hTcross-oversǍ}.΍}.}.}.}.}.}.}.}.}. &P13Iv0.1gX\vref@err:TMacroadded:}.΍}.}.}.}.}. fJ15X\vrefwarning:TMacroadded&}.΍}.}.}. fJ15Iv0.1hXGeneral: _SmalldoAcumen9tationgc9hanges}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 94Iv1.0aXGeneral:TUpgradetoLaT:eX2e̍}.΍}.}. yz1Iv1.0bX\reftextcurrent:=Replaceinincor-grectT`defb9y`letS}.΍}.}.}.}.}.}.}.}.}.}.}. 98z\vref@addto:TAv9oidusingbabAel `addto}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 94 I%ThezbabAelcommandsarestartingwithTextraseG}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}. 94v1.0g\@@vpageref:LoAopingpagessho9wninTwrongordern}.΍}.}.}.}.}.}.}.}.}.}. &P13General:8Use\DeclareRobustCommand}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 91\reftextcurrent::Brazildefaultsadded.}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 95\vref@err:TMacroadded:}.΍}.}.}.}.}. fJ15v1.0h\@@vpageref:>Changein9ternalin-terfaceK}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. &P12\@vpageref:,P9ass rstargumentinbAothTcasesV}.΍}.}.}.}.}.}.}.}.}.}.}.}.}. &P12v1.0i\@vpageref:TDoitcorrectlyN}.΍}.}.}. fJ12v1.0m\reftextcurrent:lAdded nnishstringstW}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 97v1.0o\reftextcurrent:wAddeddefaultsforTbreton؍}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 95v1.0q\reftextcurrent:wAddeddefaultsforTnorskUʍ}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 99AddedTdefaultsforn9ynorsk}.΍}.}.}. yz9\vref@excuse:AUse`P9ack|rageW:arn-ingQ}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 94v1.1b\reftextcurrent:wAddeddefaultsforTItalianȥ}.΍}.}.}.}.}.}.}.}.}.}.}.}.}.}.}. 9917~;)N cmbx12$ow cmss9#': cmti10"