.net c# pdf viewer : Batch combine pdf control application system azure web page windows console letterfaq7-part551

kpsewhich -var-value TEXMFLOCAL
theoutputbeingtheactualpath,forexample(ontheworkstationthisauthorisusing
today):
/usr/local/share/texmf
InaMiKTeXinstallation,thelocationwillinfacttypicallybesomethingyou
specifiedyourselfwhenyouinstalledMiKTeXinthefirstplace,butyoumayfindyou
needtocreateone.TheMiKTeX“Settings”window(
Start
!
Programs
!
MiKTeX
!
Settings
)hasatab“
Roots
”;thattabgivesalistofcurrentTDSroots(they’retypically
notcalled
texmf
-anything).Ifthere’snotonetherewith“
local
”initsname,createan
appropriateone(seebelow),andregisteritusingthewindow’s“
Add
”button.
TheMiKTeXFAQsuggeststhatyoushouldcreate“
C:\Local TeX Files
”,which
isgoodifyoumanageyourownmachine,butoftennotevenpossibleincorporate,or
similar,environments—insuchsituations,theusermayhavenocontroloverthehard
discofthecomputer,atall.
Sotherealcriterionisthatyourlocaltreeshouldbesomewherethatyou,rather
thanthesystem,control.Restrictivesystemsoftenprovidea“homedirectory”foreach
user,mountedasanetworkdrive;thisisanaturalhomefortheuser’slocaltree.Other
(oftenacademic)environmentsassumetheuserisgoingtoprovideamemorystick,and
willassignitadefineddriveletter—anothergoodcandidatelocation.Notethatthe
semanticsofsuchatreeareindistinguishablefromthoseofa“home”TEXMFtree.
Youmightnotwishtousethe‘local’tree:
• ifthepackage,orwhatever,is“personal”(forexample,somethingcommercialthat
hasbeenlicensedtoyoualone,orsomethingyou’redevelopingyourself),itshould
goinyour“home”TEXMFtree;
• ifyouknowthatthepackageyouareinstallingisareplacementforthecopyonthe
TEXMFtreeofyour(La)TeXdistribution;inthiscaseitisreasonabletoreplace
theexistingcopyintheTEXMFtree.
Ifthesystemisupgraded(orotherwisere-installed),acopymadeintheTEXMFtree
willprobablybeoverwrittenordeleted.Thismaybewhatyouwant,butotherwiseit’sa
powerfulincentivetouseatreethatisnot“partoftheinstalledsystem”.
Thereasononemightplaceupgradesthedistribution’smaintreeistoavoidconfu-
sion.Supposeyouweretoplacethefileonthelocaltree,andtheninstallanewversion
ofthedistribution—youmighthaveaneffectlike:
• distributioncomeswithpackageversionn;
• youinstallpackageversionn+1onthelocaltree;and
• theupdateddistributionprovidespackageversionn+2.
Insuchasituation,youcouldfindyourselfusingversionn+1(fromthelocaltree)
afterthenewdistributionhasbeeninstalled.
Ifyouinstallinthelocaltree,theonlywaytoavoidsuchproblemsistocarefully
purgethelocaltreewheninstallinganewdistribution. Thisistedious,ifyou’re
maintainingalargeinstallation.
112 Wheretoinstallpackages
Weassumeherethatyouhavedecidedwhattreetoputyourfilesin,afterreading
choosingaTDStree”.Wewillthereforewrite
$TEXMF
forit,andyouneedtosubstitute
thetreeyoudecidedon.
Thebasicideaistoimitatethedirectorystructureinyourexistingtree(s).Hereare
someexamplesofwherevarioussortsoffilesshouldgo:
.sty, .cls or r .fd: $TEXMF/tex/<format>/<package>/
.mf:
$TEXMF/fonts/source/<supplier>/<font>/
.tfm:
$TEXMF/fonts/tfm/<supplier>/<font>/
.vf:
$TEXMF/fonts/vf/<supplier>/<font>/
.afm:
$TEXMF/fonts/afm/<supplier>/<font>/
71
Batch combine pdf - Merge, append PDF files in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Provide C# Demo Codes for Merging and Appending PDF Document
pdf merger; batch combine pdf
Batch combine pdf - VB.NET PDF File Merge Library: Merge, append PDF files in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
VB.NET Guide and Sample Codes to Merge PDF Documents in .NET Project
pdf merge documents; adding pdf pages together
.pfb:
$TEXMF/fonts/type1/<supplier>/<font>/
.ttf:
$TEXMF/fonts/truetype/<supplier>/<font>/
.otf:
$TEXMF/fonts/opentype/<supplier>/<font>/
.pool, .fmt, , .base or .mem: : $TEXMF/web2c
andformodernsystems(thosedistributedin2005orlater,usingTDSv1.1layouts):
.map:
$TEXMF/fonts/map/<syntax>/<bundle>/
.enc:
$TEXMF/fonts/enc/<syntax>/<bundle>/
(Mapandencodingfileswenttodirectoriesunder
$TEXMF/dvips/
,inearlierdistribu-
tions.)
Inthelistsabovehformatiidentifiestheformatthemacrosaredesignedfor—it
canbethingssuchas
plain
,
generic
(i.e.,anyformat),
latex
or
context
(orseveral
lesscommonformats).
Forfonts,hfontireferstothefontfamily(suchas
cm
forKnuth’sComputerModern,
times
forAdobe’sTimesRoman). Thesupplierisusuallyobvious—thesupplier
“public”iscommonlyusedforfreefonts.
Thehsyntaxi(for
.map
and
.enc
files)isacategorisationbasedonthewaythefiles
arewritten;candidatesarenamesofprogramssuchasdvipsorpdftex.
“Straight”(La)TeXinputcantakeotherformsthanthe
.sty
,
.cls
or
.fd
listed
above,too(apartfromthe‘obvious’
.tex
).Examplesare(theobvious)
.tex
,
.lfd
forbabellanguagedefinitions,
.sto
and
.clo
forpackageandclassoptions,
.cfg
forconfigurationinformation,
.def
forvariants(suchasthetypesofdevicesgraphics
drives).The
README
ofthepackageshouldtellyouofanyothers,thoughsometimes
thatinformationisprintedwhenthepackage’scommentsarestripped.Allofthesefiles
shouldlivetogetherwiththemainpackagefiles.
Notethathfontimaystandforasinglefontoranentirefamily:forexample,filesfor
allofKnuth’sComputerModernfontsaretobefoundin
.../public/cm
,withvarious
prefixesasappropriate.
Thefont“supplier”publicisasortofhold-allfor“freefontsproducedforusewith
(La)TeX”:aswellasKnuth’sfonts,public’sdirectoryholdsfontsdesignedbyothers
(originally,butnolongerexclusively,inMetafont).
Documentationforeachpackageshouldallgo,undifferentiated,intoadirectoryon
the
doc/
subtreeoftheTDS.Thelayoutofthesubtreeisslightlydifferent:
doc/latex
hostsallLaTeXdocumentationdirectories,butmorefundamentalthingsarecovered,
e.g.,by
doc/etex
or
doc/xetex
.
113 Tidyingupafterinstallation
There’snotusuallyalottodoafteryou’vecompletedthestepsabove—indeed,if
you’remerelyinstalledfilesdirectfromthearchive,orwhatever,therewillbeprecisely
nothingleft,bywayofdebris.
Thingsyoumightcaretocleanupare:
• thearchivefile,ifyouretrievedyourdatafromthearchiveasa
.zip
file,orthe
like;
• the
.dtx
and
.ins
files,ifyouchosenottoinstallthemwiththedocumentation;
and
• the
.aux
,
.log
,
.idx
,etc.,frombuildingthedocumentation.
Asimplewayofachievingallthisistodownloadtoaworkingdirectorythatwascreated
forthepurpose,andthentodeletethatdirectoryandallitscontentsafteryou’vefinished
installing.
114 Shortcutstoinstallingfiles
Therearecircumstancesinwhichmostofthefussofinstallationcanbebypassed:
• IfyouareaMiKTeXuser,theMiKTeXpackagemanagementsystemcanusually
help;
• Similarly,ifyouareaTeXLiveuser,theTeXLivemanagercanusuallyhelp;
• ThepackageyouwantmayalreadyexistasaZIPfileformattedfordirectinstalla-
tion.
72
VB.NET Word: Merge Multiple Word Files & Split Word Document
destnPath As [String]) DOCXDocument.Combine(docList, destnPath or separate Word file in batch mode within & profession imaging controls, PDF document, image to
attach pdf to mail merge in word; pdf merge comments
C# Create PDF from Tiff Library to convert tif images to PDF in C#
NET component for batch converting tiff images to PDF documents in C# class. Support to combine multiple page tiffs into one PDF file.
c# combine pdf; pdf merge
115 InstallationusingMiKTeXpackagemanager
PackagesforusewithMiKTeXaremaintainedveryefficientlybytheprojectmanagers
(newpackagesandupdatesonCTANordinarilymaketheirwaytotheMiKTeXpackage
repositorywithinaweek).ThusitmakessensefortheMiKTeXusertotakeadvantage
ofthesystemratherthangrindingthroughthestepsofinstallation.
MiKTeXmaintainsadatabaseofpackagesit“knowsabout”,togetherwith(coded)
installationinstructionsthatenableittoinstallthepackageswithminimaluserinterven-
tion;youcanupdatethedatabaseovertheinternet.
IfMiKTeXdoesknowaboutapackageyouneedinstalled,it’sworthusingthe
system: first,opentheMiKTeXpackageswindow: clickon
Start
!
Programs
!
MiKTeX
!
MiKTeX Options
,andselectthe
Packages
tab.
Onthetab,thereisanExplorer-styledisplayofpackages.Right-clickontheroot
ofthetree,“
MiKTeX Packages
”,andselect“
Search
”:enterthenameofthepackage
you’reinterestedin,andpressthe“
Search
”button. IfMiKTeXknowsaboutyour
package,itwillopenupthetreetoshowyouatickboxforyourpackage:checkthat
box.
Ifyoupreferacommand-lineutility,there’smpm.Openacommandshell,andtype:
mpm --install=<package>
(whichofcourseassumesyouknowthenamebywhichMiKTeXreferstoyourpackage).
116 InstallationusingTeXLivemanager
TeXLivemanager(tlmgr)is,bydefault,ashell(orWindowsterminalwindow)com-
mand.Thereisvoluminousdocumentationaboutitfromthecommand
tldoc tlmgr
butbasicoperationisprettystraightforward. Themanagerneedstoknowwhereto
downloadstufffrom;thecanonicalsetupis
tlmgr option n repository y http://mirror.ctan.org/systems/texlive/tlnet
whichpassesthedecisiontothemirrorselector.Youcan(ofcourse)specifyaparticular
archiveormirrorthatyou“trust”,orevenalocaldisccopythatyoukeepup-to-date
(discspaceandbandwidtharesocheapnowadays,thata“homemirror”ofCTANisa
feasibleproposition).
Toupdateasinglepackage,use:
tlmgr update e <package>
Toupdateeverythingyoualreadyhaveinyourinstallation,use:
tlmgr update e --all
117 Installingusingready-builtZIPfiles
Installingpackages,asthey(“traditionally”)appearonCTAN,involves:
• identifyingwheretoputthevariousfilesonanTDStree,
• installingthem,and
• afewhousekeepingoperations.
Mostpeople,formostpackages,findthefirsttwostepsonerous,thelastbeingeasy
(unlessitisforgotten!).
Ready-builtZIPfiles—alsoknownasTDS-ZIPfiles—aredesignedtolightenthe
loadofperformingthefirsttwostepsofinstallation:theycontainallthefilesthatareto
beinstalledforagivenpackage,intheir“correct”locationsinaTDStree.
ToinstallsuchafileonaUnixsystem(weassumethatyou’llinstallintothelocal
TEXMFtree,at
$TEXMFLOCAL
):
cd $TEXMFLOCAL
unzip $package.tds.zip
73
C# Word - Process Word Document in C#
single or batch pages in Word document in C#.NET. Able to sort order of Office Word document pages through C# programming. C# coding to merge / combine two or
reader combine pdf; c# merge pdf files
OnaWindowssystemthatismodernenoughthatithasabuilt-inZIPunpacker,
simplydouble-clickonthefile,andbrowsetowhereit’stobeunpacked.(Wetrustthat
thoseusingearlierversionsofWindowswillalreadyhaveexperienceofusingWinZIP
orthelike.)
Havingunpackedthe
.zip
archive,inmostcasestheonlyremainingchoreisto
updatethefileindexes—asinnormalinstallationinstructions.However,ifthepackage
providesafont,youalsoneedtoenablethefont’smap,whichisdiscussedin“Installing
aType1font
118 “Temporary”installationof(La)TeXfiles
Operatingsystemsandapplicationsneedtoknowwheretofindfiles:manyfilesthat
theyneedare“justnamed”—theuserdoesn’tnecessarilyknowwheretheyare,but
knowstoaskforthem.Thecommonestcase,ofcourse,isthecommandswhosenames
youtypetoashell(yes,evenWindows’“MS-DOSprompt”)areusingashelltoread
whatyoutype:manyofthecommandssimplyinvolveloadingandexecutingafile,and
the
PATH
variabletellstheshellwheretofindthosefiles.
ModernTeXimplementationscomewithabunchofsearchpathsbuiltintothem.
Inmostcircumstancesthesepathsareadequate,butonesometimesneedstoextend
themtopickupfilesinstrangeplaces:forexample,wemaywishtotryanewbundleof
packagesbeforeinstallingthem‘properly’.Todothis,weneedtochangetherelevant
pathasTeXperceivesit.However,wedon’twanttothrowawayTeX’sbuilt-inpath(all
ofasudden,TeXwon’tknowhowtodealwithallsortsofthings).
ToextendaTeXpath,wedefineanoperatingsystemenvironmentvariablein‘path
format’,butleavingagapwhichTeXwillfillwithitsbuilt-invalueforthepath.The
commonestcaseisthatwewanttoplaceourextensioninfrontofthepath,sothatour
newthingswillbechoseninpreference,soweleaveour‘gaptobefilled’attheendof
theenvironmentvariable.Thesyntaxissimple(thoughitdependswhichshellyou’re
actuallyusing):soonaUnix-likesystem,usingthebashshell,thejobmightbedone
like:
export TEXINPUTS=/tmp:
whileinaWindowssystem,withinaMS-DOSwindow,itwouldbe:
set TEXINPUTS=C:/temp;
Ineithercase,we’reaskingTeXtoloadfilesfromtherootdisctemporaryfilesdirectory;
intheUnixcase,the“emptyslot”isdesignatedbyputtingthepathseparator‘
:
’onits
ownattheendoftheline,whileintheWindowscase,thetechniqueisthesame,butthe
pathseparatoris‘
;
’.
Notethatineithersortofsystem,thechangewillonlyaffectinstancesofTeXthat
arestartedfromtheshellwheretheenvironmentvariablewasset.IfyourunTeXfrom
anotherwindow,itwillusetheoriginalinputpath. Tomakeachangeofinputpath
thatwill“stick”forallwindows,settheenvironmentvariableinyourloginscriptor
profile(orwhatever)inaUnixsystemandlogoutandinagain,orin
autoexec.bat
in
aWindowssystem,andrebootthesystem.
WhilealloftheabovehastalkedaboutwhereTeXfindsitsmacrofiles,it’sapplicable
toprettymuchanysortoffileanyTeX-relatedprogramreads—therearelotsofthese
paths,andoftheircorrespondingenvironmentvariables.Inaweb2c-basedsystem,the
copiousannotationsinthe
texmf.cnf
systemconfigurationfilehelpyoutolearnwhich
pathnamescorrespondtowhichtypeoffile.
119 “Private”installationsoffiles
Itsometimeshappensthatyouneedanewversionofsomemacropackageorfont,but
thatthemachineyouuseismaintainedbysomeonewho’sunwillingtoupdateandwon’t
giveyouprivilegestodothejobyourself.A“temporary”installationissometimesthe
correctapproach,butifthere’stheslightestchancethattheinstallationwillbeneeded
onmorethanoneproject,temporaryinstallationsaren’tright.
74
Incircumstanceswhereyouhaveplentyofquotaonbacked-upmedia,oradequate
localscratchspace,thecorrectapproachistocreateaprivateinstallationof(La)TeX
whichincludesthenewstuffyouneed;thisistheideal,butisnotgenerallypossible.
So,sinceyoucan’tinstallintothepublic
texmf
tree,youhavetoinstallintoa
texmf
treeofyourown;fortunately,theTDSstandardallowsforthis,andmoderndistributions
allowyoutodoit.Themostmoderndistributionsrefertothetreeas
$TEXMFHOME
,but
itusedtobecalled
$HOMETEXMF
;sotocheckthatyourTeXsystemdoesindeedsupport
themechanismyoushouldstartwith
kpsewhich -var-value TEXMFHOME
(forexample).Thiswillalmostinvariablyreturnapointertoasubdirectory
texmf
of
yourhomedirectory;thecommonestexceptionisMacintoshes,usingMacTeX,where
thediretoryisconventionally
Library/texmf
inyourhomedirectory.
Ifyoucanconfirmthatthetechniquedoesindeedwork,installyournewpackage(or
whatever)inthecorrectplaceinatreebasedon
$HOME/texmf
,andgenerateanindex
ofthattree
texhash $HOME/texmf
(theargumentspecifieswhichtreeyouareindexing:it’snecessarysinceyoudon’t,by
hypothesis,haveaccesstothemaintree,andtexhashwithouttheargumentwouldtryto
writethemaintree.
Therearetwowrinklestothissimpleformula:first,theinstallationyou’reusing
maynotdefineahomeTEXMFdirectory,andsecond,theremaybesomeobstruction
tousing
$HOME/texmf
asthedefaultname.Ineithercase,agoodsolutionistohave
yourown
texmf.cnf
—anideathatsoundsmorefrighteningthatitactuallyis.The
installation’sexistingfilemaybelocatedwiththecommand:
kpsewhich texmf.cnf
Takeacopyofthefileandputitintoadirectoryofyourown;thiscouldbeany
directory,butanobviouschoiceisthe
web2c
directoryofthetreeyouwanttocreate,
i.e.,
$HOME/texmf/web2c
orthelike.Makeanenvironmentvariabletopointtothis
directory:
TEXMFCNF=$HOME/texmf/web2c
export TEXMFCNF
(foraBourneshellstylesystem),or
setenv TEXMFCNF $HOME/texmf/web2c
(foraC-shellstylesystem).Noweditthecopyof
texmf.cnf
Therewillbealineintheexistingfilethatdefinesthetreewhereeverythingsearches;
thesimplestformofthelineis:
TEXMF = = !!$TEXMFMAIN
but,therearelikelytobeseveralalternativesettingsbehindcommentmarkers(“
%
”),
andthepersonwhoinstalledyoursystemmayhaveleftthemthere.Whatever,youneed
tomodifythelinethat’sineffect:changetheabovetothreelines:
HOMETEXMF = $HOME/texmf
TEXMF = = {$HOMETEXMF,!!$TEXMFMAIN}
% TEXMF = = !!$TEXMFMAIN
theimportantpointbeingthat
$HOMETEXMF
mustcomebeforewhateverwastherebefore,
insidethebraces.Forexample,iftheoriginalwas
TEXMF = = {!!$LOCALTEXMF,!!$TEXMFMAIN}
itshouldbeconvertedto:
75
HOMETEXMF = $HOME/texmf
TEXMF = = {$HOMETEXMF,!!$LOCALTEXMF,!!$TEXMFMAIN}
% TEXMF = = {!!$LOCALTEXMF,!!$TEXMFMAIN}
(retainingtheoriginal,asacomment,ismerelyanaide-memoirincaseyouneedto
makeanotherchange,later).The
!!
signstellthefile-searchinglibrarythatitshould
insistonatexhash-eddirectorytree;ifyoucancountonyourselfrememberingtorun
texhashonyournewtreeeverytimeyouchangeit,thenit’sworthaddingthemarksto
yourtree:
TEXMF = = {!!$HOMETEXMF,!!$LOCALTEXMF,!!$TEXMFMAIN}
asthiswillmake(La)TeXfinditsfilesmarginallyfaster.
Havingmadeallthesechanges,(La)TeXshould“justuse”filesinyournewtree,in
preferencetoanythinginthemaintree—youcanuseitforupdatestopackagesinthe
maintree,aswellasforinstallingnewversionsofthings.
120 Installinganewfont
Fontsarereally“justanotherpackage”,andsoshouldbeinstalledinthesamesortof
wayaspackages.However,fontstendtobemorecomplicatedthantheaveragepackage,
andasaresultit’ssometimesdifficulttoseetheoverallstructure.
Fontfilesmayappearinanyofalargenumberofdifferentformats;eachformathas
adifferentfunctioninaTeXsystem,andeachisstoredinadirectoryitsownsub-treein
theinstallation’sTDStree;allthesesub-treeshavethedirectory
$TEXMF/fonts
astheir
root.Asequenceofanswers,below,describestheinstallationoffonts.Otheranswers
discussspecificfontfamilies—forexample,“usingtheconcretefonts”.
121 InstallingafontprovidedasMetafontsource
InstallingMetafontfontsis(bycomparisonwithothersortsoffont)ratherpleasingly
simple.Nowadays,theyaremostlydistributedjustastheMetafontsource,sincemodern
TeXdistributionsareabletoproduceeverythingtheuserneeds“onthefly”;however,if
thedistributiondoesincludeTFMfiles,installthemtoo,sincetheysavealittletimeand
don’toccupymuchdiscspace.AlwaysdistrustdistributionsofPKfontbitmapfiles:
there’snowayoflearningfromthemwhatprintertheyweregeneratedfor,andnaming
schemesunderdifferentoperatingsystemsareanothersourceofconfusion.
Wheretoinstallfiles”specifieswherethefilesshouldgo.
Furtherconfusionisintroducedbyfontfamilieswhoseauthorsdeviserulesfor
automaticgenerationofMetafontsourcesforgeneratingfontsatparticularsizes;the
installationhastoknowabouttherules,asotherwiseitcannotgeneratefontfiles.No
generaladviceisavailable,butmostsuchfontfamiliesarenowobsolescent.
122 ‘Installing’aPostScriptprinterbuilt-infont
Thereisa“standard”setoffontsthathasappearedineveryPostScriptprintersincethe
secondgenerationofthetype.Thesefonts(8familiesoffourtextfontseach,andthree
special-purposefonts)areofcoursewidelyused,becauseoftheirsimpleavailability.
Thesetconsistsof:
• Timesfamily(4fonts)
• Palatinofamily(4fonts)
• NewCenturySchoolbookfamily(4fonts)
• Bookmanfamily(4fonts)
• Helveticafamily(4fonts)
• AvantGarde(4fonts)
• Courierfamily(4fonts)
• Utopiafamily(4fonts)
• ZapfChancery(1font)
• ZapfDingbats(1font)
• Symbol(1font)
76
Allthesefontsaresupported,forLaTeXusers,bythepsnfsssetofmetricsandsupport
filesinthefile
lw35nfss.zip
onCTAN.AlmostanyremotelymodernTeXsystem
willhavesomeversionofpsnfssinstalled,butusersshouldnotethatthemostrecent
versionhasmuchimprovedcoverageofmathswithTimes(seepackagemathptmx)and
withPalatino(seepackagemathpazo,aswellasamorereliablesetoffontmetrics.
Thearchive
lw35nfss.zip
islaidoutaccordingtotheTDS,soinprinciple,instal-
lationconsistssimplyof“unzipping”thefileattherootofa
texmf
tree.
Documentationofthepsnfssbundleisprovidedin
psnfss2e.pdf
inthedistribution.
mathpazo.sty
: Partofthepsnfssbundle
mathptmx.sty
: Partofthepsnfssbundle
psnfss
bundle:
macros/latex/required/psnfss
123 PreparingaType1font
TheprocessofinstallingaType1fontsetisratherconvoluted,andwewilldealwith
itintwochunks:first(inthepresentanswer)preparingthefontforinstallation,and
secondinstallingaType1font).
Manyfontsaresuppliedin(La)TeXreadyform:suchfontsneednopreparation,
andmaybeinstalledimmediately.
However,ifyoupurchaseafontfromaTypefoundry(eitherdirectorviaoneofthe
webstores),youarelikelytoneedto‘prepare’itforusewith(La)TeX.Therestofthis
answerdiscussesthispreparation.
• Acquirethefont.AverysmallsetofType1fontsisinstalledinmostPostScript
printersyouwillencounter. Forthosefew(whoseuseiscoveredbythebasic
PSNFSSpackage),youdon’tneedtheType1fontitself,tobeabletoprintusing
thefont.
ForallthemyriadotherType1fonts,tobeabletoprintusingthefontyouneedthe
Type1fileitself.Someoftheseareavailableforfree(they’veeitherbeendonated
tothepublicdomain,orweredevelopedaspartofafreesoftwareproject),butthe
vastmajorityarecommercialproducts,requiringyoutospendrealmoney.
• Acquirethefonts’AFMfiles.AFMfilescontaininformationfromthefontfoundry,
aboutthesizesofthecharactersinthefont,andhowtheyfittogether.Onemeasure
ofthequalityofafont-supplieristhattheyprovidetheAFMfilesbydefault:ifthe
filesarenotavailable,youareunlikelytobeabletousethefontwith(La)TeX.
• RenametheAFMfilesandtheType1filestomatchtheBerryfontnamingscheme.
• GenerateTeXmetricfilesfromtheAFMfiles.Thecommonesttoolforthistask
isfontinst;thepackagedocumentationhelps,butotherguidesareavailable(see
below).Thesimplestpossiblescripttopasstofontinstis:
\latinfamily{xyz}{}
\bye
where
xyz
istheBerrynameofthefontfamily.Thissimplescriptisadequatefor
mostpurposes:itsoutputcoversthefontfamilyinbothT1andOT1fontencodings.
Nevertheless,withfancierfonts,moreelaboratethingsarepossiblewithfontinst:
seeitsdocumentationfordetails.
Fontinstalsogeneratesmapfiles,andLaTeXfontdefinition(
.fd
)files.
Havingtraversedthislist,youhaveasetoffontfilesreadyforinstallation.
fontinst.sty
:
fonts/utilities/fontinst
Type1installationguide:
info/Type1fonts/fontinstallationguide/
fontinstallationguide.pdf
124 InstallingaType1font
OnceyouhaveapreparedType1font,eitherdirectfromCTANorthelike,orhaving
‘prepared’ityourself,youcangetonwithinstallation.
Theprocedureismerelyanextensionofthatforpackages,etc.,somuchofwhat
followswillbefamiliar:
77
• Installthefiles,inyourlocal
texmf
tree(theadviceaboutinstallingnon-standard
thingsapplieshere,too).Thefollowinglistgivesreasonabledestinationsforthe
variousfilesrelatedtoafontfamilyhfnamei:
.pfb,
.pfa
.../fonts/type1/<foundry>/<fname>
.tfm
.../fonts/tfm/<foundry>/<fname>
.vf
.../fonts/vf/<foundry>/<fname>
.sty,
.fd
.../tex/latex/<fname>
.map
.../fonts/map/dvips/<foundry>
butifyouarelucky,youwillbestartingfromadistributionfromCTANandthere
isacorresponding
.tds.zip
file:usingthisTDS-filesavesthebotherofdeciding
wheretoputyourfilesintheTDStree.
• Regeneratethefileindexes(asdescribedinpackageinstallation).
• Updatethedvips,PDFTeXandothermaps:
– OnanycurrentTeXLive-basedsystem,orateTeXv3.0system,executethe
command
updmap-sys --enable Map p <fname>.map
asroot.(Ifyoucanuseupdmap-sys—do;ifnot—presumablybecauseyour
(La)TeXsystemwassetupbysomeoneelse—youhavetofallbackonplain
updmap,butbeawarethatit’sapotentsourceofconfusion,settingupmapsets
thatmightbechangedbehindyourback.)
– OnacurrentMiKTeXsystem,updatethesystemfile
updmap.cfg
,usingthe
shellcommand
initexmf --edit-config-file updmap
addingalineattheend:
Map <fname>.map
foreachfontfamilyhfnameiyouareaddingtothesystem.Nowgeneraterevised
mapswiththeshellcommand
initexmf --mkmaps
This,andothermatters,aredescribedinMiKTeX“advanced”documentation.
Bothprocesses(preparingandinstallingafont)areverywell(andthoroughly)described
inPhilippLehman’sguidetofontinstallation,whichmaybefoundonCTAN.
fontinst.sty
:
fonts/utilities/fontinst
Type1installationguide:
info/Type1fonts/fontinstallationguide/
fontinstallationguide.pdf
125 InstallingtheType1versionsoftheCMfonts
Thisisaspecialisedcaseofinstallingafont,butitisalmostnevernecessary—it’s
inconceivablethatany(evenremotely)recentsystemwillnothavethefontsalready
installed.Youcanconfirmthis(near-inevitable)factbytryingthefonts.Onasystem
thatusesdvips(almostalldo),trythesequence:
latex sample2e
dvips -o o sample2e.ps s sample2e
ata“commandprompt”(shell,inaUnix-stylesystem,“DOSbox”inaWindows
system).
Ifthecommandworksatall,theconsoleoutputofthecommandwillincludea
sequenceofType1fontfilenames,listedas
<path/cmr10.pfb>
andsoon;thisis
dvipstellingyouit’scopyinginformationfromtheType1font,andyouneeddono
more.
Ifthetesthasfailed,youneedtoinstallyourownsetofthefonts;thedistribution
(includingallthefontstheAMSdesignedandproducedthemselves)isnowdescribed
asamsfonts.Thebundlecontainsmetricandmapfiles—allyouneedtoinstallthe
fonts.
78
AMSandCMfonts,inType1 format
:
fonts/amsfonts
K
Fonts
K.1 AdobeType1(“PostScript”)fonts
126 UsingAdobeType1fontswithTeX
Inordertouseanyfont,TeXneedsametricfile(TFMfile).Severalsetsofmetrics
forcommonAdobeType1fontsareavailablefromthearchives;formechanisms
forgeneratingnewones,seemetricsforPostScriptfonts. Youalsoneedthefonts
themselves;PostScriptprinterscomewithasetoffontsbuiltin,buttoextendyour
repertoireyouusuallyneedtobuyfromoneofthemanycommercialfontvendors(see,
forexample,“choiceoffonts”).
IfyouuseLaTeX2e,accesstoyourprinter’sfontsisofferedbythePSNFSSpack-
age;theLaTeX3projectteamdeclarethatPSNFSSisa“required”partofaLaTeX
distribution,andbugreportsmaybesubmittedviatheLaTeXbugssystem.PSNFSS
givesyouasetofpackagesforchangingthedefaultroman,sans-serifandtypewriter
fonts;e.g.,themathptmxpackagewillsetupTimesRomanasthemaintextfont(and
introducesmechanismstotypesetmathematicsusingTimesandvariousmore-or-less
matchingfonts),whilepackageavantchangesthesans-seriffamilytoAvantGarde,and
courierchangesthetypewriterfonttoCourier.Togowiththesepackages,youneed
thefontmetricfilesandfontdescription(
.fd
)filesforeachfontfamilyyouwanttouse.
Forconvenience,metricsforthe‘common35’PostScriptfontsfoundinmostPostScript
printersareprovidedwithPSNFSS,packagedasthe“Laserwriterset”.
ForolderversionsofLaTeXtherearevariousschemes,ofwhichthesimplesttouse
isprobablythePSLaTeXmacrosdistributedwithdvips.
ForPlainTeX,youloadwhateverfontsyoulike;iftheencodingofthefontsis
notthesameasComputerModernitwillbeuptoyoutoredefinevariousmacrosand
accents,oryoucanusethefontre-encodingmechanismsavailableinmanydriversand
inps2pkandafm2tfm.
Somecommonproblemsencounteredarediscussedelsewhere(seeproblemswith
PSfonts).
Metricsforthe‘Laserwriter’setof35fonts
:
macros/latex/required/
psnfss/lw35nfss.zip
psnfss
:
macros/latex/required/psnfss
127 PreviewingfilesusingType1fonts
Originally,freeTeXpreviewerswereonlycapableofdisplayingbitmap(PK)fonts,
butfreeType1fontrenderingsoftwarehasbeenavailableforsometime,andmany
previewersnowusesuchfacilities.
Thealternative,forpreviewers,isautomaticgenerationoftherequisitePKfiles
(usinggsftopk,orsimilar,behindthescenes).
Intheunlikelyeventthatyourpreviewerisn’tcapableofeither,youhaveacouple
options:
• ConverttheDVIfiletoPostScriptanduseaPostScriptpreviewer.Somesystems
offerthiscapabilityasstandard,butmostpeoplewillneedto useaseparate
previewersuchasghostscriptorghostscript-basedviewerssuchas(free)gvor
(shareware)gsview.
• IfyouhavethePostScriptfontsinType1format,useps2pkorgsftopk(designedfor
usewiththeghostscriptfonts)tomakePKbitmapfontswhichyourpreviewerwill
understand(aprocesssimilartothewaysomebrowsersfothejob‘automatically’)
Thiscanproduceadequateresults,alsosuitableforprintingwithnon-PostScript
devices.(Note:ifyoupurchasedthefonts,itisadvisabletocheckthattheirlicence
permitsyoutoconvertthem,forprivateuse,inthisway.)
gsftopk
:
fonts/utilities/gsftopk
79
gv
: Browse
support/gv
ps2pk
:
fonts/utilities/ps2pk
128 TeXfontmetricfilesforType1fonts
ReputablefontvendorssuchasAdobesupplymetricfilesforeachfont,inAFM(Adobe
FontMetric)form;thesecanbeconvertedtoTFM(TeXFontMetric)form. Most
moderndistributionshaveprebuiltmetricswhichwillbemorethanenoughformany
people;butyoumayneedtodotheconversionyourselfifyouhavespecialneedsor
acquireanewfont.Oneimportantquestionistheencodingof(Latincharacter)fonts;
whileweallmoreorlessagreeaboutthepositionofabout96charactersinfonts(the
basicASCIIset),therestofthe(typically)256vary.Themostobviousproblemsare
withfloatingaccentsandspecialcharacterssuchasthe‘poundssterling’sign.There
arethreewaysofdealingwiththis:eitheryouchangetheTeXmacroswhichreference
thecharacters(notmuchfun,anderror-prone);oryouchangetheencodingofthe
font(easierthanyoumightthink);oryouusevirtualfontstopretendtoTeXthatthe
encodingisthesameasitisusedto.LaTeX2ehasfacilitiesfordealingwithfontsin
differentencodings;readtheLaTeXCompanionformoredetails.Inpractice,ifyoudo
muchnon-English(butLatinscript)typesetting,youarestronglyrecommendedtouse
thefontencpackagewithoption‘
T1
’toselect‘Cork’encoding.
AnalternativefavouredbysomeisY&Y’s“private”LY1encoding,whichisde-
signedtositwellwith“Adobestandard”encodedfonts.BasicmacrosupportofLY1
isavailable:notethatthe“relationwithAdobe’sencoding”meansthattheLY1user
needsnovirtualfonts.
AlanJeffrey’sfontinstpackageisanAFMtoTFMconverterwritteninTeX;it
isusedtogeneratethefilesusedbyLaTeX2e’sPSNFSSpackagetosupportuseof
PostScriptfonts.Itisasophisticatedpackage,notforthefaint-hearted,butispowerful
enoughtocopewithmostneeds.Muchofitspowerreliesontheuseofvirtualfonts.
Forslightlysimplerproblems,Rokicki’safm2tfm,distributedwithdvips,isfast
andefficient;notethatthemetricsandstylesthatcomewithdvipsarenotcurrently
LaTeX2ecompatible.
FortheMacintosh(classic),thereisaprogramcalledEdMetricswhichdoesthejob
(andmore).EdMetricscomeswiththe(commercial)Texturesdistribution,butisitself
freesoftware,andisavailableonCTAN.
dvips
:
dviware/dvips
EdMetrics
:
systems/mac/textures/utilities/EdMetrics.sea.hqx
fontinst
:
fonts/utilities/fontinst
LY1support
:
fonts/psfonts/ly1
129 DeployingType1fonts
FortheLaTeXusertryingtousethePSNFSSpackage,threequestionsmayarise.
First,youhavetodeclaretotheDVIdriverthatyouareusingPostScriptfonts;in
thecaseofdvips,thismeansaddinglinestothe
psfonts.map
file,sothatdvipswill
knowwheretheproperfontsare,andwon’ttrytofindPKfiles.Ifthefontisn’tbuilt
intotheprinter,youhavetoacquireit(whichmaymeanthatyouneedtopurchasethe
fontfiles).
Second,yourpreviewermustknowwhattodowiththefonts:seepreviewingtype1
fonts.
Third,thestretchandshrinkbetweenwordsisafunctionofthefontmetric;itisnot
specifiedinAFMfiles,sodifferentconverterschoosedifferentvalues.ThePostScript
metricsthatcomewithPSNFSSusedtoproducequitetightsetting,buttheywere
revisedinmid1995toproduceacompromisebetweenAmericanandEuropeanpractice.
Sophisticatedusersmaynotfindeventhenewthevaluestotheirtaste,andwantto
overridethem.Eventhecasualusermayfindmorehyphenationoroverfullboxesthan
ComputerModernproduces;butCMisextremelygenerous.
80
Documents you may be interested
Documents you may be interested