how to open pdf file on button click in mvc : Adding pdf to html page SDK Library API .net wpf asp.net sharepoint letterfaq7-part754

kpsewhich -var-value TEXMFLOCAL
theoutputbeingtheactualpath,forexample(ontheworkstationthisauthorisusing
today):
/usr/local/share/texmf
In aMiKTeX installation, thelocation willin fact typically besomethingyou
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
purgethelocal treewhen installing anew distribution. Thisistedious, if you’re
maintainingalargeinstallation.
112 Wheretoinstallpackages
Weassumeherethatyouhavedecided whattreetoputyourfilesin, afterreading
choosingaTDStree”.Wewillthereforewrite
$TEXMF
forit,andyouneedtosubstitute
thetreeyoudecidedon.
Thebasicideaistoimitatethedirectorystructureinyourexistingtree(s).Hereare
someexamplesofwherevarioussortsoffilesshouldgo:
.sty, .cls or .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
Adding pdf to html page - SDK Library API:C# PDF Convert to HTML SDK: Convert PDF to html files in C#.net, ASP.NET MVC, WinForms, WPF application
How to Convert PDF to HTML Webpage with C# PDF Conversion SDK
www.rasteredge.com
Adding pdf to html page - SDK Library API:VB.NET PDF Convert to HTML SDK: Convert PDF to html files in vb.net, ASP.NET MVC, WinForms, WPF application
PDF to HTML Webpage Converter SDK for VB.NET PDF to HTML Conversion
www.rasteredge.com
.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
SDK Library API:VB.NET PDF Page Insert Library: insert pages into PDF file in vb.
Support adding PDF page number. Offer PDF page break inserting function. DLLs for Adding Page into PDF Document in VB.NET Class. Add necessary references:
www.rasteredge.com
SDK Library API:C# PDF Page Insert Library: insert pages into PDF file in C#.net
By using reliable APIs, C# programmers are capable of adding and inserting (empty) PDF page or pages from various file formats, such as PDF, Tiff, Word, Excel
www.rasteredge.com
115 InstallationusingMiKTeXpackagemanager
PackagesforusewithMiKTeXaremaintainedveryefficientlybytheprojectmanagers
(newpackagesandupdatesonCTANordinarilymaketheirwaytotheMiKTeXpackage
repositorywithinaweek).ThusitmakessensefortheMiKTeXusertotakeadvantage
ofthesystemratherthangrindingthroughthestepsofinstallation.
MiKTeXmaintainsadatabaseofpackagesit“knowsabout”,togetherwith(coded)
installationinstructionsthatenableittoinstallthepackageswithminimaluserinterven-
tion;youcanupdatethedatabaseovertheinternet.
IfMiKTeXdoesknowaboutapackageyouneedinstalled,it’sworthusingthe
system: first, open theMiKTeXpackageswindow: click on
Start
!
Programs
!
MiKTeX
!
MiKTeX Options
,andselectthe
Packages
tab.
Onthetab,thereisanExplorer-styledisplayofpackages.Right-clickontheroot
ofthetree,“
MiKTeX Packages
”,andselect“
Search
”:enterthenameofthepackage
you’reinterestedin,and pressthe“
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 repository 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 <package>
Toupdateeverythingyoualreadyhaveinyourinstallation,use:
tlmgr update --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
SDK Library API:VB.NET PDF Library SDK to view, edit, convert, process PDF file
Perform annotation capabilities to mark, draw, and visualize objects on PDF document page. Capable of adding PDF file navigation features to your VB.NET program
www.rasteredge.com
SDK Library API:C# PDF Library SDK to view, edit, convert, process PDF file for C#
Capable of adding PDF file navigation features to your C# program. Perform annotation capabilities to mark, draw, and visualize objects on PDF document page.
www.rasteredge.com
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
SDK Library API:C# PDF insert image Library: insert images into PDF in C#.net, ASP
image adding library control for PDF document, you can easily and quickly add an image, picture or logo to any position of specified PDF document file page.
www.rasteredge.com
SDK Library API:C# PDF File & Page Process Library SDK for C#.net, ASP.NET, MVC
PDF in VB.NET, VB.NET convert PDF to HTML, VB.NET convert PDF to Word Provides you with examples for adding an (empty) page to a PDF and adding empty pages
www.rasteredge.com
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
Takeacopy ofthefileand put it into adirectory of your own; thiscould beany
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
SDK Library API:VB.NET PDF File & Page Process Library SDK for vb.net, ASP.NET
page modifying page, you will find detailed guidance on creating, loading, merge and splitting PDF pages and Files, adding a page into PDF document, deleting
www.rasteredge.com
SDK Library API:C# PDF insert text Library: insert text into PDF content in C#.net
C#.NET PDF SDK - Insert Text to PDF Document in C#.NET. Providing C# Demo Code for Adding and Inserting Text to PDF File Page with .NET PDF Library.
www.rasteredge.com
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
SDK Library API:VB.NET PDF insert text library: insert text into PDF content in vb
VB.NET PDF - Insert Text to PDF Document in VB.NET. Providing Demo Code for Adding and Inserting Text to PDF File Page in VB.NET Program.
www.rasteredge.com
SDK Library API:C# PDF Annotate Library: Draw, edit PDF annotation, markups in C#.
text comments on PDF page using C# demo code in Visual Stuodio .NET class. C#.NET: Add Text Box to PDF Document. Provide users with examples for adding text box
www.rasteredge.com
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
: Part ofthe psnfssbundle
mathptmx.sty
: Part ofthe psnfssbundle
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
printersyouwill encounter. Forthosefew(whoseuseiscovered by thebasic
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
Type 1installationguide:
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 <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
Type 1installationguide:
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 sample2e.ps sample2e
at a“command prompt”(shell,in aUnix-stylesystem, “DOSbox”in aWindows
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
forcommonAdobeType1 fonts areavailablefromthearchives; for mechanisms
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
offer thiscapability as standard, but most peoplewill need to 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’sfontinst packageisanAFMtoTFMconverterwritteninTeX;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
metricsthat comewithPSNFSSusedtoproducequitetightsetting,but theywere
revisedinmid1995toproduceacompromisebetweenAmericanandEuropeanpractice.
Sophisticatedusersmaynotfindeventhenewthevaluestotheirtaste,andwantto
overridethem.Eventhecasualusermayfindmorehyphenationoroverfullboxesthan
ComputerModernproduces;butCMisextremelygenerous.
80
Documents you may be interested
Documents you may be interested