.net c# pdf viewer : Combine pdf Library software component .net wpf web page mvc letterfaq9-part553

\usepackage[T1]{fontenc}
fortext,and
\usepackage{textcomp}
ifyouwanttouseanyoftheTS1-encodingsymbols.Thereisnosupportforusingfonts
accordingtotheOT1encoding.
LatinModernfonts:
fonts/lm
136 Getting‘free’fontsnotinyourdistribution
Somefontsarefreetouse,butmaynotbesold.Thiscreatesadilemmafordistributions:
usersmaywantthefonts,butsincethedistributionisalsoavailableonaDVDforsale,
thefontsmaynotbeinthedistribtution.
TheCTANarchivesholdsuchfonts,togetherwithallthenecessarysupportfiles,
butevenwiththesupportfilesready-made,installingafontisatediousbusiness.
ForTeXLiveusers,thisdilemmaissolvedbythegetnonfreefontsscript.Download
thescriptinstallerfrom
http://tug.org/fonts/getnonfreefonts/
;thewebpage
tellsyouhowtoruntheinstallertogetthescript,andwhatfontsarecurrentlyavailable
Oncethescriptisinstalled,youcanaskitwhatithasavailablebysaying:
getnonfreefonts -l
andyoucanaskittoinstallafont(inyourlocaltexmftree)by:
getnonfreefonts luximono
(forexample;theprintedversionoftheFAQusesluximono,sothattheexamplewasto
hand...).
(Systemadminstratorsmayusegetnonfreefonts-sys,whichwillinstallthefontin
the‘public’
texmf
tree,sothatallusersofthesystemmayusethenewfont.)
ThescriptwilldownloadtherelevantfontfilesfromCTAN,extractthemfromtheir
.zip
file,installthemandupdatethefontmaps.Itevengoessofarastoapologisefor
howlongit’staking!
K.4 Metafontfonts
137 GettingMetafonttodowhatyouwant
Metafontallowsyoutocreateyourownfonts,andmostTeXuserswillneverneedto
useit—modern(La)TeXsystemscontainratherfewMetafontfontsofanysignificance,
andwhenMetafontoutputisneededthefontgenerationisdone,automatically,“onthe
fly”.
Ifyoufindyouhavesomespecialrequirementthatthesystemdoesn’tsatisfy,you
needtoknowaboutMetafontinrathermoredetail. Metafont,unlikeTeX,requires
customisationforeachoutputdevice:suchcustomisationisconventionallyheldina
“mode”associatedwiththedevice.Modesarecommonlydefinedusingthe
mode_def
conventiondescribedonpage94ofTheMetafontbook(seeTeX-relatedbooks).Your
distributionshouldprovideafile,conventionallycalled
local.mf
,containingallthe
mode_def
syouwillbeusing.Intheunlikelyeventthat
local.mf
doesn’talreadyexist,
KarlBerry’scollectionofmodes(
modes.mf
)isagoodstartingpoint(itcanbeusedas
a‘
local.mf
’withoutmodificationinamodernimplementationofMetafont).Settings
fornewoutputdevicesareaddedto
modes.mf
astheybecomeavailable.
Nowcreatea
plain
basefileusingmf(in“initialisation”mode),
plain.mf
,and
local.mf
:
% mf f -ini
This is s METAFONT...
**
plain # # you type plain
(output)
*
input local l # you type e this
(output)
91
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
.net merge pdf files; best pdf merger
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
add pdf files together; combine pdf online
*
dump # # you type this
Beginning to o dump on n file e plain...
(output)
Thiswillcreateabasefilenamed
plain.base
(orsomethingsimilar;forexample,it
willbe
PLAIN.BAS
onMS-DOSsystems).Movethefiletothedirectorycontainingthe
basefilesonyoursystem,andruntexhashasnecessary.
NowyouneedtomakesureMetafontloadsthisnewbasewhenitstartsup. If
Metafontloadsthe
plain
basebydefaultonyoursystem,thenyou’rereadytogo.
UnderUnix(usingthedefaultTeXLive(andearlier)distributionsthisdoesindeed
happen,butwecouldforinstancedefineacommandplainmfwhichexecutes‘
mf
-base=plain
’(or,inmoretraditionalstyle‘
mf &plain
’)whichloadsthe
plain
base
file.
TheusualwaytocreateafontwithMetafont(withanappropriatebasefileloaded)
istostartMetafont’sinputwiththeline
\mode=<mode name>; mag=<magnification>; ; input t <font file e name>
inresponsetothe‘
**
’promptorontheMetafontcommandline.(If
<mode name>
is
unknownoromitted,themodedefaultsto‘proof’modeandMetafontwillproducean
outputfilecalled
<font file name>.2602gf
)The
<magnification>
isafloating
pointnumberora‘magstep’(magstepsdefinesizesbystatinghowmanytimesyou
needtomultiplyabasesizeby
1.2
,soforabasesizeof
10
,
magstep 1
is
12
,
magstep
2
is
14.4
If
mag=<magnification>
isomitted,thenthedefaultis
1
(
magstep 0
).For
example,togeneratecmr10at
12pt
foranEpson,printeryoumighttype
mf \mode=epson; mag=magstep 1; ; input t cmr10
NotethatunderUnixthe
\
and
;
charactersmustusuallybequotedorescaped,sothis
wouldtypicallylooksomethinglike
mf ’\mode=epson; mag=magstep p 1; input t cmr10’
Ifyouneedaspecialmodethatisn’tinthebase,youcanputitscommandsinafile(e.g.,
ln03.mf
)andinvokeitontheflywiththe
\smode
command.Forexample,tocreate
cmr10.300gf
foranLN03printer,usingthefile
% This is ln03.mf f as s of 1990/02/27
% mode_def courtesy of f John Sauter
proofing:=0;
fontmaking:=1;
tracingtitles:=0;
pixels_per_inch:=300;
blacker:=0.65;
fillin:=-0.1;
o_correction:=.5;
(notetheabsenceofthe
mode_def
and
enddef
commands),youwouldtype
mf \smode="ln03"; ; input t cmr10
Thistechniqueisn’toneyoushouldregularlyuse,butitmayproveusefulifyouacquire
anewprinterandwanttoexperimentwithparameters,orforsomeotherreasonare
regularlyeditingtheparametersyou’reusing.Onceyou’vesettledonanappropriateset
ofparameters,youshouldusethemtorebuildthebasefilethatyouuse.
OthersourcesofhelparediscussedinourlistofMetafontandMetapostTutorials.
modes.mf
:
fonts/modes/modes.mf
2
OnthegroundsthatacommandplaincouldbemisconstruedasareferencetoPlainTeX
92
Online Merge PDF files. Best free online merge PDF tool.
RasterEdge C#.NET PDF document merging toolkit (XDoc.PDF) is designed to help .NET developers combine PDF document files created by different users to one PDF
reader merge pdf; c# merge pdf pages
C# PDF: C#.NET PDF Document Merging & Splitting Control SDK
PDF Merging & Splitting Application. This C#.NET PDF document merger & splitter control toolkit is designed to help .NET developers combine PDF document files
add pdf together one file; add pdf files together online
138 Whichfontfilesshouldbekept
Metafontproducesfromitsrunthreefiles,ametrics(TFM)file,agenericfont(GF)file,
andalogfile;allofthesefileshavethesamebasenameasdoestheinput(e.g.,ifthe
inputfilewas
cmr10.mf
,theoutputswillbe
cmr10.tfm
,
cmr10.nnngf
(thefilename
maybemangledifyouareusinganoperatingsystemwhichdoesn’tpermitlongfile
names)and
cmr10.log
).
ForTeXtousethefont,youneedaTFMfile,soyouneedtokeepthat.However,
youarelikelytogeneratethesamefontatmorethanonemagnification,andeachtime
youdosoyou’ll(incidentally)generateanotherTFMfile;thesefilesareallthesame,so
youonlyneedtokeeponeofthem.
Topreviewortoproduceprintedoutput,theDVIprocessorwillneedafontraster
file;thisiswhattheGFfileprovides.However,whilethereused(onceuponatime)to
beDVIprocessorsthatcoulduseGFfiles,modernprocessorsusepackedraster(PK)
files(incidentally,PDFTeXalsousesPKfilesifnothing“better”isavailable,butsee
fuzzyfontsinPDF).Therefore,youneedtogenerateaPKfilefromtheGFfile;the
programgftopkdoesthisforyou,andonceyou’vedonethatyoumaythrowtheGFfile
away.
Thelogfileshouldneverbeneededagain,unlesstherewassomesortofproblemin
theMetafontrun,andneednotthereforebekept.
139 Acquiringbitmapfonts
WhenCTANwasyoung,mostpeoplewouldstartusingTeXwitha300dots-per-inch
(dpi)laserprinter,andsetsofComputerModernbitmapfontsforthisresolutionare
availableonCTAN.(Thereareseparatesetsforwrite-blackandwrite-whiteprinters,as
wellassetsat120dpiand240dpi.)
ThereusedtoregularrequeststhatCTANshouldholdawiderrangeofresolutions,
buttheywereresistedfortworeasons:
• Theneedtodecidewhichprinterstogeneratefontsfor.Thebroad-brushapproach
takenfor300dpiprinterswas(moreorless)justifiedbackthen,giventhedominance
ofcertainprinter‘engines’,butnowadaysonecouldnotmakeanysuchassumption.
• Giventheabove,ithasbeennear-impossibletojustifythespacethatwouldbe
requiredbyahugearrayofbitmapfonts.
Fortunately,(La)TeXdistributiontechnologyhasputastoptothesearguments:most(if
notall)currentdistributionsgeneratebitmapfontsasneeded,andcachethemforlater
re-use.Theimpatientuser,whoisdeterminedthatallbitmapfontsshouldbecreated
onceandforall,maybesupportedbyscriptssuchasallcm(distributedwithTeXLive,
atleast;otherwisesuchapersonshouldconsult“theuseofMetafont)”.
IfyouroutputistoaPostScript-capabledevice,orifyouroutputisdestinedtobe
convertedtoPDF,youshouldswitchtousingType1versionsoftheCMfonts.Twofree
setsareavailable;theolder(bakoma)issomewhatlesswellproducedthanthebluesky
fonts,whichwereoriginallyprofessionallyproducedandsold,butwerethenreleased
forgeneralpublicusebytheiroriginatorsY&YandBlueskyResearch,inassociation
withtheAMSandotherscientificpublishers(theyarenowadaysavailableunderthe
SIL’sOpenFontsLicence).Thetwosetscontainslightlydifferentrangesoffonts,but
youareadvisedtousetheblueskysetexceptwhenbakomaisforsomereasonabsolutely
unavoidable. Inrecentyears,severalother‘Metafont’fontshavebeenconvertedto
Type1format;it’suncommonevertoneedtogeneratebitmapfontsforanypurpose
otherthanpreviewing—see“previewingdocumentswithType1fonts”—ifeventhen.
MoremodernfontsmaybeusedinplaceoftheComputerModernset.TheECfonts
andtheLatinModernfontsarebothcloserelativeswithwiderrangesofglyphstooffer.
BaKoMafonts:
fonts/cm/ps-type1/bakoma
Blueskyfonts: Distributedaspartof
fonts/amsfonts
CMfonts(write-blackprinters):
fonts/cm/pk/pk300.zip
CMfonts(write-whiteprinters):
fonts/cm/pk/pk300w.zip
93
VB.NET PDF: Use VB.NET Code to Merge and Split PDF Documents
Combine End Sub Private Sub Combine(source As List(Of [String]), destn As [String]) Implements PDFDocument.Combine End Sub. APIs for Splitting PDF document in
c# pdf merge; break a pdf into multiple files
C# PowerPoint - Merge PowerPoint Documents in C#.NET
Combine and Merge Multiple PowerPoint Files into One Using C#. This part illustrates how to combine three PowerPoint files into a new file in C# application.
batch merge pdf; append pdf
ECfonts(Type1format):
fonts/ps-type1/cm-super
LatinModernfonts:
fonts/lm
L HypertextandPDF
140 MakingPDFdocumentsfrom(La)TeX
TherearethreegeneralroutestoPDFoutput:Adobe’soriginal‘distillation’route(via
PostScriptoutput),directconversionofaDVIfile,andtheuseofadirectTeX-likePDF
generatorsuchasPDFTeX.
Forsimpledocuments(withnohyper-references),youcaneither
• processthedocumentinthenormalway,producePostScriptoutputanddistillit;
• (onaWindowsorMacintoshmachinewithappropriatetoolsinstalled)passthe
outputthroughaPDFwriterinplaceofaprinterdriver.Thisrouteisonlyappropriate
forsimpledocuments:PDFwriterscannotcreatehyperlinks;
• processthedocumentwith“vanilla”LaTeXandgeneratePDFdirectfromtheDVI
usingdvipdfm/dvipdfmx;or
• processthedocumentdirecttoPDFwithPDFTeX,LuaTeX,orXeTeX.
TotranslatealltheLaTeXcross-referencingintoAcrobatlinks,youneedaLaTeX
packagetoredefinetheinternalcommands.TherearetwooftheseforLaTeX,both
capableofconformingtotheHyperTeXspecification:HeikoOberdiek’shyperref,and
MichaelMehlich’shyper.(Inpractice,almosteveryoneuseshyperref;hyperhasn’t
beenupdatedsince2000.)Hyperref canoftendeterminehowitshouldgeneratehy-
pertextfromitsenvironment,butthereisawidesetofconfigurationoptionsyoucan
givevia
\usepackage
.ThepackagecanoperateusingPDFTeXprimitives,thehyper-
TeX
\special
s,orDVIdriver-specific
\special
commands.BothdvipsandY&Y’s
DVIPSONEcantranslatetheDVIwiththese
\special
commandsintoPostScript
acceptabletoDistiller,anddvipdfmanddvipdfmxhave
\special
commandsoftheir
own.
IfyouusePlainTeX,theEplainmacroscanhelpyoucreatePDFdocumentswith
hyper-references.ItcanoperateusingPDFTeXprimitives,or
\special
commandsfor
thedvipdfm/dvipdfmxDVIdrivers.
WhilethereisnofreeimplementationofallofAdobeDistiller’sfunctionality,any
buttheimplausiblyoldversionsofghostscriptprovideprettyreliabledistillation(but
bewareoftheproblemswithdvipsoutputfordistillation).
Forviewing(andprinting)theresultingfiles,Adobe’sAcrobatReaderisavailable
forafairrangeofplatforms;forthoseforwhichAdobe’sreaderisunavailable,remotely
currentversionsofghostscriptcombinedwithgvorgsviewcandisplayandprintPDF
files,ascanxpdf.
Insomecircumstances,aghostscript-basedviewerapplicationisactuallypreferable
toAcrobatReader.Forexample,onWindowsAcrobatReaderlocksthe
.pdf
fileit’s
displaying:thismakesthetraditional(andhighlyeffective)(La)TeXdevelopmentcycle
of“Edit!Process!Preview”becomeratherclumsy—gsviewdoesn’tmakethesame
<mistake.
AcrobatReader: downloadfrom
http://get.adobe.com/reader
dvipdfm
:
dviware/dvipdfm
dvipdfmx
:
dviware/dvipdfmx
gv
: Browse
support/gv
hyper.sty
:
macros/latex/contrib/hyper
hyperref.sty
:
macros/latex/contrib/hyperref
94
C# Word - Merge Word Documents in C#.NET
Combine and Merge Multiple Word Files into One Using C#. This part illustrates how to combine three Word files into a new file in C# application.
batch pdf merger; acrobat combine pdf
C# PDF File Split Library: Split, seperate PDF into multiple files
Split PDF document by PDF bookmark and outlines. Also able to combine generated split PDF document files with other PDF files to form a new PDF file.
all jpg to one pdf converter; asp.net merge pdf files
141 MakinghypertextdocumentsfromTeX
Ifyouwanton-linehypertextwitha(La)TeXsource,probablyontheWorldWideWeb,
therearefourtechnologiestoconsider:
• startfrom(La)TeX,anduseoneofanumberoftechniquestotranslate(moreor
less)directlytoHTML;
• Startfromtexinfosource,andusetheinfoviewer,orconvertthetexinfosourceto
HTMLusingtexi2html;
• Startfrom(La)TeX;usePDFTeX,XeTeXorLuaTeXtoproducePDF,using
hyperreftoconstructhyperlinks.
• Startfrom(unconventional)(La)TeXwhichusethehyperTeXconventions.
texinfo
:
macros/texinfo/texinfo
142 ThehyperTeXproject
ThehyperTeXprojectextendedthefunctionalityofalltheLaTeXcross-referencing
commands(includingthetableofcontents)toproduce
\special
commandswhichare
parsedbyDVIprocessorsconformingtotheHyperTeXguidelines;itprovidesgeneral
hypertextlinks,includingthosetoexternaldocuments.
TheHyperTeXspecificationsaysthatconformantviewers/translatorsmustrecognize
thefollowingsetof
\special
commands:
href:
html:<a href = = "href_string">
name:
html:<a name e = = "name_string">
end:
html:</a>
image:
html:<img src = = "href_string">
base_name:
html:<base href = = "href_string">
Thehref,nameandendcommandsareusedtodothebasichypertextoperationsof
establishinglinksbetweensectionsofdocuments.
Furtherdetailsareavailableon
http://arXiv.org/hypertex/
; therearetwo
commonly-usedimplementationsofthe specification,amodifiedxdviand(recent
releasesof)dvips.Outputfromthelattermaybeusedinrecentreleasesofghostscript
orAcrobatDistiller.
143 QualityofPDFfromPostScript
AnyreasonablePostScript,includinganyoutputofdvips,maybeconvertedtoPDF,us-
ing(forexample)asufficientlyrecentversionofghostscript,FrankSiegert’s(shareware)
PStill,orAdobe’s(commercial)Distiller.
But,althoughthejobmay(almostalways)bedone,theresultsareoftennotaccept-
able:themostfrequentproblemisbadpresentationofthecharacterglyphsthatmake
upthedocument.Thefollowinganswersoffersolutionstothis(andother)problemsof
badpresentation.Issuescoveredare:
• Wrongtypeoffontsused,whichisthecommonestcauseoffuzzytext.
• Ghostscripttooold,whichcanalsoresultinfuzzytext.
• SwitchingtofontencodingT1encoding,whichisyetanotherpossiblecauseof
fuzzytext.
• Another problem — — missing g characters s — arises from an aged version n of
AdobeDistiller.
• Finally,there’sthecommonconfusionthatarisesfromusingthedvipsconfiguration
file
-Ppdf
,theweirdcharacters.
ItshouldbenotedthatAdobeReader6(releasedinmid-2003,andlaterversions)does
notexhibitthe“fuzziness”thatsomanyoftheanswersbelowaddress.Thisisofcourse
goodnews:however,itwillinevitablybealongtimebeforeeveryuserintheworld
hasthis(orlater)versions,sotheremediesbelowaregoingtoremainforsometimeto
come.
Theproblemsarealsodiscussed,withpracticalexamples,inMikeShell’stestflow
package,whichtheseFAQsrecommendasa“specialisedtutorial.
testflow
:
macros/latex/contrib/IEEEtran/testflow
95
VB.NET TIFF: Merge and Split TIFF Documents with RasterEdge .NET
filePath As [String], docList As [String]()) TIFFDocument.Combine(filePath, docList) End to provide powerful & profession imaging controls, PDF document, tiff
break pdf file into multiple files; add pdf together
VB.NET PowerPoint: Merge and Split PowerPoint Document(s) with PPT
Just like we need to combine PPT files, sometimes, we also want to separate a Note: If you want to see more PDF processing functions in VB.NET, please follow
pdf merge documents; acrobat split pdf into multiple files
144 ThewrongtypeoffontsinPDF
Thisisfarthecommonestproblem:thesymptomisthattextinthedocumentlooks
“fuzzy”.
MostpeopleuseAdobeAcrobatReadertoviewtheirPDF:Readerisdistributed
freeofcharge,andiswidelyavailable,forallitsfaults.Oneofthosefaultsisitsfailure
todealwithbitmapfonts(atleast,inallversionsearlierthanversion6,allofwhich
copiesareprettyold,now... butsomeareoccasionallyfound).
Sowedon’twantbitmapfontsinourPostScript:withthem,charactersshowupin
Reader’sdisplayasblurredblobswhichareoftennotevenrecognisableastheoriginal
letter,andareoftennotproperlyplacedontheline.Nevertheless,evennow,mostTeX
systemshavedvipsconfiguredtouse
.pk
filesinitsoutput.EvenPDFTeXwilluse
.pk
filesifitcanseenoalternativeforafontinthedocumentitisprocessing.
Ourremedyistouse“AdobeType1”versionsofthefontsweneed.SinceAdobe
areinthebusinessofsellingType1fonts,Readerwasofcoursemadetodealwiththem
reallyratherwell,fromtheverybeginning.
Ofcourse,ifyourdocumentusesnothingbutfontsthatcamefromAdobeinthe
firstplace—fontssuchasTimesthatappearinprettymucheveryPostScriptprinter,or
suchasAdobeSabonthatyoupayextrafor—thenthere’snoproblem.
ButmostpeopleuseComputerModerntostartwith,andeventhoserelativesophis-
ticateswhousesomethingasexoticasSabonoftenfindthemselvesusingoddcharacters
fromCMwithoutreallyintendingtodoso.Fortunately,rathergoodversionsoftheCM
fontsareavailablefromtheAMS(whohavethemcourtesyofBlueSkyResearchand
Y&Y).
Mostmodernsystemshavethefontsinstalledreadytouse;andanysysteminstalled
lessthan3yearsagohasadvipsconfigurationfile‘
pdf
’thatsignalstheuseofthe
CMfonts,andalsosetsafewotherparameterstoimprovedvips’output. Usethis
configurationas:
dvips -Ppdf myfile -o o myfile.ps
Thismayproduceawarningmessageaboutfailingtofindtheconfigurationfile:
dvips: warning: no config g file for ‘pdf’
orsomethingsimilar,oraboutfailingtofindafontfile:
dvips: ! ! Couldn’t find header r file e cmr10.pfb
Eitherofthesefailuressignalsthatyoursystemdoesn’thavethefontsinthefirstplace.
Awayofusingthefontsthatdoesn’tinvolvethesophisticationofthe
-Ppdf
mechanismissimplytoloadmaps:
dvips -Pcmz -Pamz z myfile e -o myfile.ps
Youmayencounterthesamewarningmessagesaslistedabove.
Ifyoursystemdoesnothavethefonts,itwon’thavetheconfigurationfileeither;
however,itmighthavetheconfigurationfilewithoutthefonts.Ineithercase,youneed
toinstallthefonts.
145 FuzzyfontsbecauseGhostscripttooold
Soyou’vedoneeverythingtheFAQhastoldyouthatyouneed,correctfontsproperly
installedandappearinginthedvipsoutput,butstillyougetfuzzycharacteroutputafter
distillingwithghostscript.
Theproblemcouldarisefromtoooldaversionofghostscript,whichyoumaybe
usingdirectly,orviaascriptsuchasps2pdf(distributedwithghostscriptitself),dvipdf,
orsimilar.Thoughghostscriptwascapableofdistillationfromversion5.50,thatversion
couldonlyproducebitmapType3outputofanyfontotherthanthefundamental35fonts
(Times,Helvetica,etc.).Laterversionsadded‘complete’distillation,butitwasn’tuntil
version6.50thatonecouldrelyonitforeverydaywork.
So,ifyourPDFoutputstilllooksfuzzyinAcrobatReader,upgradeghostscript.
Thenewversionshouldbeatleastversion6.50,ofcourse,butit’susuallygoodpolicy
togotothemostrecentversion(version8.12atthetimeofwriting—2003).
96
146 FontsgofuzzywhenyouswitchtoT1
You’vebeenhavingproblemswithhyphenation,andsomeonehassuggestedthatyou
shoulduse“
\usepackage[T1]{fontenc}
”tohelpsortthemout.Suddenlyyoufind
thatyourfinalPDFhasbecomefuzzy.Theproblemmayarisewhetheryouareusing
PostScriptoutputandthendistillingit,oryouareusingPDFTeXforthewholejob.
Infact,thisisthesameproblemasmostothersaboutthequalityofPDF:you’ve
abandonedyourprevioussetupusingType1versionsoftheCMfonts,anddvipshas
insertedType3versionsoftheECfontsintoyourdocumentoutput.(See“Adobefont
typesfordetailsofthesefonttypes;also,notethatthefontencodingT1hasnothing
directlytodowiththefontformatType1).
However,asnotedin8-bitType1fonts,Type1versionsofCM-likefontsinT1(or
equivalent)encodingarenowavailable,bothas“real”fonts,andasvirtualfontsets.
Onesolution,therefore,istouseoneofthesealternatives.
Thealternativeistoswitchfontfamilyaltogether,tosomethinglikeTimes(asa
no-thoughtdefault)oroneofthemanymorepleasingAdobe-encodedfonts.Thedefault
actionoffontinst,whencreatingmetricsforsuchafont,istocreatesettingsforboth
OT1andT1encodings,sothere’slittlechangeinwhatgoeson(attheuserlevel)even
ifyouhaveswitchedtoT1encodingwhenusingthefonts.
147 CharactersmissingfromPDFoutput
Ifyou’reusingAcrobatDistillertocreateyourPDFoutput,youmayfindcharacters
missing.Thismaymanifestitselfasmessed-upmathsequations(missing“ ”signs,
forexample),orbitsmissingfromlargesymbols.EarlyversionsofDistillerusedto
ignorecharacterpositions0–31and128–159ofeveryfont:Adobe’sfontsneveruse
suchpositions,sowhyshouldDistiller?
Well,theanswertothisquestionis“becauseAdobedon’tproducealltheworld’s
fonts”—fontslikeComputerModernwerearoundbeforeAdobecameonthescene,
andtheyusepositions0–31.Adobedon’treacttocomplaintslikethatintheprevious
sentence,buttheydoreleasenewversionsoftheirprograms;andDistiller,sinceatleast
version4.0,hasrecognisedthefontpositionsitusedtoshun.
Meanwhile,TeXuserswitholdversionsofDistillerneedtodealwiththeirfonts.
Dvipscomestoouraid:theswitch
-G1
(“remapcharacters”),whichmovestheoffending
charactersoutoftheway.ThePDFconfigurationfile(
-Ppdf
),recommendedabove,
includestheswitch.
Theswitchisnotwithoutitsproblems;pre-2003versionsofdvipswillapplyitto
Adobefontsaswell,causinghavoc,butfortunatelythatproblemisusuallysoluble.
However,adocumentusingbothCMandAdobe-specifiedfontsisstuck.Theonlyreal
solutioniseithertoupgradedvips,ortospendmoneytoupgradeDistiller.
148 Finding‘8-bit’Type1fonts
Elsewhere,answerstotheseFAQsrecommendthatyouusean‘8-bit’fonttopermit
accentuationofinflectedlanguages,andalsorecommendtheuseofType1fontsto
ensurethatyougetgoodqualityPDF.Theserecommendationsusedtobecontradictory:
onecouldnotjust“switch”fromthefreeCMfontstofreeCork-(orsimilarly)encoded
Type1fonts. Thefirstapproachthatstartedtoalleviatetheseproblems,wasthe
developmentofvirtualfontsthatmakeagoodapproachtotheCorkencoding(see
below). Now,however,wehave“true”Type1fontsavailable: asalways,wehave
anembarrassmentofricheswiththreefreealternatives,andonecommercialandone
sharewareversion.
CM-superisanauto-tracedsetwhichencompassesalloftheT1andTS1encodings
aswellastheT2*series(thefamilyofencodingsthatcoverlanguagesbasedonCyrillic
alphabets).Thesefontsareprettyeasytoinstall(theinstallationinstructionsareclear),
buttheyarehuge:don’ttrytoinstallthemifyou’reshortofdiscspace.
CM-LGCisasimilar“super-font”set,butofmuchmoremodestsize;itcoversT1,
TS1andT2Aencodings(asdoesCM-super,andalsocoverstheLGRencoding(for
typesettingGreek,basedonClaudioBeccari’sMetafontsources).CM-LGCmanages
tobesmallbygoingtotheoppositeextremefromCM-super,whichincludesfontsat
97
allthesizessupportedbytheoriginalEC(ahugerange);CM-LGChasonefontper
fontshape,gettingothersizesbyscaling.Thereisaninevitablelossofqualityinherent
inthisapproach,butforthedisc-space-challengedmachine,CM-LGCisanobvious
choice.
Tt2001isasimplescanoftheECandTCfonts,andhassomevirtues—it’s
noticeablysmallerthanCM-superwhilebeinglessstarkthanCM-LGC.
LatinModernisproducedusingtheprogramMetaType1.TheLatinModernset
comeswithT1,TS1LY1encodedvariants(aswellasavariantusingthePolishQX
encoding);fortheglyphsetitcovers,itsoutlinesseemrathercleanerthanthoseof
CM-super.LatinModernismoremodestinitsdiscspacedemandsthanisCM-super,
whilenotbeingnearlyasstarkinitsrangeofdesignsizesasisCM-LGCLatin
Modern’sfontsareofferedinthesamesetofsizesastheoriginalCMfonts.It’shardto
arguewiththechoice:Knuth’srangeofsizeshasstoodthetestoftime,andisoneof
thebasesonwhichtheexcellenceoftheTeXsystemrests.
Virtualfontshelpusdealwiththeproblem,sincetheyallowustomap“bitsof
DVIfile”tosinglecharactersinthevirtualfont;sowecancreatean“é”characterby
recreatingtheDVIcommandsthatwouldresultfromthecode“
\’e
”.However,since
thisinvolvestwocharactersbeingselectedfromafont,thearrangementissufficient
tofoolAcrobatReader:youcan’tusetheprogram’sfacilitiesforsearchingfortext
thatcontainsinflectedcharacters,andifyoucuttextfromawindowthatcontains
suchacharacter,you’llfindsomethingunexpected(typicallytheaccentandthe‘base’
charactersseparatedbyaspace)whenyoupastetheresult.However,ifyoucanlive
withthisdifficulty,virtualfontsareausefulandstraightforwardsolutiontotheproblem.
Therearetwovirtual-fontofferingsofCM-based8-bitfonts—theae(“almostEC”)
andzefontssets;thezefontssethaswidercoverage(thoughtheaesetmaybeextended
toofferguillemetsbyuseoftheaeguillpackage).Neitherofferscharacterssuchas
eth
and
thorn
(usedin,forexample,inIcelandic),buttheaecomplpackageworkswiththe
aefontstoprovidethemissingcharactersfromtheECfonts(i.e.,asbitmaps).
ThesoleremainingcommercialCM-like8-bitfontcomesfromMicropress,who
offerthecompleteECsetinType1format,aspartoftheirrangeofoutlineversions
offontsthatwereoriginallydistributedinMetafontformat.See“commercialdistribu-
tions”.
ThesharewareBaKoMaTeXdistributionoffersasetofType1ECfonts,asanextra
sharewareoption.(Asfarasthepresentauthorcantell,thesefontsareonlyavailableto
usersofBaKoMaTeX:theyarestoredinanarchiveformatthatseemsnottobepublicly
available.)
Finally,youcanuseoneofthemyriadtextfontsavailableinType1format(with
appropriatePSNFSSmetricsforT1encoding,ormetricsforsomeother8-bitencoding
suchasLY1).However,ifyouusesomeoneelse’stextfont(evensomethingassimple
asAdobe’sTimesfamily)youhavetofindamatchingfamilyofmathematicalfonts,
whichisanon-trivialundertaking—“choiceofscalablefonts”.
aefonts:
fonts/ae
aecompl.sty
: Distributedwith
fonts/ae
aeguill.sty
:
macros/latex/contrib/aeguill
BaKoMafonts: Browse
systems/win32/bakoma/fonts
CM-LGCfonts:
fonts/ps-type1/cm-lgc
CM-superfonts:
fonts/ps-type1/cm-super
(beware: verylargedownload)
LatinModernfonts:
fonts/lm
tt2001fonts:
fonts/ps-type1/tt2001
zefonts:
fonts/zefonts
149 ReplacingType3fontsinPostScript
OneoftencomesacrossaPostScriptfilegeneratedbydvipswhichcontainsembedded
PKfonts;ifyoutrytogeneratePDFfromsuchafile,thequalitywillbepoor.
98
Ofcourse,thepropersolutionistoregeneratethePostScriptfile,butifneitherthe
sourcesnortheDVIfileareavailable,onemustneedsresorttosomesortofpatchingto
replacethebitmapfontsinthefilebyoutlinefonts.
Theprogrampkfix(byHeikoOberdiek)willdothispatching,forfilescreated
by“nottoooldversions”ofdvips:itfindsthefontstobereplacedbyexaminingthe
PostScriptcommentsdvipshasputinthefile.Foreachfont,pkfixputsappropriateTeX
commandsinafile,whichitthenprocessesandrunsthroughdvips(withswitch
-Ppdf
)
toacquireanappropriatecopyofthefont;thesecopiesarethenpatchedbackintothe
originalfile.
Ifyoursourcefileisolderthanpkfixcandealwith,there’sstillamodicumofhope:
pkfix-helperexaminesthebitmapfontsinadocument,comparesthemwiththemetric
(
.tfm
)fontsonyoursystemandcomestoaviewofwhichfontmightbewhich.The
programreportson“poor”matches,andthereareoptionsforconfirming,orreplacing,
itsguesses.Thetechnique(whichsoundsimplausible)issuccessfulenoughtobeworth
atry.
AfurtheroptionisFrankSiegert’s(shareware)PStill,whichiscapableofprocessing
thePostScriptitisdistilling,andoneoptionistoreplacebitmapfontsinthefilewith
Type1versions.
pkfix
:
support/pkfix
pkfix-helper
:
support/pkfix-helper
150 Hyperrefandrepeatedpagenumbers
Thebookclass(anditsfriendsandrelations)automaticallychangesthedisplayof
pagenumbersinthefrontmatterofthedocumenttolower-caseroman.Thisisfinefor
humanreaders,butifhyperrefhasbeenmisconfigured,theexistenceofpageshavethe
samepagenumbercancauseproblems.Fortunately,theconfigurationoptionstomake
hyperref“dotherightthing”are(bydefault)setuptoavoidproblems.
Thetwooptionsinquestionare:
plainpages=false
Makepageanchorsusingtheformattedformofthepagenumber.
Withthisoption,hyperrefwritesdifferentanchorsforpages‘ii’and‘2’.(Thisis
thedefaultvaluefortheoption,whichisagoodthing...)Iftheoptionisset‘
true
hyperrefwritespageanchorsasthearabicformofthepagenumber,ratherthanthe
formattedformthatgetsprinted;thisisnotusuallyappropriate.
pdfpagelabels
SetPDFpagelabels;i.e.,writethevalueof
\thepage
tothePDFfile
sothatAcrobatReadercandisplaythepagenumberas(say)‘ii(4of40)’rather
thansimply‘4of40’.
Thetwoshouldbeusedwheneverpagenumberingisnotjust‘1
..
n’;theymaybeused
independently,butusuallyarenot.
Therecipeisn’tperfect:itrelieson
\thepage
beingdifferentforeverypageinthe
document.Acommonproblemariseswhenthereisanunnumberedtitlepage,after
whichpagenumbersarereset:thePDFTeXwarningof“duplicatedestinations”will
happeninthiscase,regardlessoftheoptions.
hyperref.sty
:
macros/latex/contrib/hyperref
151 Copy-paste-able/searchablePDFfiles
PDFfilesgeneratedfromTeX(andfriends),willbydefaultholdtheirtextinthe
encodingoftheoriginalTeXfontusedbythedocument.
WhenPDFreaders,etc.,offercopy-pasteorsearchingfunctions,theoperationstake
placeontheglyphcodesusedforthefontsselectedbythedocument.Thisisfine,for
thesimplestdocuments(inEnglish,atleast);theproblemcomeswhenyou’reusing
aninflectedlanguage(withaccentedletters,orcompositeglyphssuchas‘æ’)—TeX
willtypicallyuseanon-standardencoding,andtherearelikelybeproblems,sincePDF
readersassumethetextispresentedinUnicode.
ForPDFgeneratedfromLaTeX(theDVIbeingconverted,bywhatevermeans),
orfromPDFLaTeX,thecharactercodesusedinthePDFfileareinfactthoseofthe
99
document’sfontencoding;ifyou’reusingOT1orT1,yourdocumentwillbeOKfor
almostallASCIIcharacters,butit’slikelythatanything“outoftheordinary”willnot
berepresentedproperly.(Ofcourse,PDFgeneratedfromXeTeX-orLuaTeX-based
formatsisgoingtobeOK,sincethoseenginesworkinUnicodethrougout.)
Thesolutioncomesfromthecharacter-mappingfacilitiesinthePDFspecification:
thefilemayspecifyatableoftranslationsofcharacterspresentinthecodingusedinthe
file,toaUnicodeversionofthecharacters.
Packagescmapandmmapbothoffermeansofgeneratingsuchtables(mmaphas
widercoverage,includingthevariousmathsencodings);bothworkwithPDFTeXand
nootherengine.Thusyourdocumentbecomessomethinglike:
\documentclass{article}
\usepackage{mmap} % % (or cmap)
\usepackage[T1]{fontenc}
... % % your other r packages
\begin{document}
... % % your actual l text
Unfortunately,thepackagesonlyworkwithfontsthataredirectlyencoded,suchas
thedefault(ComputerModern,i.e.,cmfonts,andthingssuchascm-superortheLatin
Modernsets.FontslikeAdobeTimesRoman(whichareencodedfor(La)TeXusevia
virtualfonts)arenotamenabletothistreatment.
cmap.sty
:
macros/latex/contrib/cmap
cm-super
fonts:
fonts/ps-type1/cm-super
LatinModernfonts:
fonts/lm
mmap.sty
:
macros/latex/contrib/mmap
M
Graphics
152 Importinggraphicsinto(La)TeXdocuments
Knuth,whendesigningthecurrentversionofTeXbackintheearly1980s,could
discernno“standard”wayofexpressinggraphicsindocuments. Hereasonedthat
thisstatecouldnotpersistforever,butthatitwouldbefoolishforhimtodefineTeX
primitivesthatallowedtheimportofgraphicalimagedefinitions.Hethereforedeferred
thespecificationoftheuseofgraphicstothewritersofDVIdrivers;TeXdocuments
wouldcontrolthedriversbymeansof
\special
commands(
\special
commands).
Thereisthereforeastraightforwardwayforanyonetoimportgraphicsintotheir
document:readthespecificationofthe
\special
commandsyourdriveruses,and‘just’
codethem.Thisisthehair-shirtapproach:itdefinitelyworks,butit’snotforeveryone.
Overtheyears,therefore,“graphicsinclusion”packageshavesprungup;mostwere
designedforinclusionofEncapsulatedPostScriptgraphics(EncapsulatedPostScript
graphics)—whichhasbecomethelinguafrancaofgraphicsinclusionoverthelast
decadeorso.
Notableexamplesaretheepsfpackage(distributedwithdvips)andthepsfigpackage.
(BothofthesepackagesweredesignedtoworkwellwithbothPlainTeXandLaTeX2.09;
theyarebothstillavailable.)AllsuchpackagesweretiedtoaparticularDVIdriver
(dvips,intheabovetwocases),buttheircodecouldbeconfiguredforothers.
Theobviousnextstepwastomakethecodeconfigurabledynamically.TheLaTeX
standardgraphicspackageanditsderivativesmadethisstep:itisstronglypreferredfor
allcurrentwork.
UsersofPlainTeXhavetwooptionsallowingthemtousegraphicx:theminiltx
“LaTeXemulator”andthegraphicx.texfront-endallowyoutoloadgraphicx,andEplain
allowsyoutoloadit(usingthefullLaTeXsyntax)direct.
Thegraphicspackagetakesavarietyof“driveroptions”—packageoptionsthat
selectcodetogeneratethecommandsappropriatetotheDVIdriverinuse.Inmost
cases,your(La)TeXdistributionwillprovidea
graphics.cfg
filethatwillselectthe
100
Documents you may be interested
Documents you may be interested