TheKileHandbook
Let’sconsideranotherexample,withthefollowingmacro\frac{%M}{%C}. First,weselecta
numberinourtext,let’ssay42. Nowweinvokethismacroandobtain\frac{42}{}withthe
cursorlocatedwithinthesecondpairofbrackets.
9.3.2 InsertFileContents
Ifyouwanttoinsertthecontentsofatextfile,youcouldusethesameplaceholders.
9.3.3 ExecuteAProgram
Ifyouwanttoexecuteanexternalprogram,onlythe%Mforselectedtextisrecognizedinthe
commandline.Theselectionwillbesavedinatemporaryfileandtheplaceholder%Misreplaced
withthisfilename.
Anotherplaceholderis%S,whichisreplacedbythecompletebasenameofthecurrentdocument
withoutthepath.Thisbasenameconsistsofallcharactersinthefileupto(butnotincluding)the
last’.’character.
9.4 Parameter
Mostmenuentriesmayhaveadditionalself-explainingparameters,whichmaybechecked. If
someoftheseparametersarenotavailableforsomekindofaction,theyaredisabled.
61
Pdf merge documents - Merge, append PDF files in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Provide C# Demo Codes for Merging and Appending PDF Document
add pdf files together reader; combine pdfs online
Pdf merge documents - 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
break pdf file into multiple files; reader combine pdf pages
TheKileHandbook
Hereisoneexampleforexecutinganexternalprogram:
Youcanseethataperlscriptiscalled,whichshouldworkwithcurrentselection. TheNeeds
selectedtextparameterischeckedtoassureaselection.Theoutputofthisscriptwillbeinserted
(Inserttheoutputofthechosenprogram)andreplacethecurrentselection(Replaceselected
text),butnotselecteditself.
9.5 MenuDefinitionFiles
Youcaninstalldifferent menusat runtime fordifferenttasks. . Whenyoucallthe e usermenu
wizard,thecurrentmenudefinitionfileisloaded.IfyoumodifyitandclosethedialogwithOK,
yourchangeswillbesavedandinstalledasthenewusermenu.ClosingthedialogwithCancel
willdiscardallchanges.
62
C# XDoc.HTML5 Viewer- Supported File Formats
FREE TRIAL: HOW TO: XDoc.HTML5 Viewer for C#▶: C# ASP.NET: View documents; C# ASP.NET PDF to HTML; C#: Convert PDF to Jpeg; C# File: Compress PDF; C# File: Merge
c# combine pdf; acrobat combine pdf files
C# Word - Merge Word Documents in C#.NET
C# Word - Merge Word Documents in C#.NET. Provide C# Demo Codes for Merging and Appending Word Document. Overview. RasterEdge C#.NET
combine pdf; acrobat combine pdf
TheKileHandbook
Youarealsofreetosavethemodifiedfileintheusermenudirectoryortoloadanothermenu
definitionfileandinstallit. Allusermenudefinitionfilesmustbesavedinthelocalusermenu
directoryofKile:KILE_APP_DIR/usermenu/ .
Lookattheexamplemenudefinitionfileexample.xmlto seemoremenuentrieswiththeir
parameters.
63
C# PowerPoint - Merge PowerPoint Documents in C#.NET
C# PowerPoint - Merge PowerPoint Documents in C#.NET. Provide C# Demo Codes for Merging and Appending PowerPoint Document. Overview.
best pdf combiner; scan multiple pages into one pdf
C# PDF Print Library: Print PDF documents in C#.net, ASP.NET
FREE TRIAL: HOW TO: XDoc.HTML5 Viewer for C#▶: C# ASP.NET: View documents; C# ASP.NET PDF to HTML; C#: Convert PDF to Jpeg; C# File: Compress PDF; C# File: Merge
pdf combine; combine pdf files
TheKileHandbook
Chapter10
TheBuildTools
10.1 Compiling,convertingandviewing
Toviewthe resultofyourwork, youfirstneedtocompilethesource. . Allthebuildtoolsare
groupedcloselytogetherintheBuild!Compile,Build!Convert,andBuild!Viewmenus.
TocompileyoursourcecodeforscreenviewerslikeOkularorfurtherconversion,youcanuse
theshortcutAlt-2.ThenyoucanviewtheDVIfileusingyourdefaultviewerwithAlt-3,convert
theDVItoaPSfilewithAlt-4,andviewthePSfilewithAlt-5.
10.1.1 BibT
E
X
IfyouareusingBibTEXforyourbibliographyentries,youusuallyhavetofollowaspecialcom-
pilingscheme. ThismeanscallingL
A
T
E
XandthenBibT
E
XandthenL
A
T
E
Xtwiceagain. For-
tunatelyKileiscleverenoughtodetectautomaticallyifitisnecessarytocalladditionaltools
likeBibT
E
X,makeidxandAsymptote. Thislogicisturnedonbydefaultandcanbechanged
inSettings!ConfigureKile...!Tools+BuildintheGeneraltabintheL
A
T
E
XandPDFL
A
T
E
X
tools.
10.1.2 MetaPostandAsymptote
IfyouwanttocompileyourdocumentwithMetaPostorAsymptote,picturedrawingprograms,
youcandoitwithBuild!Compile!Metapost,orBuild!Compile!Asymptote.
10.1.3 PDFL
A
T
E
X
Thereisalsoanotherwaytocompileyourdocument,ifyouwantaPDF:youcanrunPDFL
A
T
E
X,
thatwillcompilethesourcedirectlyintoaPDFfile,withAlt-6:youcanthenviewthecompiled
filebypressingAlt-7.
Alternatively,youcanconvertaPSintoaPDFwithAlt-8,oraDVIdirectlyintoaPDFwithAlt-9.
UsingPDFL
A
T
E
XinsteadofL
A
T
E
Xmaybejustamatterofsimplicityorhabit,butsometimes
thebehaviorofthetwoprogramscandiffer.
64
VB.NET PDF Print Library: Print PDF documents in vb.net, ASP.NET
FREE TRIAL: HOW TO: XDoc.HTML5 Viewer for C#▶: C# ASP.NET: View documents; C# ASP.NET PDF to HTML; C#: Convert PDF to Jpeg; C# File: Compress PDF; C# File: Merge
batch merge pdf; add multiple pdf files into one online
XDoc.HTML5 Viewer for .NET, Zero Footprint AJAX Document Image
controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.
merge pdf online; batch combine pdf
TheKileHandbook
10.1.4 L
A
T
E
XtoWeb
Finally,youmaywanttopublishyourworkonthewebandnotjustonpaper.Youmaythenuse
thelatex2htmlprogram,thatcanbecalledfromKile’smenuBuild!Convert!LaTeXtoWeb.
Theresultwillbeplacedinasubfolderoftheworkfolder,andyouwillbeabletoseetheresult
oftheconversionchoosingthemenuitemBuild!View!ViewHTML.
10.1.5 PassingCommandLineParameters
Ifyouwanttopasssomespecificcommandlineparameterstothecompile,convertorviewtools,
youcanconfiguretheircallinSettings!ConfigureKile...!Tools+Build.
10.2 QuickPreview
Youwillalwaysneedsometimetoviewtheresult, whenworkingwithL
A
T
E
X.L
A
T
E
Xhasto
compilethesourceandtheviewerhastobecalled. Thiscanbeannoyingifyouonlychanged
somelettersinanequationdifficulttotypeset.KileoffersaQuickPreviewmode,whereyoucan
compileonlyapartofadocumentandsavealotoftime.Itsupportsfourdifferentmodes,which
canbecombinedwithsevenconfigurations.
AllsettingsmustbedoneinSettings!ConfigureKile...!Tools+Preview.
65
C# PDF: C#.NET PDF Document Merging & Splitting Control SDK
file. C#.NET APIs to Combine Two or More PDF Documents. void String destn); C#.NET Sample Codes to Merge Multiple PDF Files. public void
acrobat reader merge pdf files; c# pdf merge
VB.NET PDF: Use VB.NET Code to Merge and Split PDF Documents
VB.NET PDF - How to Merge and Split PDF. How to Merge and Split PDF Documents by Using VB.NET Code. Visual C#. VB.NET. Home > .NET Imaging
c# merge pdf files into one; acrobat merge pdf files
TheKileHandbook
10.2.1 SelectionMode
Theuserhastoselectapartofthedocument. MenuentryBuild!QuickPreview!Selection
orthekeyboardshortcutCtrl+Alt+P,Swillstarttheselectedprograms.Kiletakesthepreamble
oftheoriginaltext,sothatallpackagesanduserdefinedcommandsareincluded. Theusercan
chooseoneofeightpredefinedconfigurations:
• LaTeX+DVI(embeddedviewer)
• LaTeX+DVI(Okular)
• LaTeX+PS(embeddedviewer)
• LaTeX+PS(Okular)
• PDFLaTeX+PDF(embeddedviewer)
• PDFLaTeX+PDF(Okular)
• XeLaTeX+PDF(embeddedviewer)
• XeLaTeX+PDF(Okular)
Thisshouldbesufficientforallsituationsforwhichaquickpreviewisneeded.
10.2.2 EnvironmentMode
Veryoftenyouwanttopreviewthecurrentenvironment,andespeciallymathematicalenviron-
ments,whichsometimesmaybedifficulttowrite. Kileoffersaveryfastwaytodothis. No
selectionisneeded,justchooseBuild!QuickPreview!Environmentorthekeyboardshort-
cutCtrl+Alt+P,Eandthecurrentenvironmentwillbecompiledandshown.
66
TheKileHandbook
10.2.3 SubdocumentMode
Ifyouhavealargeprojectwithalotofdocuments,compilingthewholeprojectisnotagreat
idea,ifyouhavemadechangesonlyinonesingledocument. Kileisabletocompileandshow
apreviewofthecurrent subdocument. . It t takesthepreamblefromthe masterdocument and
onlycompilesthecurrentpartwhenyouchooseBuild!QuickPreview!Subdocumentorthe
keyboardshortcutCtrl+Alt+P,D.
10.2.4 MathgroupMode
Themathgrouppreviewmodeallowsyoutopreviewthemathgroupyouarecurrentlyediting.
Kiletakesthepreamblefromthemasterdocumentandonlycompilesthemathgroupthecursor
iscurrentlyinwhenyouchooseBuild!QuickPreview!Mathgrouporthekeyboardshortcut
Ctrl+Alt+P,M.
10.2.5 QuickPreviewinBottomBar
InsteadofshowingthepreviewinanewdocumentKilecanalsobeconfiguredtousethebottom
barforpreviewcompilations. Youcanactivatethisfeatureinthequickpreviewconfiguration
panel.
10.3 GraphicFileFormats
10.3.1 L
A
T
E
XandPDFL
A
T
E
X
PDFLAT
E
X,whenusedwithgraphicsorgraphicxpackages,cancorrectlycompilePNGand
JPGfilesintoDVIorPDF,butisnotabletohandleEPSfiles.Conversely,theprocessofcompiling
withL
A
T
E
XtoDVIandconvertingtoPSandeventuallyPDFdoessupportEPS,butdoesnot
supportPNGandJPG.
AlotofuserswanttocreatePDFdocuments,butalsowanttousetheexcellentPstrickspackage
tocreatePostScript® graphics,ortheywanttousethePostScript® outputofmathematicaland
scientificsoftwarelikeMathematica,MapleorMuPAD.TheseL
A
T
E
Xusershavetocompilefirst
inPostScript
®
, eveniftheywanttocreate PDFdocuments, because theseprogramsproduce
PostScript
®
codewhichcannotbemanagedbyPDFL
A
T
E
X.However,itisnotsohardasitmay
sound,becauseKilewillhelp.
10.3.2 GraphicsConversion
Toovercomethisfrustratingloop,whenyouwanttoincludebothPostScript
®
codeandPNGor
JPGfiles,youhaveanumberofworkarounds:
• Ifyouneed d afile inPS format, , but t have JPG or PNG graphics, , you u canalso simplyuse
PDFL
A
T
E
Xwith DVIoutput t first, and then n rundvipsto o create e the e PSfile. . You u see that
PDFL
A
T
E
Xisaverygoodchoice,ifyoursourcecontainsnoPostScript
®
codeatall.
• YoucanconvertEPSfilestoPNGorotherformatswithutilitiesastheGimporImageMagick
andusePDFL
A
T
E
X.
• ApreferredwayistoconvertEPSgraphicstoPDFgraphicswithepstopdf,whichcomeswith
everyT
E
XdistributionandthenusePDFL
A
T
E
X.Itproduceshighqualitygraphics,andyou
canevencontroltheresultwithsomeofthefollowingoptions:
67
TheKileHandbook
-dAutoFilterColorImages=false
-dAutoFilterGrayImages=false
-sColorImageFilter=FlateEncode
-sGrayImageFilter=FlateEncode
-dPDFSETTINGS=/prepress
-dUseFlateCompression=true
Evenbetter:ifyoursystemallowsshell-escape,conversioncanbedoneonthefly.Allyou
havetodoistoincludetheepstopdfpackage,whichispartofallT
E
Xdistributions,withthe
command\usepackage{epstopdf}.Assumingthatyourcodeis:
\includegraphics[width=5cm]{test.eps}
WhenyoucallPDFLAT
E
Xwithoption--shell-escape,graphicstest.epsisautomatically
convertedintotest.pdf.
ThisconversionwilltakeplaceeachtimeyourunPDFL
A
T
E
X.Ifyourgraphicscommandis
givenimplicitly:
\includegraphics[width=5cm]{test}
epstopdfcheckswhethertest.pdfisalreadyavailable, so that the conversionstepcanbe
skipped.
• Youcanconverttheotherwayaround,anduseL
A
T
E
XandPS-PDFconversion. Thisisnot
alwaysagoodidea,sinceEPSencapsulationofJPGorPNGcanyieldlargerfiles,thatinturn
yieldunnecessarilylargedocuments.Thisishoweverhighlydependentonthegraphicutility
thatyouuse,sinceEPScanencapsulateothergraphics,butnotallapplicationssupportthis
perfectly.SomemightactuallytrytobuildyourJPGimagewithvectorsandvariousscripting,
whichwillresultingiganticfiles. ConversionofallgraphicsformatstoEPScanbedoneby
ImageMagick.Anothersimpleprogramthatdoesthisprocesscorrectlyisjpg2ps.
• Youcanalsouseanautomaticconversion. . AllgraphicsfilesareconvertedontheflytoEPS,
andinsertedintothePSdocument. Thisisacomfortableway,butyouhavetosetupyour
systemproperly.ThisisdiscussedinthesectionEPSGraphics.
10.3.3 UsetherightFilefortherightGraphic
• EPSissortofagraphicvectorscriptinglanguage,describingallthelinesanddotsthegraphic
ismadeof; it looksgoodevenwhenmagnifiedbeyonditsdefault size, andsuitsbestdia-
gramsandvectorialgraphicsnativelyproducedinEPS,whichlookveryclearandsharpwhile
maintainingaverysmallbytesize.
• PNG(orthedeprecatedGIF)isanon-lossyfileformat,withgoodcompressionandquality. . It
isverygoodfordiagrams,scansofdrawings,oranythingwhosesharpnessyoudowantto
retain.Itissometimesoverkillwhenusedforphotos.
• JPGisalossyformat,thatcompressesfilesbetterthanPNGatthepriceofsomelossinthe
picturedetail. Thisisusuallyirrelevantforphotos,butmaycausebadqualityfordiagrams,
drawings,andmaymakesomethinlinesdisappearoutright;inthosecasesuseEPSorPNG.
Butalwaysremember:garbagein,garbageout!Noconversionwillmakeabadpicturegood.
10.4 EPSGraphics
EPSgraphicsfilesare the traditionalwayto insert graphicsfilesinto L
A
T
E
Xdocuments. As
mailinglistsarefullwithquestionsconcerningEPSgraphics,wewilldiscusssomeimportant
aspectsanddemonstratehowKilesupportsthem.
68
TheKileHandbook
10.4.1 L
A
T
E
XandEPSGraphics
IfyoudecidedtousethetraditionalL
A
T
E
XtoproducePSorPDFoutput,youwillprobablyrun
intosomeproblemswithgraphics.YouhavetouseEPSgraphics(EncapsulatedPostScript
®
);no
JPEGorPNGfiles.Thisshouldbenoproblem,astherearealotofconverterslikeconvertfrom
theexcellentImageMagickpackage.But,itneedssometimeofcourse.
TheEPSfilesareusedbybothL
A
T
E
XandtheDVI-PSconverter:
• L
A
T
E
XscanstheEPSfileforthebounding-boxline,whichtellsL
A
T
E
Xhowmuchspaceto
reserveforthegraphics.
• TheDVI-PSconverterthenreadstheEPSfileandinsertsthegraphicsinthePSfile.
Thishassomeimplications:
• L
A
T
E
XneverreadstheEPSfileifthebounding-boxparametersarespecifiedinthegraphics
insertioncommand.
• SinceL
A
T
E
Xcannotreadnon-ASCIIfiles,itcannotreadthebounding-boxinformationfrom
compressedornon-EPSgraphicsfiles.
• TheEPSgraphicsarenotincludedintheDVIfile. SincetheEPSfilesmustbepresentwhen
theDVIfileisconvertedtoPS,theEPSfilesmustaccompanytheDVIfileswhenevertheyare
moved.
NowyoucancallL
A
T
E
X,andaDVI-PSconverterlikedvipstocreateyourPostScript
®
document.
IfyourgoalisaPDFdocument,youshouldrundvipswithoption-Ppdfandthencallps2pdf.
Youwillfindalotofdocumentsdescribingthissolution.
10.4.2 ThePostScript
®
WayofKile
Kilehelpsyoutogetthebounding-boxinformation. IfyouhaveinstalledImageMagickpack-
age,KilewillextractthisinformationfromtheEPSfileandinsertitasanoption. Thisisdone
automaticallywhenyouselectthegraphicsfile.Therearetwoadvantagestoproceedinglikethis:
• Theinformationisalreadyscannedinthedialog,andneednottobedonebyL
A
T
E
Xlateron.
• Evenmoreimportantisthatthewidthandheightofthepicturecanbecalculated,whenthe
resolutionisknown.Thisinformationwillbeshownnearthetopofthedialog,andmayserve
asacluewhenyouwanttoscalethegraphics.
• KilecanalsosupportzippedorgzippedEPSfiles,whicharemuchsmallerthanuncompressed
EPSfiles. But,thisfeaturecanonlybeusedwithaspecialsystemsetupandachangeofyour
localgraphicsconfiguration,asitisdescribedintheBitmapGraphicssection.
10.4.3 ThePostScript
®
WayandBitmapGraphics
Ifyoursystemallowsshell-escape,Kilealsosupportsaneasywaytoincludebitmapgraph-
ics,ifyousetupyourT
E
Xsystemproperly.ThereisnoneedtoconvertJPEGorPNGgraphics,
thiscanbedoneautomaticallywhentheDVIfileisconvertedtoPS.
LAT
E
Xneedssomeinformationaboutthefilesuffixes. Thepackagegraphicxlooksforafile
graphics.cfg,whichmustbesomewhereinyoursearchpathforL
A
T
E
Xdocuments.Searchfor
entrieslike:
69
TheKileHandbook
\DeclareGraphicsRule{.pz}{eps}{.bb}{}%
\DeclareGraphicsRule{.eps.Z}{eps}{.eps.bb}{}%
\DeclareGraphicsRule{.ps.Z}{eps}{.ps.bb}{}%
\DeclareGraphicsRule{.ps.gz}{eps}{.ps.bb}{}%
\DeclareGraphicsRule{.eps.gz}{eps}{.eps.bb}{}%
andreplacetheselineswith:
\DeclareGraphicsRule{.pz}{eps}{.bb}{}%
\DeclareGraphicsRule{.eps.Z}{eps}{.eps.bb}{}%
\DeclareGraphicsRule{.ps.Z}{eps}{.ps.bb}{}%
\DeclareGraphicsRule{.ps.gz}{eps}{.ps.bb}{}%
% changed or new graphic rules
\DeclareGraphicsRule{.eps.zip}{eps}{.eps.bb}{‘unzip -p #1}%
zipped EPS
\DeclareGraphicsRule{.eps.gz}{eps}{.eps.bb}{‘gunzip -c #1}%
gzipped
-
EPS
\DeclareGraphicsRule{.jpg}{eps}{}{‘convert #1 eps:-}%
JPEG
\DeclareGraphicsRule{.gif}{eps}{.bb}{‘convert #1 eps:-}%
GIF
\DeclareGraphicsRule{.png}{eps}{.bb}{‘convert #1 eps:-}%
PNG
\DeclareGraphicsRule{.tif}{eps}{.bb}{‘convert #1 eps:-}%
TIFF
\DeclareGraphicsRule{.pdf}{eps}{.bb}{‘convert #1 eps:-}%
PDF-  -
graphics
Youwillfindthisfile,forexampleinDebian,at/etc/texmf/latex/graphics.cfg.Thebestway
toproceedistocopythisfiletoyourlocaltexpathandthenchange thiscopy. . See e yourT
E
X
distributionmanualtolearnhowtogetalistofyourT
E
Xfolders.
WiththisconfigurationfileyouareabletoinsertbitmapgraphicsandzippedorgzippedEPS
filesinL
A
T
E
X.Thecommandforconversionisgivenbydvips.Whenyoulookattheconversion
commandyouwillseethatnoextrafileiscreated.Theresultoftheconversionprocessisdirectly
pipedintothePSfile.TheonlythingL
A
T
E
Xmustknowisthesizeofthegraphics,andtherefore
weneedtheboundingbox,whichisprovidedbyKile.
Somesaythatthiswayisinsecure;youhavetodecideonhowtowork.Inanycase,youneedno
boundingbox,asKilewillextractthisinformationfromalltypesofgraphics.
10.4.4 PDFL
A
T
E
XandEPSGraphics
Asalreadystated,PDFL
A
T
E
XisnotabletohandleEPSgraphicfiles,butconverterslikeepstopdf
willhelp.Thebestwayistoincludepackageepstopdf,whichmustfollowthegraphicxpack-
age.
\usepackage[pdftex]{graphicx}
\usepackage{epstopdf}
NowyoucanalreadyincludeEPSgraphics,ifyourunpdflatexwithoption--shell-escape,but
wecanmakeitevenbetterandalsohandlezippedorgzippedEPSfiles.Againwehavetochange
thegraphicsconfigurationfilegraphics.cfgasabove.Thistimewesearchfor:
% pdfTeX is running in n pdf f mode
\ExecuteOptions{pdftex}%
andsimplyaddsomelines:
% pdfTeX is running in n pdf f mode
\ExecuteOptions{pdftex}%
\AtEndOfPackage{%
70
Documents you may be interested
Documents you may be interested