; TeX output 1996.10.01:1330soeGGcmss17altfontDtGGcmr17:Using7talternativqefonts!", cmsy10XQ cmr12SebastianMariusKirscrh߆T cmtt12sebastianff}r-kirsch@kl.maus.de&37 1996/07/02.!Kt : cmbx9Abstractэoo cmr9Withthispac9k|rage,;youcanuseman9yalternativefontswithonesingle bpac9k|rage.:ow cmss9psNFSS*andYmfNFSS(useYone leforeveryfont,whileIYDpreferbha9vingneverythinginonepack|rage.oBesides,ofyouloadtwoofthefontbc9hangingGpack|rages,UDthelatteroneoverwritesthechangesofthe rstone.bHa9vingTallinonepack|rageavoidsthis.!čI Nff cmbx121aLIntros3ductionIK`y cmr10ThismpackqageisintendedasareplacementforsomepartsofbGoth!m#R cmss10psNFSS)sand ImfNFSSk㗲.iItxisareplacementforthepartsthatactuallychangethedefaultfonts.IItwwasoriginallywrittenasareplacementforpsfontsofpsNFSS# ,ģbutIIrealizedthatIitkwasnotveryreasonabletorestrictittoPostScriptfonts.#SoitisnownotfoGcusedIonlanyparticularPostScriptfont,51butcanbGeusedforanyfont,51"o> logo10METAF9ONTAOorIPostScript.qI'llUUdiscussthisindetailinsection4.I2aLInstallationITheVoactualpackqageisproGducedbyrunningTU>'ExXon#'ExXcan ndthem.6I$N cmbx122.1gThecon guration leuTIAllavqailablefontsmustdeclaredinthecon guration le.Thisisdoneusingf%ߤN cmtt9\AvailableRMFontf\AvailableRMFontf\AvailableRMFont$\AvailableFontItheZ_macros\AvailableRMFont,\AvailableSFFont,\AvailableTTFont,andI\AvailableFont.qTheyUUhavethefollowingsyntax:b\AvailableRMFont[ !", cmsy10h&': cmti10additionalc}'ode[iI]{hlongname[i5}{h'U cmssi10NFSSw|familyname[iY}b\AvailableSFFont[hadditionalc}'ode[iI]{hlongname[i5}{hNFSSw|familyname[iY}b\AvailableTTFont[hadditionalc}'ode[iI]{hlongname[i5}{hNFSSw|familyname[iY}b\AvailableFont[hadditionalc}'ode[iI]{hsymb}'olicname[iH)}8{hr}'omanfontظi9'd}%b{hsansseriffontظiF+}{htyp}'ewriterfontظiH}Ifffr @ -:q% cmsy6L|{Ycmr8ThisX lehasvÎersionnumb'ExX: IpsNFSSlrbyiSebastianRahtz,whichisrespGonsibleforPostScriptfonts,andmfNFSSIbyUUF*rankMittelbachandRainerSchopf,whichfoGcusesonMETAF9ONT8fonts.XIn%myopinion,/itwasnotveryreasonabletodividethefontchangingbGetweenItwopackqages.ThefontsloGoktoL5ffA͉TU>'ExXallthesame,sowhymakeadi erenceinItheUUpackqages?XF*ornfontswhicharetobGeusedas\{rm,sf,tt}defaultfonts,ubGothpackqagesIhave(olittlestyle leswhichchangethesedefaults.ButifyouloadtwoofthoseIpackqages,?the:]latteroverwritesthechangesofthe rstone.hThesepackqagesalldoItheUUsame,sowhynotincludethemintoonestyle le?XW*ell,ݹIdidthis,andtheresultiseasiertouseandsaferthanthepackqagesfromIpsNFSSm and'UmfNFSS& .brBecause'Uoftheseimprovements,0I'Iwould'UlikemypackqagetoIgetUUincludedintothesepackqages.q(Iknow,I'munsel sh.q;-)XSince&psNFSS&and&mfNFSS(foGcuse&onparticularfonts,/whilemypackqagecanbGeIusedwithanyfont,^itisnotverylikelytobGeincludedineitherpackqage,^thoughIbGothUUcouldmakeuseofit.!čI5aLLegalffrubbishIaltfont:qAUUL5ffA͉TU>'ExX2 b> cmmi10"+TpackqageUUforusingalternativefontsXCopyrightXc !1996SebastianMariusKirsch?hsebastianEff&fǫkirsch@kl.maus.deiXThisprogramisfreesoftware;youcanredistributeitand/ormoGdifyitunderItheXtermsoftheGNUFGeneralPublicLicenseaspublishedbytheF*reeSoftwareIF*oundation;UUeitherversion2oftheLicense,or(atyouroption)anylaterversion.XThis(RprogramisdistributedinthehopGethatitwillbeuseful,1RbutWITHOUTIANYWARRANTY;withouteventheimpliedwarrantyofMERCHANT*ABILITYIorTFITNESSSFORAP*ARTICULARSPURPOSE.SeetheGNUGeneralPublicILicenseUUformoredetails.XY*oueXshouldhaveeXreceivedacopyoftheGNUeGeneralPublicLicensealongIwiththisprogram;]ifnot,writetotheF*reeSoftwareFoundation,Inc.,675MassIAve,UUCambridge,MA02139,USA.!čI6aLTheff)߆Tff cmtt12docstripmos3dulesIThis lecontainsthreemoGdulestodirectdocstripingeneratingtheexternalI les:^driverAUUshortdriverforproGducingthedocumentation^packqageTheUUpackqageitself^con gTheUUloGcalcon guration le5_I7aLPros3ducingffthedocumentationIThisUUshortdrivercanbGeextractedbyxdocstriptoproGducethedocumentation.Ls1S+ cmsy9hdriveroi Ls2S\documentclass{ltxdoc}Ls33>soLs4S\usepackage{mflogo} Ls5S\providecommand{\MF}{\textsf{METAFONT}}%forthosewithoutmflogo.styLs6Ls7S\newcommand*{\NFSS}{\mbox{\textsf{NFSS}}}Ls8S\newcommand*{\psNFSS}{\mbox{\textsf{psNFSS}}}Ls9S\newcommand*{\mfNFSS}{\mbox{\textsf{mfNFSS}}}I10S\newcommand*{\altfont}{\textsf{alt\-font}}I11S\newcommand*{\PS}{Post\-Script}I12I13S\begin{document}I14I15S\DocInput{altfont.dtx}I16I17S\end{document}I18Sh*5" cmmi9=driveroi!čI8aLTheffCos3deI8.1gIntro`ductionuTIFirstUUwehavetointroGduceourselves.I19Shpack9age#g iI20S\NeedsTeXFormat{LaTeX2e}I21S\ProvidesPackage{altfont}%I22][\filedate\spacev\fileversion\spaceloadingalternativefonts]6I8.2gSwitchesINext,cweԓde nesomeswitches.Theyareusedtodeterminewhethersomefonts IhaveialreadybGeenloaded,sowecanwarntheuserwhenhetriestoloadtwoIcollidingUUfonts.I23S\newif\ifrm@set\rm@setfalse I24S\newif\ifsf@set\sf@setfalseI25S\newif\iftt@set\tt@setfalse6I8.3gDefaultPostScriptfonts 6\DefaultRMFont 6\DefaultSFFont 6\DefaultTTFontITheseUUaresomecommandsforchangingthedefaultPostScriptfonts.I26S\newcommand{\DefaultRMFont}[1]{\renewcommand{\def@rmfont}{#1}}I27S\newcommand{\DefaultSFFont}[1]{\renewcommand{\def@sffont}{#1}}I28S\newcommand{\DefaultTTFont}[1]{\renewcommand{\def@ttfont}{#1}}I29S\newcommand{\def@rmfont}{}I30S\newcommand{\def@sffont}{}I31S\newcommand{\def@ttfont}{}6I8.4gDeclaringtheoptions \AvailableRMFont \AvailableSFFont \AvailableTTFontITheseюcommandsareneededlaterinthecon guration le.EThereisonecommand IforUUeachfontfamily*,ie.roman,sansserifortypGewriter.XTheyUUdeclaretheir rstargumentasanoption.4'soXIfRtheoptioniscalled,uQandthefontfamilyhasalreadybGeende ned,a I\PackageError|²isrepGorted.Ifnot,Ɲthesecondargumentisde nedastheap-IproriateUUfamilydefault.XWhen5thefamilydefaulthassuccessfullybGeenset,othecorrespondingswitchisIturned,UUsoitisnotrede nedanywhereelseinthis le.XThe optionalargumentcontainssomecoGdethatistobeexecutedwhentheIdefaultsehavebGeenset.!ThisisaveryusefulhoGok,e.g.whenacertainfontfamilyisIonly9avqailableinOT1orCorkencoGding, wecanexecutea\altfontenc{OT1}afterIthefontisloaded.ThiscommandisalittlehacktogetaroundsomelimitationsIof{\newcommandand\DeclareOptionandisdescribGedinsection8.6.A{]plainI\usepackageUUwillnotwork!lI32S\newcommand{\AvailableRMFont}[3][]{% I33]\DeclareOption{#2}{%I34f\ifrm@set\PackageError{altfont}{%I35p2\protect\rmfamily\spacealreadydefinedas\rmdefaultI36p2}{%I37p2Youtriedtoloadtworomanfamiliesatthesametime,\MessageBreakI38p2e.g.timesandpalatino}I39f\else\renewcommand{\rmdefault}{#3}\rm@settrueI40f#1I41f\fi}I42]}I43S\newcommand{\AvailableSFFont}[3][]{%I44]\DeclareOption{#2}{%I45f\ifsf@set\PackageError{altfont}{%I46p2\protect\sffamily\spacealreadydefinedas\sfdefaultI47p2}{%I48p2Youtriedtoloadtwosansseriffamiliesatthesametime,\MessageBreakI49p2e.g.gillandhelvetica}I50f\else\renewcommand{\sfdefault}{#3}\sf@settrueI51f#1I52f\fi}I53]}I54S\newcommand{\AvailableTTFont}[3][]{%I55]\DeclareOption{#2}{%I56f\iftt@set\PackageError{altfont}{%I57p2\protect\ttfamily\spacealreadydefinedas\ttdefaultI58p2}{%I59p2Youtriedtoloadtwotypewriterfamiliesatthesametime,\MessageBreakI60p2e.g.courierandtypewriter}I61f\else\renewcommand{\ttdefault}{#3}\tt@settrueI62f#1I63f\fi}I64]}덍I8.5gOnecommand tsalluT 6\AvailableFontIWiththemacro\AvailableFont,$allthreedefaultsaresetwithoneoption.]This IisWQusefulformanagingcombinationsofthreefontsunderonename,WaswellasforIfontsthathavethevqariantssansserifandtypGewriter.(TheComputerModernIfontsUUareoneofthose,andLucida,Ithink.)X\AvailableFontUUmayalsohaveemptyarguments.50נsoI65S\newcommand*{\AvailableFont}[5][]{% I66]\DeclareOption{#2}{%I67f\def\@temprm{#3}\def\@tempsf{#4}\def\@temptt{#5}I68f\ifx\empty\@temprm\elseI69p2\ifrm@set\PackageError{altfont}{%I70yw^\protect\rmfamily\spacealreadydefinedas\rmdefaultI71yw^}{%I72yw^Youtriedtoloadtworomanfamiliesatthesametime,I73yw^\MessageBreake.g.timesandpalatino}I74p2\else\renewcommand{\rmdefault}{#3}\rm@settrueI75p2\fiI76f\fiI77f\ifx\empty\@tempsf\elseI78p2\ifsf@set\PackageError{altfont}{%I79yw^\protect\sffamily\spacealreadydefinedas\sfdefaultI80yw^}{%I81yw^Youtriedtoloadtwosansseriffamiliesatthesametime,I82yw^\MessageBreake.g.gillandhelvetica}I83p2\else\renewcommand{\sfdefault}{#4}\sf@settrueI84p2\fiI85f\fiI86f\ifx\empty\@temptt\elseI87p2\iftt@set\PackageError{altfont}{%I88yw^\protect\ttfamily\spacealreadydefinedas\ttdefaultI89yw^}{%I90yw^Youtriedtoloadtwotypewriterfamiliesatthesametime,I91yw^\MessageBreake.g.courierandtypewriter}I92p2\else\renewcommand{\ttdefault}{#5}\tt@settrueI93p2\fiI94f\fiI95f#1I96]}I97S}I8.6gLoadingfontenco`dingsin.Ɍ cmbsy10nAvailable...FontuT L\altfontencIW*orking"onthispackqage,?I!Xdiscovered"twolimitationsof\newcommandand I\DeclareOption.1XbY*oucannotuseacommandwithanoptionalargumentintheargumentofbanotherUUcommand.GXbY*ou"cannotloadapackqagewith\RequirePackageor\usepackageinthebhc}'ode[iC,sectionUUofa\DeclareOptioncommand.XIwantedtobGeabletoloaddi erentfontencoGdingsintheoptionalargumentIofthe\Available...Fontcommand,soIhadtoworkaroundtheselimitations.ITheUUresultisthiscommand:GI98S\newcommand*{\altfontenc}[1]{\PassOptionsToPackage{#1}{fontenc}% I99]\AtEndOfPackage{\RequirePackage{fontenc}}}ꚍXBy+passingtheoptiontofontencwith\PassOptionsToPackage,Iavoid+ha-Iving8anoptionalargumentto\RequirePackage.Bydelayingthe\RequirePackage,IIUUavoidloadingapackqageinanoption.qUglybutuseful.6<soI8.7gLoadingthecon guration leuTINext, kthe0con guration leisloaded.SfIfitisnotfound,anerrorisissued,bGecause ItheUUpackqageisquiteuselesswithoutit.xE100S\InputIfFileExists{altfont.cfg}{}{% E101]\PackageError{altfont}{%E102fNolocalconfigurationfilefoundE103f}{%E104fThealtfontpackagewasloadedwithoutalocal\MessageBreakE105fconfigurationfile,soitdoesn'tknowwhichfonts\MessageBreakE106fareavailable.}E107]}E108Sh=pack9age#g iߍI8.8gThecon guration leITheUUcon guration leloGokslikethis:ߍI0"V cmbx108.8.1l#In9troQductionIAsUUusual...xE109Shcon gٺiE110S\NeedsTeXFormat{LaTeX2e}E111S\ProvidesFile{altfont.cfg}%E112][\filedate\spacev\fileversion\spaceLocalconfigurationforaltfont.sty]ߍI8.8.2l#DeclaringTdefaultP9ostScriptfontsIHere,uthe}defaultPostScriptfontsarede ned.9*Theyareneededlater,uiftheauthor IdoGesA$notde neallfontshewantstouse,E.butwantshisdoGcumenttocontainonlyIPostScriptfonts.PStrictlyspGoken,thisdoGesnotbelongtoapackqageforPostScriptIandUUMETAF9ONT8fonts,butIthinkitisnonethelessveryuseful.xE113S\DefaultRMFont{ptm} E114S\DefaultSFFont{phv}E115S\DefaultTTFont{pcr}ߍI8.8.3l#Av\railableTfon9tsINow^Ctheavqailablefontsarede ned.lTheyaredividedintothreecategories|roman Ifonts,UUsansseriffontsandtypGewriterfonts,asitisdoneinL5ffA͉TU>'ExX2"+Titself.XTheydarede nedusingthe\Available...Fontdmacros.LThesemacrosde neIasymbGolicnametobeusedasanoptiontothepackqage,nandtakethenameofItheUUNFSS?fontUUfamilyasasecondargument.xE116S\AvailableRMFont{times}{ptm} E117S\AvailableRMFont{palatino}{ppl}E118S\AvailableRMFont{newcent}{pnc}E119E120S\AvailableSFFont{helv}{phv}E121S\AvailableSFFont{gill}{pgs}E122E123S\AvailableTTFont{courier}{pcr}E1247GvsoE125S\AvailableFont[\altfontenc{T1}]{dco}{cmor}{cmoss}{cmott} E126S\AvailableFont[\altfontenc{OT1}%E127]\DeclareFontSubstitution{OT1}{pnr}{m}{n}%E128]\renewcommand{\bfdefault}{b}%E129]\renewcommand{\itdefault}{sl}]{pandora}{pnr}{pnss}{pntt}E130Sh=con gٺiXIncaseyouwonder,thedcofontsareanotherpackqageIwrote.xTheyconsist IofԶtheregulardcfontswitholdstyledigits.IԖdidn'treleaseityet,contactmeifIyouUUareinterested.XAndNthat'sthecon guration.]OfcourseonecoulddomuchNmorewiththisIcon gurationO le,Pdeclaringnewoptionsandall.oIt'sprobablythebiggesthoGokaIpackqageUUcouldhave.q:-)6I8.9gonlyps:UsingonlyPostScriptfontsuT"onlypsIThis8optionrede nesallotherfamilydefaultsthathave8notyetbGeen\renewcommandedItoPostScriptfonts.GItusesthedefaultfontsasde nedinthecon guration le.IIfUUnodefaultfontshavebGeende ned,anerrorisreported.E131Shpack9age#g i E132S\DeclareOption{onlyps}{E133]\ifrm@set\elseE134f\ifx\empty\def@rmfontE135t\PackageWarning{altfont}{Nodefaultromanfontdefined!}E136f\else\renewcommand{\rmdefault}{\def@rmfont}\fiE137]\fiE138]\ifsf@set\elseE139f\ifx\empty\def@sffontE140t\PackageWarning{altfont}{Nodefaultsansseriffontdefined!}E141f\else\renewcommand{\sfdefault}{\def@sffont}\fiE142]\fiE143]\iftt@set\elseE144f\ifx\empty\def@ttfontE145t\PackageWarning{altfont}{Nodefaulttypewriterfontdefined!}E146f\else\renewcommand{\ttdefault}{\def@ttfont}\fiE147]\fiE148]}I8.10nTheenduTIAtUUlast,theoptionsareproGcessed.E149S\ProcessOptionsE150Sh=pack9age#g i8Q;0"V cmbx10.Ɍ cmbsy10+ cmsy9*5" cmmi9)߆Tff cmtt12(kAHff cmssbx10'U cmssi10&': cmti10%ߤN cmtt9$N cmbx12# logo10!m#R cmss10 Nff cmbx12ow cmss9t : cmbx9o cmr9߆T cmtt12q% cmsy6|{Ycmr8!", cmsy10XQ cmr12GGcmss17DtGGcmr17 !", cmsy10 b> cmmi10K`y cmr10ٓRcmr7Z