mvc return pdf : Convert pdf to text doc software SDK project winforms wpf windows UWP asciidoc8-part1446

AsciiDocUserGuide
73/88
32.5 Tables
Tablebehaviorandsyntaxisdeterminedby[tabledef-
*
]and[tabletags-
*
]configurationfilesections.Theusercan
changeexistingtablebehaviorandaddnewtabletypesbyeditingconfigurationfiles. Thefollowing[tabledef-
*
]section
entriesgeneratetableoutputmarkupelements:
colspec
Thetablecolspectagdefinition.
headrow,footrow,bodyrow
Tableheader,footerandbodyrowtagdefinitions.headrowandfootrowtabledefinitionentriesdefaulttobodyrowifthey
areundefined.
headdata,footdata,bodydata
Tableheader,footerandbodydatatagdefinitions. headdataandfootdatatabledefinitionentriesdefaulttobodydataif
theyareundefined.
paragraph
Iftheparagraphtagisspecifiedthenblanklinesinthecelldataaretreatedasparagraphdelimitersandmarkedupusing
thistag.
Tablebehaviorisalsoinfluencedbythefollowing[miscellaneous]configurationfileentries:
pagewidth
Thisintegervalueistheprintablewidthoftheoutputmedia.Seetableattributes.
pageunits
Theunitsofwidthinoutputmarkupwidthattributevalues.
T
ABLEDEFINITIONBEHAVIOR
• TheoutputmarkupgenerationisspecificallydesignedtoworkwiththeHTMLandCALS(DocBook)tablemodels,butshould
beadaptabletomostXMLtableschema.
• Tabledefinitionscanbe“mixedin”frommultiplecascadingconfigurationfiles.
• Newtabledefinitionsinheritthedefaulttableandtabletagsdefinitions([tabledef-default]and[tabletags-default])
soyouonlyneedtooverridethoseconffileentriesthatrequiremodification.
33 Filters
AsciiDocfiltersallowexternalcommandstoprocessAsciiDocParagraphs,DelimitedBlocksandTablecontent. Filters s are
primarilyanextensionmechanismforgeneratingspecializedoutputs. Filtersareimplementedusingexternalcommandswhich
arespecifiedinconfigurationfiledefinitions.
There’snothingspecialaboutthefilters,they’rejuststandardUNIXfilters:theyreadtextfromthestandardinput,processit,and
writetothestandardoutput.
Theasciidoc(1)command--filteroptioncanbeusedtoinstallandremovefilters.Thesameoptionisusedtouncon-
ditionallyloadafilter.
Attributesubstitutionisperformedonthefiltercommandpriortoexecution—attributescanbeusedtopassparametersfromthe
AsciiDocsourcedocumenttothefilter.
Warning
Filterssometimesincludedexecutablecode.Beforeinstallingafilteryoushouldverifythatitisfromatrustedsource.
Convert pdf to text doc - Convert PDF to txt files in C#.net, ASP.NET MVC, WinForms, WPF application
C# PDF to Text (TXT) Converting Library to Convert PDF to Text
convert pdf to txt online; converting .pdf to text
Convert pdf to text doc - VB.NET PDF Convert to Text SDK: Convert PDF to txt files in vb.net, ASP.NET MVC, WinForms, WPF application
VB.NET Guide and Sample Codes to Convert PDF to Text in .NET Project
convert pdf file to txt; pdf to text
AsciiDocUserGuide
74/88
33.1 FilterSearchPaths
Ifthefiltercommanddoesnotspecifyadirectorypaththenasciidoc(1)recursivelysearchesfortheexecutablefiltercom-
mand:
• Firstitlooksintheuser’s$HOME/.asciidoc/filtersdirectory.
• Nexttheglobalfiltersdirectory(usually/etc/asciidoc/filtersor/usr/local/etc/asciidoc)directoryis
searched.
• Thenitlooksintheasciidoc(1)./filtersdirectory.
• Finallyitreliesontheexecutingshelltosearchtheenvironmentsearchpath($PATH).
Standardpracticeistoinstalleachfilterinit’sownsub-directorywiththesamenameasthefilter’sstyledefinition.Forexample
themusicfilter’sstylenameismusicsoit’sconfigurationandfilterfilesarestoredinthefilters/musicdirectory.
33.2 FilterConfigurationFiles
FiltersarenormallyaccompaniedbyaconfigurationfilecontainingaParagraphorDelimitedBlockdefinitionalongwithcorre-
spondingmarkuptemplates.
WhileitispossibletocreatenewParagraphorDelimitedBlockdefinitionsthepreferredwaytoimplementafilteristoadda
styletotheexistingParagraphandListingBlockdefinitions(allfiltersshippedwithAsciiDocusethistechnique). Thefilteris
appliedtotheparagraphordelimitedblockbyprecedingitwithanattributelist:thefirstpositionalattributeisthestylename,
remainingattributesarenormallyfilterspecificparameters.
asciidoc(1)auto-loadsall.conffilesfoundinthefiltersearchpathsunlessthecontainerdirectoryalsocontainsafile
named__noautoload__(seeprevious section). . The__noautoload__featureisusedforfiltersthatwillbeloaded
manuallyusingthe--filteroption.
33.3 ExampleFilter
AsciiDoccomeswithatoyfilterforhighlightingsourcecodekeywordsandcomments.Seealsothe./filters/code/code-filter-readme.txt
file.
Note
Thepurposeofthistoyfilteristodemonstratehowtowriteafilter—it’smuchtosimplistictobepassedoffasacodesyntax
highlighter.Ifyouwantafullfeaturedmulti-languagehighlighterusethesourcecodehighlighterfilter.
33.4 Built-infilters
TheAsciiDocdistributionincludessource,music,latexandgraphvizfilters,detailsareontheAsciiDocwebsite.
Table11:Built-infilterslist
Filtername
Description
music
Amusicfilterisincludedinthedistribution./filters/directory.Ittranslatesmusicin
LilyPondorABCnotationtostandardclassicalnotation.
source
Asourcecodehighlightfilterisincludedinthedistribution./filters/directory.
latex
TheAsciiDocLaTeXfiltertranslatesLaTeXsourcetoaPNGimagethatisautomaticallyinserted
intotheAsciiDocoutputdocuments.
graphviz
GouichiIisakahaswrittenaGraphvizfilterforAsciiDoc.Graphvizgeneratesdiagramsfroma
textualspecification.GouichiIisaka’sGraphvizfilterisincludedintheAsciiDocdistribution.Here
aresomeAsciiDocGraphvizexamples.
C# PDF Text Extract Library: extract text content from PDF file in
Please have a quick test by using the following C# example code for text extraction from PDF page. // Open a document. PDFDocument doc = new PDFDocument
pdf image to text; convert pdf to text file
VB.NET Create PDF from Word Library to convert docx, doc to PDF in
Export all Word text and image content into high quality PDF without losing formatting. Create PDF files from both DOC and DOCX formats. Convert multiple pages
pdf to text converter; convert pdf to text for
AsciiDocUserGuide
75/88
33.5 Filterplugins
FilterpluginsareamechanismfordistributingAsciiDocfilters. AfilterpluginisaZipfilecontainingthefilesthatconstitutea
filter.Theasciidoc(1)--filteroptionisusedtoloadandmanagefilerplugins.
• Filterpluginstakeprecedenceoverbuilt-infilterswiththesamename.
• Bydefaultfilterpluginsareinstalledin$HOME/.asciidoc/filters/<filter>where<filter>isthefiltername.
34 Plugins
TheAsciiDocpluginarchitectureisanextensionmechanismthatallowsadditionalbackends,filtersandthemestobeaddedto
AsciiDoc.
• ApluginisaZipfilecontaininganAsciiDocbackend,filterortheme(configurationfiles,stylesheets,scripts,images).
• Theasciidoc(1)--backend,--filterand--themecommand-lineoptionsareusedtoloadandmanageplugins.
Eachoftheseoptionsrespondstothepluginmanagementinstall,list,removeandbuildcommands.
• Thepluginmanagementcommandnamesarereservedandcannotbeusedforfilter,backendorthemenames.
• ThepluginZipfilenamealwaysbeginswiththebackend,filterorthemename.
Plugincommandsandconventionsaredocumentedintheasciidoc(1)manpage. Youcanfindlists s ofpluginsonthe
AsciiDocwebsite.
35 HelpCommands
Theasciidoc(1)commandhasa--helpoptionwhichprintshelptopicstostdout.Thedefaulttopicsummarizesasciidoc(1)
usage:
$ asciidoc --help
Toprintahelptopicspecifythetopicnameasacommandargument.Helptopicnamescanbeshortenedsolongastheyarenot
ambiguous.Examples:
$ asciidoc --help manpage
$ asciidoc -h m
# Short t version n of previous example.
$ asciidoc --help syntax
$ asciidoc -h s
# Short t version n of previous example.
35.1 CustomizingHelp
Tochange,deleteoraddyourownhelptopicseditahelpconfigurationfile.Thehelpfilenamehelp-<lang>.confisbased
onthesettingofthelangattribute,itdefaultstohelp.conf(English). Thehelpfilelocationwilldependonwhetheryou
wantthetopicstoapplytoallusersorjustthecurrentuser.
Thehelptopicfileshavethesamenamedsectionformatasotherconfigurationfiles. Thehelp.conffilesarestoredinthe
samelocationsandloadedinthesameorderasotherconfigurationfiles.
Whenthe--helpcommand-lineoptionisspecifiedAsciiDocloadstheappropriatehelpfilesandthenprintsthecontentsofthe
sectionwhosenamematchesthehelptopicname.Ifatopicnameisnotspecifieddefaultisused.Youdon’tneedtospecify
thewholehelptopicnameonthecommand-line,justenoughletterstoensureit’snotambiguous.Ifamatchinghelpfilesection
isnotfoundalistofavailabletopicsisprinted.
C# PDF Convert to Jpeg SDK: Convert PDF to JPEG images in C#.net
String inputFilePath = Program.RootPath + "\\" 1.pdf"; PDFDocument doc = new PDFDocument(inputFilePath); //Convert all pdf pages to jpeg images.
convert pdf to text doc; .net extract text from pdf
VB.NET PDF Convert to Word SDK: Convert PDF to Word library in vb.
Convert PDF document to DOC and DOCX formats in Visual Basic .NET project. Professional .NET library supports batch conversion in VB.NET.
c# convert pdf to text; convert image pdf to text
AsciiDocUserGuide
76/88
36 TipsandTricks
36.1 KnowYourEditor
WritingAsciiDocdocumentswillbeawholelotmorepleasantifyouknowyourfavoritetexteditor. Learnhowtoindentand
reformattextblocks,paragraphs,listsandsentences.Tipsforvimusersfollow.
36.2 VimCommandsforFormattingAsciiDoc
36.2.1 TextWrapParagraphs
Usethevim:gqcommandtoreformatparagraphs.Settingthetextwidthsetstherighttextwrapmargin;forexample:
:set textwidth=70
Toreformataparagraph:
1. Positionthecursoratthestartoftheparagraph.
2. Typegq}.
Execute:help gqcommandtoreadaboutthevimgqcommand.
Tip
• Assignthe
gq}
commandtotheQkeywiththe
nnoremap Q gq}
commandorputitinyour
~/.vimrc
filetosoit’s
alwaysavailable(seetheExample~/.vimrcfile).
• Put
set
commandsinyour
~/.vimrc
filesoyoudon’thavetoenterthemmanually.
• TheVimwebsite(http://www.vim.org)hasawealthofresources,includingscriptsforautomatedspellcheckingandASCII
Artdrawing.
36.2.2 FormatLists
The gqcommandcanalsobeusedtoformatbulleted, numberedandcalloutlists. . Firstyouneedtosetthecomments,
formatoptionsandformatlistpat(seetheExample~/.vimrcfile).
Nowyoucanformatsimpleliststhatusedash,asterisk,periodandplusbulletsalongwithnumberedorderedlists:
1. Positionthecursoratthestartofthelist.
2. Typegq}.
36.2.3 IndentParagraphs
Indentwholeparagraphsbyindentingthefistlinewiththedesiredindentandthenexecutingthegq}command.
C# PDF Convert to Word SDK: Convert PDF to Word library in C#.net
Quick to remove watermark and save PDF text, image, table, hyperlink and bookmark to Convert PDF to multiple MS Word formats such as .doc and .docx.
change pdf to text for editing; converting image pdf to text
C# PDF insert text Library: insert text into PDF content in C#.net
Program.RootPath + "\\" 1.pdf"; PDFDocument doc inputFilePath); // get a text manager from textMgr = PDFTextHandler.ExportPDFTextManager(doc); // Set char
convert pdf to word text online; converting pdf to searchable text format
AsciiDocUserGuide
77/88
36.2.4 Example
~/.vimrc
File
" Use e bold d bright t fonts.
set background=dark
" Show w tabs and d trailing characters.
"set listchars=tab:»·,trail:·,eol:\ensuremath{\lnot}
set listchars=tab:»·,trail:·
set list
" Reformat paragraphs and list.
nnoremap <Leader>r gq}
" Delete trailing g white space and d Dos-returns s and d to o expand d tabs s to o spaces.
nnoremap <Leader>t :set t et<CR>:retab!<CR>:%s/[\r r \t]\+$//<CR>
autocmd BufRead,BufNewFile
*
.txt,
*
.asciidoc,README,TODO,CHANGELOG,NOTES,ABOUT
\ setlocal autoindent t expandtab tabstop=8 8 softtabstop=2 2 shiftwidth=2 2 filetype=  -
asciidoc
\ textwidth=70 0 wrap p formatoptions=tcqn
\ formatlistpat=^\\s
*
\\d\\+\\.\\s\\+\\\\|^\\s
*
<\\d\\+>\\s\\+\\\\|^\\s
*
[a-zA-Z  -
.]\\.\\s\\+\\\\|^\\s
*
[ivxIVX]\\+\\.\\s\\+
\ comments=s1:/
*
,ex:
*
/,://,b:#,:%,:XCOMM,fb:-,fb:
*
,fb:+,fb:.,fb:>
36.3 Troubleshooting
AsciiDocdiagnosticfeaturesaredetailedintheDiagnosticsappendix.
36.4 Gotchas
Incorrectcharacterencoding
Ifyougetanerrormessagelike’UTF-8’ codec c can’t t decode ...thenyousourcefilecontainsinvalidUTF-8
characters—settheAsciiDocencodingattributeforthecorrectcharacterset(typicallyISO-8859-1(Latin-1)forEuropean
languages).
Invalidoutput
AsciiDocattemptstovalidatetheinputAsciiDocsourcebutmakesnoattempttovalidatetheoutputmarkup,itleavesthat
toexternaltoolssuchasxmllint(1)(integratedintoa2x(1)).BackendvalidationcannotbehardcodedintoAsciiDoc
becausebackendsaredynamicallyconfigured. ThefollowingexamplegeneratesvalidHTMLbutinvalidDocBook(the
DocBookliteralelementcannotcontainanemphasiselement):
+monospaced text t with an _emphasized_ word+
Misinterpretedtextformatting
Youcansuppressmarkupexpansionbyplacingabackslashcharacterimmediatelyinfrontoftheelement.Thefollowing
examplesuppressesinlinemonospacedformatting:
\+1 for C++.
Overlappingtextformatting
OverlappingtextformattingwillgenerateillegaloverlappingmarkuptagswhichwillresultindownstreamXMLparsing
errors.Here’sanexample:
Some
*
strong markup _that overlaps
*
emphasized markup_.
C# Create PDF from Word Library to convert docx, doc to PDF in C#.
NET control able to turn all Word text and image multiple pages Word to fillable and editable PDF documents in Convert both DOC and DOCX formats to PDF files.
convert pdf to txt format; convert pdf to rich text
VB.NET PDF replace text library: replace text in PDF content in vb
VB.NET demo code below will guide you how to replace text in specified PDF page. 'Open a document Dim doc As PDFDocument = New PDFDocument(inputFilePath) 'Set
convert pdf to word for editing text; c# read text from pdf
AsciiDocUserGuide
78/88
Ambiguousunderlines
ADelimitedBlockcanimmediatelyfollowaparagraphwithoutaninterveningblankline, butbecareful, asingleline
paragraphunderlinemaybemisinterpretedasasectiontitleunderlineresultingina“closingblockdelimiterexpected”
error.
Ambiguousorderedlistitems
Linesbeginningwithnumbersattheendofsentenceswillbeinterpretedasorderedlistitems. Thefollowingexample
(incorrectly)beginsanewlistwithitemnumber1999:
He was last t sighted d in
1999. Since e then n things have moved on.
Thelistitemoutofsequencewarningmakesitunlikelythatthisproblemwillgounnoticed.
Specialcharactersinattributevalues
Specialcharactersubstitutionprecedes attributesubstitutionsoifattributevaluescontainspecialcharactersyoumay,
dependingonthesubstitutioncontext,needtoescapethespecialcharactersyourself.Forexample:
$ asciidoc c -a a ’orgname=Bill &amp; Ben Inc.’ ’ mydoc.txt
Attributelists
Ifanynamedattributeentriesarepresentthenallstringattributevaluesmustbequoted.Forexample:
["Desktop screenshot",width=32]
36.5 Combiningseparatedocuments
Youhaveanumberofstand-aloneAsciiDocdocumentsthatyouwanttoprocessasasingledocument.Simplyprocessingthem
withaseriesofincludemacroswon’tworkbecausethedocumentscontain(level0)documenttitles.Thesolutionistocreate
atoplevelwrapperdocumentandusetheleveloffsetattributetopushthemalldownonelevel.Forexample:
Combined Document t Title
=======================
// Push titles down one e level.
:leveloffset: 1
include::document1.txt[]
// Return to o normal l title levels.
:leveloffset: 0
A Top p Level Section
-------------------
Lorum ipsum.
// Push titles down one e level.
:leveloffset: 1
include::document2.txt[]
include::document3.txt[]
Thedocumenttitlesintheincludeddocumentswillnowbeprocessedaslevel1sectiontitles,level1sectionsaslevel2sections
andsoon.
• Putablanklinebetweentheincludemacrolinestoensurethetitleoftheincludeddocumentisnotseenaspartofthelast
paragraphofthepreviousdocument.
• Youwon’twantnon-titledocumentheaderlines(forexample,AuthorandRevisionlines)intheincludedfiles—conditionally
excludethemiftheyarenecessaryforstand-aloneprocessing.
C# PDF delete text Library: delete, remove text from PDF file in
String inputFilePath = Program.RootPath + "\\" 1.pdf"; PDFDocument doc = new PDFDocument(inputFilePath); // Get a text manager from the document object.
convert pdf images to text; convert pdf to rich text format
C# PDF replace text Library: replace text in PDF content in C#.net
The following demo code will show how to replace text in specified PDF page. // Open a document. PDFDocument doc = new PDFDocument(inputFilePath); // Set the
convert scanned pdf to text word; convert pdf to openoffice text document
AsciiDocUserGuide
79/88
36.6 Processingdocumentsectionsseparately
YouhavedividedyourAsciiDocdocumentintoseparatefiles(onepertoplevelsection)whicharecombinedandprocessedwith
thefollowingtopleveldocument:
Combined Document t Title
=======================
Joe Bloggs
v1.0, 12-Aug-03
include::section1.txt[]
include::section2.txt[]
include::section3.txt[]
Youalsowanttoprocessthesectionfilesasseparatedocuments.Thisiseasybecauseasciidoc(1)willquitehappilyprocess
section1.txt,section2.txtandsection3.txtseparately—theresultingoutputdocumentscontainthesectionbut
havenodocumenttitle.
36.7 Processingdocumentsnippets
Usethe-s(--no-header-footer)command-lineoptiontosuppressheaderandfooteroutput,thisisusefuliftheprocessed
outputistobeincludedinanotherfile.Forexample:
$ asciidoc -sb docbook section1.txt
asciidoc(1)canbeusedasafilter,soyoucanpipechunksoftextthroughit.Forexample:
$ echo ’Hello
*
World!
*
’ | asciidoc -s s -
<div class="paragraph"><p>Hello o <strong>World!</strong></p></div>
36.8 BadgesinHTMLpagefooters
Seethe[footer]sectionintheAsciiDocdistributionxhtml11.confconfigurationfile.
36.9 PrettyprintingAsciiDocoutput
Iftheindentationandlayoutoftheasciidoc(1)outputisnottoyourlikingyoucan:
1. Changetheindentationandlayoutofconfigurationfilemarkuptemplatesections. The{empty}attributeisusefulfor
outputtingtrailingblanklinesinmarkuptemplates.
2. UseDaveRaggett’sHTMLTidyprogramtotidyasciidoc(1)output.Example:
$ asciidoc c -b b docbook -o - mydoc.txt | tidy y -indent t -xml >mydoc.xml
3. Usethexmllint(1)formatoption.Example:
$ xmllint --format mydoc.xml
36.10 SupportingminorDocBookDTDvariations
TheconditionalinclusionofDocBookSGMLmarkupattheendofthedistributiondocbook45.conffileillustrateshowto
supportminorDTDvariations.Theincludedsectionsoverridecorrespondingentriesfromprecedingsections.
AsciiDocUserGuide
80/88
36.11 Creatingstand-aloneHTMLdocuments
Ifyou’veevertriedtosendsomeoneanHTML documentthatincludesstylesheetsandimagesyou’llknowthatit’snotas
straight-forwardasexchangingasinglefile.AsciiDochasoptionstocreatestand-alonedocumentscontainingembeddedimages,
stylesheetsandscripts. ThefollowingAsciiDoccommandcreatesasinglefilecontainingembeddedimages,CSSstylesheets,
andJavaScript(fortableofcontentsandfootnotes):
$ asciidoc -a data-uri -a icons -a toc -a max-width=55em article.txt
YoucanviewtheHTMLfilehere:http://asciidoc.org/article-standalone.html
36.12 Shippingstand-aloneAsciiDocsource
Reproducingpresentationdocumentsfromsomeoneelse’ssourcehasonemajorproblem:unlessyourconfigurationfilesarethe
sameasthecreator’syouwon’tgetthesameoutput.
Thesolutionistocreateasinglebackendspecificconfigurationfileusingtheasciidoc(1)-c(--dump-conf)command-
lineoption.YouthenshipthisfilealongwiththeAsciiDocsourcedocumentplustheasciidoc.pyscript.Theonlyenduser
requirementisthattheyhavePythoninstalled(andthattheyconsideryouatrustedsource). Thisexamplecreatesacomposite
HTMLconfigurationfileformydoc.txt:
$ asciidoc -cb xhtml11 mydoc.txt > mydoc-xhtml11.conf
Shipmydoc.txt,mydoc-html.conf,andasciidoc.py. Withthesethreefiles(andaPythoninterpreter)therecipient
canregeneratetheHMTLoutput:
$ ./asciidoc.py -eb xhtml11 mydoc.txt
The-e(--no-conf)optionexcludestheuseofimplicitconfigurationfiles,ensuringthatonlyentriesfromthemydoc-html.conf
configurationareused.
36.13 Insertingblankspace
Adjustyourstylesheetstoaddthecorrectseparationbetweenblockelements. Insertingblankparagraphscontainingasingle
non-breakingspacecharacter{nbsp}worksbutisanadhocsolutioncomparedtousingstylesheets.
36.14 Closingopensections
YoucancloseoffsectiontagsuptolevelNbycallingtheeval::[Section.setlevel(N)]systemmacro.Thisisuseful
ifyouwanttoincludeasectioncomposedofrawmarkup. ThefollowingexampleincludesaDocBookglossarydivisionatthe
topsectionlevel(level0):
ifdef::basebackend-docbook[]
eval::[Section.setlevel(0)]
+++++++++++++++++++++++++++++++
<glossary>
<title>Glossary</title>
<glossdiv>
...
</glossdiv>
</glossary>
+++++++++++++++++++++++++++++++
endif::basebackend-docbook[]
AsciiDocUserGuide
81/88
36.15 Validatingoutputfiles
Usexmllint(1)tochecktheAsciiDocgeneratedmarkupisbothwellformedandvalid.Herearesomeexamples:
$ xmllint --nonet --noout --valid docbook-file.xml
$ xmllint --nonet --noout --valid xhtml11-file.html
$ xmllint --nonet --noout --valid --html html4-file.html
The--validoptionchecksthefileisvalidagainstthedocumenttype’sDTD,iftheDTDisnotinstalledinyoursystem’s
catalogthenitwillbefetchedfromitsInternetlocation. Ifyouomitthe--validoptionthedocumentwillonlybechecked
thatitiswellformed.
TheonlineW3CMarkupValidationServiceisthedefactostandardwhenitcomestovalidatingHTML(itvalidatesallHTML
standardsincludingHTML5).
37 Glossary
Blockelement
AnAsciiDocblockelementisadocumententitycomposedofoneormorewholelinesoftext.
Inlineelement
AsciiDocinlineelementsoccurwithinblockelementtextualcontent,theyperformformattingandsubstitutiontasks.
Formalelement
AnAsciiDocblockelementthathasaBlockTitle.Formalelementsarenormallylistedinfrontorbackmatter,forexample
listsoftables,examplesandfigures.
Verbatimelement
Thewordverbatimindicatesthatwhitespaceandlinebreaksinthesourcedocumentaretobepreservedintheoutput
document.
A MigrationNotes
A.1 Version7toversion8
• Anewsetofquoteshasbeenintroducedwhichmaymatchinlinetextinexistingdocuments—iftheydoyou’llneedtoescape
thematchedtextwithbackslashes.
• Theindexentryinlinemacrosyntaxhaschanged—ifyourdocumentsincludeindexesyoumayneedtoeditthem.
• Replaceda2x(1)--no-iconsand--no-copyoptionswiththeirnegatedequivalents:--iconsand--copyrespec-
tively.Thedefaultbehaviorhasalsochanged—theuseoficonsandcopyingoficonandCSSfilesmustbespecifiedexplicitly
withthe--iconsand--copyoptions.
TherationaleforthechangescanbefoundintheAsciiDocCHANGELOG.
Note
Ifyouwanttodisableunconstrainedquotes,thenewalternativeconstrainedquotessyntaxandthenewindexentrysyntaxthen
youcandefinetheattribute
asciidoc7compatible
(forexamplebyusingthe
-a asciidoc7compatible
command-
lineoption).
AsciiDocUserGuide
82/88
B PackagerNotes
ReadtheREADMEandINSTALLfiles(inthedistributionrootdirectory)forinstallprerequisitesandprocedures.Thedistribution
Makefile.in(usedbyconfiguretogeneratetheMakefile)isthecanonicalinstallationprocedure.
C AsciiDocSafeMode
AsciiDocsafemodeskipspotentiallydangerousscriptedsectionsinAsciiDocsourcefilesbyinhibitingtheexecutionofarbitrary
codeortheinclusionofarbitraryfiles.
Thesafemodeisdisabledbydefault,itcanbeenabledwiththeasciidoc(1)--safecommand-lineoption.
S
AFEMODE CONSTRAINTS
• eval,sysandsys2executableattributesandblockmacrosarenotexecuted.
• include::<filename>[] andinclude1::<filename>[] blockmacrofilesmustresideinsidethe parentfile’s
directory.
• {include:<filename>}executableattributefilesmustresideinsidethesourcedocumentdirectory.
• PassthroughBlocksaredropped.
Warning
ThesafemodeisnotdesignedtoprotectagainstunsafeAsciiDocconfigurationfiles.Beespeciallycarefulwhen:
1. Implementingfilters.
2. Implementingelementsthatdon’tescapespecialcharacters.
3. Acceptingconfigurationfilesfromuntrustedsources.
D UsingAsciiDocwithnon-EnglishLanguages
AsciiDoccanprocessUTF-8charactersetsbuttherearesomethingsyouneedtobeawareof:
• IfyouaregeneratingoutputdocumentsusingaDocBooktoolchainthenyoushouldsettheAsciiDoclangattributetothe
appropriatelanguage(itdefaultstoen(English)).Thiswillensurethingsliketableofcontents,figureandtablecaptionsand
admonitioncaptionsareoutputinthespecifiedlanguage.Forexample:
$ a2x -a lang=es doc/article.txt
• IfyouareoutputtingHTMLdirectlyfromasciidoc(1)you’llneedtosetthevarious
*
_captionattributestomatchyour
targetlanguage(seethelistofcaptionsandtitlesinthe[attributes]sectionofthedistributionlang-
*
.conffiles).
Theeasiestwayistocreatealanguage.conffile(seetheAsciiDoc’slang-en.conffile).
Note
YoustillusetheNOTE,CAUTION,TIP,WARNING,IMPORTANT captionsintheAsciiDocsource,theygettranslatedinthe
HTMLoutputfile.
• asciidoc(1)automaticallyloadsconfigurationfilesnamedlikelang-<lang>.confwhere<lang>isatwoletter
languagecodethatmatchesthecurrentAsciiDoclangattribute.SeealsoConfigurationFileNamesandLocations.
Documents you may be interested
Documents you may be interested