embed pdf in mvc view : Convert pdf to html online for SDK software API .net windows wpf sharepoint lshort3-part1262

Chapter2
Typesetting Text
Afterreadingthepreviouschapter,youshouldknowaboutthebasicstuffof
whichaL
AT
E
X2
ε
documentismade.InthischapterIwillfillintheremaining
structureyouwillneedtoknowinordertoproducerealworldmaterial.
2.1 TheStructureofTextandLanguage
ByHanspeterSchmid <hanspi@schmid-werren.ch>
Themainpointofwritingatext(somemodernDAAC
1
literatureexcluded),
istoconveyideas,information,orknowledgetothereader. Thereaderwill
understandthetextbetteriftheseideasarewell-structured,andwillseeand
feelthisstructuremuchbetterifthetypographicalformreflectsthelogical
andsemanticalstructureofthecontent.
L
A
T
E
Xisdifferentfromothertypesettingsystemsinthatyoujusthave
totellitthelogicalandsemanticalstructureofatext. Itthenderivesthe
typographicalformofthetextaccordingtothe“rules”giveninthedocument
classfileandinvariousstylefiles.
The most t important text unit in L
A
T
E
X (and d in typography) is the
paragraph.Wecallit“textunit”becauseaparagraphisthetypographical
formthatshouldreflectonecoherentthought,oroneidea.Youwilllearnin
thefollowingsectionshowtoforcelinebreakswithe.g.\\,andparagraph
breakswithe.g.leavinganemptylineinthesourcecode. Therefore,ifanew
thoughtbegins,anewparagraphshouldbegin,andifnot,onlylinebreaks
shouldbeused.Ifindoubtaboutparagraphbreaks,thinkaboutyourtext
asaconveyorofideasandthoughts. Ifyouhaveaparagraphbreak,but
theoldthoughtcontinues,itshouldberemoved. Ifsometotallynewlineof
thoughtoccursinthesameparagraph,thenitshouldbebroken.
Mostpeoplecompletelyunderestimate the importance of well-placed
paragraphbreaks. Manypeople e donoteven knowwhatthe meaningof
1
DifferentAtAllCost,atranslationoftheSwissGermanUVA(Um’sVerreckenAnders).
Convert pdf to html online for - SDK software 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
Convert pdf to html online for - SDK software 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
18
TypesettingText
aparagraphbreakis,or,especiallyinL
A
T
E
X,introduceparagraphbreaks
withoutknowingit. Thelattermistakeisespeciallyeasytomakeifequations
areusedinthetext. Lookatthefollowingexamples,andfigureoutwhy
sometimesemptylines(paragraph breaks)are usedbeforeandafterthe
equation,andsometimesnot. (Ifyoudon’tyetunderstandallcommands
wellenoughtounderstandtheseexamples,pleasereadthisandthefollowing
chapter,andthenreadthissectionagain.)
% Example 1
\ldots when Einstein introduced his formula
\begin{equation}
e = m \cdot c^2 \; ; ,
\end{equation}
which is s at the e same time e the e most widely y known
and the least well understood physical formula.
% Example 2
\ldots from which follows Kirchhoff’s s current t law:
\begin{equation}
\sum_{k=1}^{n} I_k k = = 0 \; .
\end{equation}
Kirchhoff’s voltage law w can n be derived \ldots
% Example 3
\ldots which has several advantages.
\begin{equation}
I_D = I_F - I_R
\end{equation}
is the core of a very different t transistor model. . \ldots
Thenextsmallertextunitisasentence. InEnglishtexts,there e isa
largerspaceafteraperiodthatendsasentencethanafteronethatendsan
abbreviation. L
A
T
E
Xtriestofigureoutwhichoneyouwantedtohave. If
LAT
E
Xgetsitwrong,youmusttellitwhatyouwant.Thisisexplainedlater
inthischapter.
Thestructuringoftextevenextendstopartsofsentences. Mostlanguages
haveverycomplicatedpunctuationrules,butinmanylanguages(including
GermanandEnglish),youwillgetalmosteverycommarightifyouremember
whatitrepresents:ashortstopintheflowoflanguage. Ifyouarenotsure
aboutwhere to puta comma, read the sentence aloudandtake ashort
SDK software API:Online Convert PDF to HTML5 files. Best free online PDF html
Online PDF to HTML5 Converter. Download Free Trial. Convert a PDF file to HTML. Just upload your file by clicking on the blue button
www.rasteredge.com
SDK software API:VB.NET PDF - Convert PDF Online with VB.NET HTML5 PDF Viewer
RasterEdge. PRODUCTS: ONLINE DEMOS: Online HTML5 Document Viewer; Online XDoc.PDF Demo▶: Convert PDF to Word; Convert PDF to Tiff; Convert PDF to HTML; Convert
www.rasteredge.com
2.2LineBreakingandPageBreaking
19
breathateverycomma. If f thisfeelsawkwardatsome place,deletethat
comma;ifyoufeeltheurgetobreathe(ormakeashortstop)atsomeother
place,insertacomma.
Finally,theparagraphsofatextshouldalsobestructuredlogicallyata
higherlevel,byputtingthemintochapters,sections,subsections,andsoon.
However,thetypographicaleffectofwritinge.g.\section{TheStructure
of Text and Language} isso obviousthat t itisalmostself-evidenthow
thesehigh-levelstructuresshouldbeused.
2.2 LineBreakingandPageBreaking
2.2.1 JustifiedParagraphs
Books are e often typesetwith each line having the e same length. L
A
T
E
X
insertsthenecessarylinebreaksandspacesbetweenwordsbyoptimizing
thecontentsofawholeparagraph. Ifnecessary,italsohyphenateswords
thatwouldnotfitcomfortablyonaline. Howtheparagraphsaretypeset
dependsonthedocumentclass. Normallythefirstlineofaparagraphis
indented,andthereisnoadditionalspacebetweentwoparagraphs. Referto
section6.3.2formoreinformation.
InspecialcasesitmightbenecessarytoorderLAT
E
Xtobreakaline:
\\or\newline
startsanewlinewithoutstartinganewparagraph.
\\*
additionallyprohibitsapagebreakaftertheforcedlinebreak.
\newpage
startsanewpage.
\linebreak[n],\nolinebreak[n],\pagebreak[n],\nopagebreak[n]
suggestplaceswhereabreakmay(ormaynot)happen. Theyenablethe
authortoinfluencetheiractionswiththeoptionalargumentn,whichcan
besettoanumberbetweenzeroandfour. Bysettingntoavaluebelow
4,youleaveL
A
T
E
Xtheoptionofignoringyourcommandiftheresultwould
lookverybad. Do o notconfuse these “break”commandswith the“new”
commands. Evenwhenyougivea“break”command,L
A
T
E
Xstilltriestoeven
outtherightborderofthelineandthetotallengthofthepage,asdescribed
inthenextsection;thiscanleadtounpleasantgapsinyourtext. Ifyou
SDK software API:C# HTML5 PDF Viewer SDK to convert and export PDF document to
RasterEdge. PRODUCTS: ONLINE DEMOS: Online HTML5 Document Viewer; Online XDoc.PDF Demo▶: Convert PDF to Word; Convert PDF to Tiff; Convert PDF to HTML; Convert
www.rasteredge.com
SDK software API:VB.NET PDF Convert to Jpeg SDK: Convert PDF to JPEG images in vb.
RasterEdge. PRODUCTS: ONLINE DEMOS: Online HTML5 Document Viewer; Online XDoc.PDF Demo▶: Convert PDF to Word; Convert PDF to Tiff; Convert PDF to HTML; Convert
www.rasteredge.com
20
TypesettingText
reallywanttostarta“newline”ora“newpage”,thenusethecorresponding
command. Guesstheirnames!
LAT
E
Xalwaystriestoproducethebestlinebreakspossible.Ifitcannot
findawaytobreakthelinesinamannerthatmeetsitshighstandards,it
letsonelinestickoutontherightoftheparagraph. L
A
T
E
Xthencomplains
(“overfullhbox”)whileprocessingtheinputfile. Thishappensmostoften
whenL
A
T
E
Xcannotfindasuitableplace to hyphenateaword.Instruct
L
A
T
E
Xtoloweritsstandardsalittlebygivingthe \sloppycommand. . It
preventssuchover-longlinesbyincreasingtheinter-wordspacing—evenif
thefinaloutputisnotoptimal. Inthiscaseawarning(“underfullhbox”)is
giventotheuser. Inmostsuchcasestheresultdoesn’tlookverygood. The
command\fussybringsLAT
E
Xbacktoitsdefaultbehaviour.
2.2.2 Hyphenation
LAT
E
Xhyphenateswordswhenevernecessary.Ifthehyphenationalgorithm
doesnotfindthecorrecthyphenationpoints,remedythesituationbyusing
thefollowingcommandstotellT
E
Xabouttheexception.
Thecommand
\hyphenation{wordlist}
causesthewordslistedintheargumenttobehyphenatedonlyatthepoints
markedby“-”.Theargumentofthecommandshouldonlycontainwords
builtfromnormalletters,orrathersignsthatareconsideredtobenormal
lettersbyL
A
T
E
X. Thehyphenationhintsarestoredforthelanguagethat
isactivewhenthehyphenationcommandoccurs. Thismeansthatifyou
placeahyphenationcommandintothepreambleofyourdocumentitwill
influence the English language hyphenation. . If f you place the command
afterthe\begin{document}andyouareusingsomepackagefornational
languagesupportlikebabel,thenthehyphenationhintswillbeactiveinthe
languageactivatedthroughbabel.
Theexamplebelowwillallow“hyphenation”tobehyphenatedaswellas
“Hyphenation”,anditprevents“FORTRAN”,“Fortran”and“fortran”from
beinghyphenatedatall. Nospecialcharactersorsymbolsareallowedinthe
argument.
Example:
\hyphenation{FORTRAN Hy-phen-a-tion}
2
AlthoughLAT
E
Xgivesyouawarningwhenthathappens(Overfull \hbox)anddisplays
theoffendingline,suchlinesarenotalwayseasytofind. Ifyouusetheoptiondraftin
the\documentclasscommand,theselineswillbemarkedwithathickblacklineonthe
rightmargin.
SDK software API:VB.NET PDF Convert to Tiff SDK: Convert PDF to tiff images in vb.
Resize converted Tiff image using VB.NET. Convert PDF file to Tiff and jpeg in ASPX webpage online. Online source code for VB.NET class.
www.rasteredge.com
SDK software API:C# HTML5 PDF Viewer SDK to view PDF document online in C#.NET
RasterEdge. PRODUCTS: ONLINE DEMOS: Online HTML5 Document Viewer; Online XDoc.PDF Demo▶: Convert PDF to Word; Convert PDF to Tiff; Convert PDF to HTML; Convert
www.rasteredge.com
2.3Ready-MadeStrings
21
The command \- inserts s a a discretionary y hyphen n into a a word. This
also becomesthe e only pointhyphenation n isallowed in thisword. This
commandisespeciallyusefulforwordscontainingspecialcharacters(e.g.
accentedcharacters),becauseLAT
E
Xdoesnotautomaticallyhyphenatewords
containingspecialcharacters.
I think this is: su\-per\-cal\-%
i\-frag\-i\-lis\-tic\-ex\-pi\-%
al\-i\-do\-cious
Ithinkthisis: supercalifragilisticexpiali-
docious
Severalwordscanbekepttogetherononelinewiththecommand
\mbox{text}
Itcausesitsargumenttobekepttogetherunderallcircumstances.
My phone number will change e soon.
It will be \mbox{0116 291 2319}.
The parameter
\mbox{\emph{filename}} should
contain the name of the file.
Myphonenumberwillchangesoon.Itwill
be01162912319.
Theparameterfilenameshouldcontainthe
nameofthefile.
\fbox issimilarto \mbox,butin additionthere willbe avisiblebox
drawnaroundthecontent.
2.3 Ready-MadeStrings
Insomeofthe examplesonthepreviouspages,youhaveseensomevery
simpleLAT
E
Xcommandsfortypesettingspecialtextstrings:
Command Example
Description
\today
July18,2015 Currentdate
\TeX
T
E
X
Yourfavoritetypesetter
\LaTeX
LAT
E
X
TheNameoftheGame
\LaTeXe
LAT
E
X2
ε
Thecurrentincarnation
2.4 SpecialCharactersandSymbols
2.4.1 QuotationMarks
Youshouldnot usethe"forquotationmarksasyouwouldonatypewriter.
Inpublishingtherearespecialopeningandclosingquotationmarks. InL
A
T
E
X,
usetwo(graveaccent)foropeningquotationmarksandtwo(vertical
quote)forclosingquotationmarks. Forsinglequotesyouusejustoneof
each.
SDK software API:VB.NET PDF- View PDF Online with VB.NET HTML5 PDF Viewer
RasterEdge. PRODUCTS: ONLINE DEMOS: Online HTML5 Document Viewer; Online XDoc.PDF Demo▶: Convert PDF to Word; Convert PDF to Tiff; Convert PDF to HTML; Convert
www.rasteredge.com
SDK software API:C# PDF Convert to Jpeg SDK: Convert PDF to JPEG images in C#.net
NET library to batch convert PDF files to jpg image files. Turn multiple pages PDF into single jpg files respectively online.
www.rasteredge.com
22
TypesettingText
‘‘Please press the ‘x’ key.’’
“Pleasepressthe‘x’key.”
YesIknowtherenderingisnotideal,it’sreallyaback-tickorgrave
accent()foropeningquotesandverticalquote()forclosing,despitewhat
thefontchosenmightsuggest.
2.4.2 DashesandHyphens
LAT
E
Xknowsfourkindsofdashes. Accessthreeofthemwithdifferentnumber
ofconsecutivedashes. Thefourthsignisactuallynotadashatall—itisthe
mathematicalminussign:
daughter-in-law, X-rated\\
pages 13--67\\
yes---or no? \\
$0$, $1$ and $-1$
daughter-in-law,X-rated
pages13–67
yes—orno?
0,1and−1
Thenamesforthesedashesare: ‘-’hyphen,‘–’en-dash,‘—’em-dash
and‘−’minussign.
2.4.3 Tilde(∼)
Acharacteroftenseeninwebaddressesisthe tilde. . Togenerate e thisin
L
A
T
E
Xuse\~{} buttheresult(˜)isnotreallywhatyouwant. Trythis
instead:
http://www.rich.edu/\~{}bush \\
http://www.clever.edu/$\sim$demo
http://www.rich.edu/˜bush
http://www.clever.edu/∼demo
2.4.4 Slash(/)
In orderto typesetaslash betweentwowords, one cansimplytypee.g.
read/write,butthismakesL
A
T
E
Xtreatthetwowordsasone. Hyphenation
isdisabledforthesetwowords,sotheremaybe‘overfull’errors. Toover-
comethis,use\slash. Forexampletype‘read\slash write’whichallows
hyphenation. Butnormal‘/’charactermaybestillusedforratiosorunits,
e.g.5 MB/s.
2.4.5 DegreeSymbol(◦)
PrintingthedegreesymbolinpureLAT
E
X.
2.4SpecialCharactersandSymbols
23
It’s $-30\,^{\circ}\mathrm{C}$.
I will soon start to
super-conduct.
It’s 30C. . I I will soon startto super-
conduct.
Thetextcomppackagemakesthedegreesymbolalsoavailableas\textdegree
orincombinationwiththeCbyusingthe\textcelsius.
30 \textcelsius{} is
86 \textdegree{}F.
30℃is86°F.
2.4.6 The e EuroCurrencySymbol(e)
Whenwritingaboutmoneythesedays,youneedtheEurosymbol. Many
currentfontscontainaEurosymbol.Afterloadingthetextcomppackagein
thepreambleofyourdocument
\usepackage{textcomp}
usethecommand
\texteuro
toaccessit.
IfyourfontdoesnotprovideitsownEurosymbolorifyoudonotlike
thefont’sEurosymbol,youhavetwomorechoices:
Firsttheeurosympackage. ItprovidestheofficialEurosymbol:
\usepackage[official]{eurosym}
IfyoupreferaEurosymbolthatmatchesyourfont,usetheoptiongen
inplaceoftheofficialoption.
Table2.1: AbagfullofEurosymbols
LM+textcomp \texteuro
€ € €
eurosym
\euro
e e e
[gen]eurosym
\euro
AC AC AC
24
TypesettingText
2.4.7 Ellipsis(...)
Onatypewriter,acommaoraperiodtakesthesameamountofspaceas
anyotherletter. Inbookprinting,thesecharactersoccupyonlyalittlespace
andaresetveryclosetotheprecedingletter.Therefore,entering‘ellipsis’
byjusttypingthreedotswouldproducethewrongresult.Instead,thereis
aspecialcommandforthesedots.Itiscalled
\ldots(lowdots)
Not like this ... but like e this:\\
New York, Tokyo, Budapest, , \ldots
Notlikethis...butlikethis:
NewYork,Tokyo,Budapest,...
2.4.8 Ligatures
Somelettercombinationsaretypesetnotjustbysettingthedifferentletters
oneaftertheother,butbyactuallyusingspecialsymbols.
fffiflffi...
insteadof
fffiflffi...
Theseso-calledligaturescanbeprohibitedbyinsertingan\mbox{}between
thetwolettersinquestion.Thismightbenecessarywithwordsbuiltfrom
twowords.
\Large Not shelfful\\
but shelf\mbox{}ful
Notshelfful
butshelfful
2.4.9 AccentsandSpecialCharacters
LAT
E
Xsupportstheuseofaccentsandspecialcharactersfrommanylanguages.
Table2.2showsallsortsofaccentsbeingappliedtothelettero.Naturally
otherlettersworktoo.
Toplace anaccentontopofanioraj,itsdotshavetobe removed.
Thisisaccomplishedbytyping\iand\j.
H\^otel, na\"\i ve, \’el\‘eve,\\
sm\o rrebr\o d, !‘Se\~norita!,\\
Sch\"onbrunner Schlo\ss{}
Stra\ss e
Hôtel,naïve,élève,
smørrebrød,¡Señorita!,
SchönbrunnerSchloßStraße
2.5InternationalLanguageSupport
25
2.5 InternationalLanguageSupport
WhenyouwritedocumentsinlanguagesotherthanEnglish,therearethree
areaswhereLAT
E
Xhastobeconfiguredappropriately:
1. Allautomaticallygeneratedtextstrings
havetobeadaptedtothe
newlanguage. Formanylanguages,thesechangescanbeaccomplished
byusingthebabelpackagebyJohannesBraams.
2. LAT
E
X needs to o knowthe hyphenation n rules forthe e new language.
GettinghyphenationrulesintoL
A
T
E
Xisabitmoretricky. Itmeans
rebuildingtheformatfilewithdifferenthyphenationpatternsenabled.
YourLocalGuide[5]shouldgivemoreinformationonthis.
3. Languagespecifictypographicrules. InFrenchforexample,thereisa
mandatoryspacebeforeeachcoloncharacter(:).
If yoursystem isalreadyconfiguredappropriately, activatethe babel
packagebyaddingthecommand
\usepackage[language]{babel}
afterthe\documentclasscommand. Alistofthelanguagesbuiltintoyour
LAT
E
Xsystemwillbedisplayedeverytimethecompilerisstarted. Babelwill
automaticallyactivatetheappropriatehyphenationrulesforthelanguage
youchoose. If f your r L
A
T
E
Xformatdoesnotsupporthyphenation in the
languageofyourchoice,babelwillstillworkbutwilldisablehyphenation,
whichhasquiteanegativeeffectontheappearanceofthetypesetdocument.
3
TableofContents,ListofFigures,...
Table2.2:AccentsandSpecialCharacters.
ò
\‘o
ó
\’o
ô
\^o
õ
\~o
¯o
\=o
˙o
\.o
ö
\"o
ç
\c c
˘o
\u o
ˇo
\v o
ő
\H o
¸o
\c o
o
.
\d o
o
¯
\b o
oo \t t oo
œ
\oe
Œ
\OE
æ
\ae
Æ
\AE
å
\aa
Å
\AA
ø
\o
Ø
\O
ł \l
Ł
\L
ı \i
\j
¡ !‘
¿
?‘
26
TypesettingText
Babelalsospecifiesnewcommandsforsomelanguages,whichsimplify
theinputofspecialcharacters. TheGermanlanguage,forexample,contains
alotofumlauts(äöü).Withbabelloaded,enteranöbytyping"oinstead
of\"o.
Ifyoucallbabelwithmultiplelanguages
\usepackage[languageA,languageB]{babel}
thenthelastlanguageintheoptionlistwillbeactive(i.e. languageB).Use
thecommand
\selectlanguage{languageA}
tochangetheactivelanguage.
Mostmoderncomputersystemsallowyoutoinputlettersofnational
alphabetsdirectlyfromthekeyboard. Inordertohandleavarietyofinput
encodingsusedfordifferentgroupsoflanguagesand/orondifferentcomputer
platformsL
A
T
E
Xemploystheinputencpackage:
\usepackage[encoding]{inputenc}
Whenusingthispackage,youshouldconsiderthatotherpeoplemight
notbeabletodisplayyourinputfilesontheircomputer,becausetheyusea
differentencoding. Forexample,theGermanumlautäonOS/2isencoded
as132, onUnixsystemsusing ISO-LATIN1itisencodedas228,while
inCyrillicencodingcp1251 forWindowsthisletterdoesnotexistatall;
thereforeyoushouldusethisfeaturewithcare. Thefollowingencodingsmay
comeinhandy,dependingonthetypeofsystemyouareworkingon
4
Operating
encodings
system
westernLatin
Cyrillic
Mac
applemac
macukr
Unix
latin1
koi8-ru
Windows
ansinew
cp1251
DOS,OS/2
cp850
cp866nav
\usepackage[utf8]{inputenc}
willenableyoutocreateLAT
E
Xinputfilesinutf8,amulti-byteencodingin
whicheachcharactercanbeencodedinaslittleasonebyteandasmanyas
fourbytes.
4TolearnmoreaboutsupportedinputencodingsforLatin-basedandCyrillic-based
languages, read the e documentation n for inputenc.dtx and cyinpenc.dtx respectively.
Section4.6tellshowtoproducepackagedocumentation.
Documents you may be interested
Documents you may be interested