{-# LANGUAGE OverloadedStrings #-}-- | LaTeX standard commands and environments.moduleText.LaTeX.Base.Commands(-- * Basic functionsraw,between,comment,(%:)-- * Preamble commands,title,author,date,institute,thanks,documentclass,usepackage,linespread-- ** Classes-- *** Document classes,article,proc,report,minimal,book,slides-- *** Class options,ClassOption(..),customopt,draft,titlepage,notitlepage,onecolumn,twocolumn,oneside,twoside,landscape,openright,openany,fleqn,leqno-- ** Paper sizes,PaperType(..),a0paper,a1paper,a2paper,a3paper,a4paper,a5paper,a6paper,b0paper,b1paper,b2paper,b3paper,b4paper,b5paper,b6paper,letterpaper,executivepaper,legalpaper-- ** Page styles,pagestyle,thispagestyle,plain,headings,empty,myheadings,markboth,markright-- * Body commands,document,maketitle-- ** Document structure,tableofcontents,abstract,appendix-- *** Sections,part,chapter,section,subsection,subsubsection,paragraph,subparagraph-- ** Logos & symbols,today,thePage,tex,latex,laTeX2,laTeXe,ldots,vdots,ddots-- *** HaTeX specific,hatex,hatex3,version,hatex_version-- ** Document layout,par,newline,lnbk,lnbk_,newpage,cleardoublepage,clearpage,linebreak,nolinebreak,pagebreak,nopagebreak,hspace,hspace_,vspace,hfill,vfill,stretch,smallskip,bigskip,indent,noindent-- *** Document measures,textwidth,linewidth-- ** Formatting text,verbatim,verb-- *** Fonts---- Different font styles.,textbf,textit,texttt,textrm,textsf,textmd,textup,textsl,textsc,textnormal,underline,emph-- *** Sizes---- | Sizes are sorted from smallest to biggest.,tiny,scriptsize,footnotesize,small,normalsize,large,large2,large3,huge,huge2-- ** Environments-- | Math environments, such as @equation@, defined in "Text.LaTeX.Packages.AMSMath".,enumerate,itemize,item,flushleft,flushright,center,quote,verse,cite,description,minipage,figure-- ** Page numbering,pagenumbering,arabic,roman,roman_,alph,alph_-- ** Boxes,mbox,fbox,parbox,framebox,makebox,raisebox,rule-- ** Cross references,caption,label,ref,pageref-- ** Tables,tabular,(&),hline,cline,multicolumn-- ** Others,footnote,protect,hyphenation,hyp,qts-- * External files,input,include)whereimportData.StringimportData.Maybe(isNothing,catMaybes)importData.Text(toLower)importqualifiedData.TextasTimportText.LaTeX.Base.SyntaximportText.LaTeX.Base.ClassimportText.LaTeX.Base.RenderimportText.LaTeX.Base.TypesimportData.VersionimportData.List(find,intercalate)--importPaths_HaTeX-- | Insert a raw piece of 'Text'.-- This functions doesn't care about @LaTeX@ reserved characters,-- it insert the text just as it is received.raw::LaTeXCl=>Text->lraw=fromLaTeX.TeXRaw-- | Calling 'between' @c l1 l2@ puts @c@ between @l1@ and @l2@ and-- appends them.---- > between c l1 l2 = l1 <> c <> l2between::Monoidm=>m->m->m->mbetweencl1l2=l1<>c<>l2-- | Create a comment.comment::LaTeXCl=>Text->lcomment=fromLaTeX.TeXComment-- | This operator appends a comment after a expression.-- For example:---- > textbf "I'm just an example." %: "Insert a few words here."---- Since you are writing in Haskell, you may not need to output comments-- as you can add them in the Haskell source. I added this feature-- for completeness. It may be useful for debugging the output as well.(%:)::LaTeXCl=>l->Text->l(%:)l=(l<>).comment-- | Generate the title. It normally contains the 'title' name-- of your document, the 'author'(s) and 'date'.maketitle::LaTeXCl=>lmaketitle=comm0"maketitle"-- | Set the title of your document.title::LaTeXCl=>l->ltitle=liftL$\t->TeXComm"title"[FixArgt]-- | Set a date for your document.date::LaTeXCl=>l->ldate=liftL$\t->TeXComm"date"[FixArgt]-- | Set the author(s) of the document.author::LaTeXCl=>l->lauthor=liftL$\t->TeXComm"author"[FixArgt]-- | Set either an institute or an organization-- for the document. It does /not/ work for-- a document of the 'article' class.institute::LaTeXCl=>Maybel->l->linstituteNothing=liftL$\l->TeXComm"institute"[FixArgl]institute(Justs)=liftL2(\l1l2->TeXComm"institute"[OptArgl1,FixArgl2])sthanks::LaTeXCl=>l->lthanks=liftL$\l->TeXComm"thanks"[FixArgl]-- | Import a package. First argument is a list of options for-- the package named in the second argument.usepackage::LaTeXCl=>[l]->PackageName->lusepackagelspn=liftListL(\ls_->TeXComm"usepackage"[MOptArgls_,FixArg$fromStringpn])ls-- | The @LaTeX@ logo.latex::LaTeXCl=>llatex=comm0"LaTeX"-- | Start a new paragraphpar::LaTeXCl=>lpar=comm0"par"-- | Start a new line.newline::LaTeXCl=>lnewline=comm0"newline"part::LaTeXCl=>l->lpart=liftL$\p->TeXComm"part"[FixArgp]chapter::LaTeXCl=>l->lchapter=liftL$\c->TeXComm"chapter"[FixArgc]-- | Start a new section with a given title.section::LaTeXCl=>l->lsection=liftL$\s->TeXComm"section"[FixArgs]-- | Start a new subsection.subsection::LaTeXCl=>l->lsubsection=liftL$\sub->TeXComm"subsection"[FixArgsub]-- | Start a new sub/sub/section.subsubsection::LaTeXCl=>l->lsubsubsection=liftL$\sub->TeXComm"subsubsection"[FixArgsub]-- | Start a paragraph.paragraph::LaTeXCl=>l->lparagraph=liftL$\p->TeXComm"paragraph"[FixArgp]-- | Start a subparagraph (minimal level of sectioning).subparagraph::LaTeXCl=>l->lsubparagraph=liftL$\p->TeXComm"subparagraph"[FixArgp]-- | Create the table of contents, automatically generated-- from your 'section's, 'subsection's, and other related stuff.tableofcontents::LaTeXCl=>ltableofcontents=comm0"tableofcontents"appendix::LaTeXCl=>lappendix=comm0"appendix"-- | An item of a list (see 'enumerate' or 'itemize').-- The optional argument sets the design of the item.item::LaTeXCl=>Maybel->litemNothing=commS"item "item(Justopt)=liftL(\opt_->TeXComm"item"[OptArgopt_])opt-- | Environment of ordered lists. Use 'item' to start each list-- item.enumerate::LaTeXCl=>l->lenumerate=liftL$TeXEnv"enumerate"[]-- | Environment of unordered lists. Use 'item' to start each list-- item.itemize::LaTeXCl=>l->litemize=liftL$TeXEnv"itemize"[]description::LaTeXCl=>l->ldescription=liftL$TeXEnv"description"[]-- | Left-justify the argument.flushleft::LaTeXCl=>l->lflushleft=liftL$TeXEnv"flushleft"[]-- | Right-justify the argument.flushright::LaTeXCl=>l->lflushright=liftL$TeXEnv"flushright"[]-- | Center-justify the argument.center::LaTeXCl=>l->lcenter=liftL$TeXEnv"center"[]quote::LaTeXCl=>l->lquote=liftL$TeXEnv"quote"[]verse::LaTeXCl=>l->lverse=liftL$TeXEnv"verse"[]-- | Minipage environment.minipage::LaTeXCl=>MaybePos-- ^ Optional position->l-- ^ Width->l-- ^ Minipage content->lminipageNothing=liftL2$\ts->TeXEnv"minipage"[FixArgts]minipage(Justp)=liftL2$\ts->TeXEnv"minipage"[OptArg$rendertexp,FixArgts]-- | Figure environment.figure::LaTeXCl=>MaybePos-- ^ Optional position->l-- ^ Figure content->lfigureNothing=liftL$TeXEnv"figure"[]figure(Justp)=liftL$TeXEnv"figure"[OptArg$TeXRaw$renderp]-- | Abstract section.abstract::LaTeXCl=>l->labstract=liftL$TeXEnv"abstract"[]cite::LaTeXCl=>l->lcite=liftL$\l->TeXComm"cite"[FixArgl]-- Document class-- | A class option to be passed to the 'documentclass' function.dataClassOption=Draft|TitlePage|NoTitlePage|OneColumn|TwoColumn|OneSide|TwoSide|Landscape|OpenRight|OpenAny|Fleqn|Leqno|FontSizeMeasure|PaperPaperType|CustomOptionStringderivingShowinstanceRenderClassOptionwhererender(FontSizem)=rendermrender(Paperpt)=toLower(renderpt)<>"paper"render(CustomOptionstr)=fromStringstrrenderco=toLower$fromString$showcocustomopt::String->ClassOptioncustomopt=CustomOptioninstanceIsStringClassOptionwherefromString=customopt-- | LaTeX available paper types.dataPaperType=A0|A1|A2|A3|A4|A5|A6|B0|B1|B2|B3|B4|B5|B6|Letter|Executive|LegalderivingShowinstanceRenderPaperTypewhere-- | Set the document class. Needed in all documents.documentclass::LaTeXCl=>[ClassOption]-- ^ Class options->ClassName-- ^ Class name->ldocumentclassoptscn=fromLaTeX$TeXComm"documentclass"[MOptArg$fmaprendertexopts,FixArg$fromStringcn]article::ClassNamearticle="article"proc::ClassNameproc="proc"minimal::ClassNameminimal="minimal"report::ClassNamereport="report"book::ClassNamebook="book"slides::ClassNameslides="slides"a0paper::ClassOptiona0paper=PaperA0a1paper::ClassOptiona1paper=PaperA1a2paper::ClassOptiona2paper=PaperA2a3paper::ClassOptiona3paper=PaperA3a4paper::ClassOptiona4paper=PaperA4a5paper::ClassOptiona5paper=PaperA5a6paper::ClassOptiona6paper=PaperA6b0paper::ClassOptionb0paper=PaperB0b1paper::ClassOptionb1paper=PaperB1b2paper::ClassOptionb2paper=PaperB2b3paper::ClassOptionb3paper=PaperB3b4paper::ClassOptionb4paper=PaperB4b5paper::ClassOptionb5paper=PaperB5b6paper::ClassOptionb6paper=PaperB6letterpaper::ClassOptionletterpaper=PaperLetterexecutivepaper::ClassOptionexecutivepaper=PaperExecutivelegalpaper::ClassOptionlegalpaper=PaperLegaldraft::ClassOptiondraft=Draft-- | Typesets displayed formulae left-aligned instead of centred.fleqn::ClassOptionfleqn=Fleqn-- | Places the numbering of formulae on the left hand side instead of the right.leqno::ClassOptionleqno=Leqnotitlepage::ClassOptiontitlepage=TitlePagenotitlepage::ClassOptionnotitlepage=NoTitlePageonecolumn::ClassOptiononecolumn=OneColumntwocolumn::ClassOptiontwocolumn=TwoColumnoneside::ClassOptiononeside=OneSidetwoside::ClassOptiontwoside=TwoSide-- | Changes the layout of the document to print in landscape modelandscape::ClassOptionlandscape=Landscape-- | Makes chapters begin either only on right hand pagesopenright::ClassOptionopenright=OpenRight-- | Makes chapters begin on the next page available.openany::ClassOptionopenany=OpenAny-- | The 'document' environment contains the body of the document.document::LaTeXCl=>l->ldocument=liftL$TeXEnv"document"[]pagenumbering::LaTeXCl=>l->lpagenumbering=liftL$\l->TeXComm"pagenumbering"[FixArgl]-- | Arabic numerals.arabic::LaTeXCl=>larabic=fromLaTeX"arabic"-- | Lowercase roman numerals.roman::LaTeXCl=>lroman=fromLaTeX"roman"-- | Uppercase roman numerals.roman_::LaTeXCl=>lroman_=fromLaTeX"Roman"-- | Lowercase letters.alph::LaTeXCl=>lalph=fromLaTeX"alph"-- | Uppercase letters.alph_::LaTeXCl=>lalph_=fromLaTeX"Alph"-- Page stylespagestyle::LaTeXCl=>PageStyle->lpagestyleps=fromLaTeX$TeXComm"pagestyle"[FixArg$fromStringps]thispagestyle::LaTeXCl=>PageStyle->lthispagestyleps=fromLaTeX$TeXComm"thispagestyle"[FixArg$fromStringps]plain::PageStyleplain="plain"headings::PageStyleheadings="headings"empty::PageStyleempty="empty"myheadings::PageStylemyheadings="myheadings"-- | Used in conjunction with 'myheadings' for setting both the left and the right heading.markboth::LaTeXCl=>l->l->lmarkboth=liftL2$\l1l2->TeXComm"markboth"[FixArgl1,FixArgl2]-- | Used in conjunction with 'myheadings' for setting the right heading.markright::LaTeXCl=>l->lmarkright=liftL$\l->TeXComm"markright"[FixArgl]-- | Start a new line. In a 'tabular', it starts a new row, so use 'newline' instead.lnbk::LaTeXCl=>llnbk=fromLaTeX$TeXLineBreakNothingFalselnbk_::LaTeXCl=>llnbk_=fromLaTeX$TeXLineBreakNothingTruehyp::LaTeXCl=>lhyp=fromLaTeX$TeXCommS"-"cleardoublepage::LaTeXCl=>lcleardoublepage=comm0"cleardoublepage"clearpage::LaTeXCl=>lclearpage=comm0"clearpage"newpage::LaTeXCl=>lnewpage=comm0"newpage"linebreak::LaTeXCl=>l->llinebreak=liftL$\l->TeXComm"linebreak"[OptArgl]nolinebreak::LaTeXCl=>l->lnolinebreak=liftL$\l->TeXComm"nolinebreak"[OptArgl]nopagebreak::LaTeXCl=>l->lnopagebreak=liftL$\l->TeXComm"nopagebreak"[OptArgl]pagebreak::LaTeXCl=>l->lpagebreak=liftL$\l->TeXComm"pagebreak"[OptArgl]hyphenation::LaTeXCl=>l->lhyphenation=liftL$\l->TeXComm"hyphenation"[FixArgl]mbox::LaTeXCl=>l->lmbox=liftL$\l->TeXComm"mbox"[FixArgl]fbox::LaTeXCl=>l->lfbox=liftL$\l->TeXComm"fbox"[FixArgl]-- | Render the date at compilation time.today::LaTeXCl=>ltoday=comm0"today"-- | Render the current page.thePage::LaTeXCl=>lthePage=comm0"thepage"-- | TeX logo.tex::LaTeXCl=>ltex=comm0"TeX"-- | LaTeX logo.laTeX2::LaTeXCl=>llaTeX2=comm0"LaTeX"laTeXe::LaTeXCl=>llaTeXe=comm0"LaTeXe"-- | Horizontal dots.ldots::LaTeXCl=>lldots=comm0"ldots"-- | Vertical dots.vdots::LaTeXCl=>lvdots=comm0"vdots"-- | Diagonal dots.ddots::LaTeXCl=>lddots=comm0"ddots"-- | Quotation marks.qts::LaTeXCl=>l->lqtsl=betweenl(raw"``")(raw"''")footnote::LaTeXCl=>l->lfootnote=liftL$\l->TeXComm"footnote"[FixArgl]linespread::LaTeXCl=>Float->llinespreadx=fromLaTeX$TeXComm"linespread"[FixArg$rendertexx]indent::LaTeXCl=>lindent=comm0"indent"noindent::LaTeXCl=>lnoindent=comm0"noindent"hspace::LaTeXCl=>Measure->lhspacem=fromLaTeX$TeXComm"hspace"[FixArg$rendertexm]hspace_::LaTeXCl=>Measure->lhspace_m=fromLaTeX$TeXComm"hspace*"[FixArg$rendertexm]stretch::LaTeXCl=>Int->lstretchn=fromLaTeX$TeXComm"stretch"[FixArg$rendertexn]vspace::LaTeXCl=>Measure->lvspacem=fromLaTeX$TeXComm"vspace"[FixArg$rendertexm]-- | Fill out all available horizontal space.hfill::LaTeXCl=>lhfill=comm0"hfill"-- | Fill out all available vertical space.vfill::LaTeXCl=>lvfill=comm0"vfill"protect::LaTeXCl=>l->lprotectl=commS"protect"<>ltextwidth::LaTeXCl=>ltextwidth=comm0"textwidth"linewidth::LaTeXCl=>llinewidth=comm0"linewidth"-- | The point of 'verbatim' is to include text that will-- /not/ be parsed as LaTeX in any way at all, but should simply-- appear as given in the document, in a separate display-- in typewriter font.verbatim::LaTeXCl=>Text->lverbatim=liftL(TeXEnv"verbatim"[]).raw-- | Include text, as given and in typewriter, but in-line.-- Note that, for LaTeX-specific technical reasons, verbatim-- text can generally only be used \"at the top level\", not-- in e.g. section titles or other command-arguments.---- Unlike 'verbatim', which LaTeX implements as an ordinary environment,-- its command 'verb' uses a syntax trick to avoid braking its parsing-- when the literal text contains a closing brace: rather than using braces-- at all, the first character after @\\verb@ will be the right delimiter as well.-- Translating this method to HaTeX wouldn't really make sense since Haskell-- has string literals with their own escaping possibilities; instead, we make-- it secure by automatically choosing a delimiter that does not turn up -- in the given string.verb::LaTeXCl=>Text->lverbvbStr=casefind(isNothing.(`T.find`vbStr).(==))$"`'\"|=-~$#+/!^_;:,."++['0'..'9']++['A'..'B']++['a'..'b']ofJustdelim->letd=T.singletondeliminraw$T.concat["\\verb",d,vbStr,d]Nothing->let(lpart,rpart)=T.splitAt(T.lengthvbStr`quot`2)vbStrinverblpart<>verbrpart-- If all suitable delimiter characters are already used in the verbatim-- string (which really should never happen as this is intended for **short**-- in-line displays!) then split the verbatim string in two sections; at-- some point they will necessarily lack some of the characters.underline::LaTeXCl=>l->lunderline=liftL$\l->TeXComm"underline"[FixArgl]emph::LaTeXCl=>l->lemph=liftL$\l->TeXComm"emph"[FixArgl]textrm::LaTeXCl=>l->ltextrm=liftL$\l->TeXComm"textrm"[FixArgl]textsf::LaTeXCl=>l->ltextsf=liftL$\l->TeXComm"textsf"[FixArgl]-- | Set the given argument to monospaced font.texttt::LaTeXCl=>l->ltexttt=liftL$\l->TeXComm"texttt"[FixArgl]textmd::LaTeXCl=>l->ltextmd=liftL$\l->TeXComm"textmd"[FixArgl]-- | Set the given argument to bold font face.textbf::LaTeXCl=>l->ltextbf=liftL$\l->TeXComm"textbf"[FixArgl]textup::LaTeXCl=>l->ltextup=liftL$\l->TeXComm"textup"[FixArgl]-- Set the given argument to italic font face.textit::LaTeXCl=>l->ltextit=liftL$\l->TeXComm"textit"[FixArgl]textsl::LaTeXCl=>l->ltextsl=liftL$\l->TeXComm"textsl"[FixArgl]-- | Set the given argument to small caps format.textsc::LaTeXCl=>l->ltextsc=liftL$\l->TeXComm"textsc"[FixArgl]textnormal::LaTeXCl=>l->ltextnormal=liftL$\l->TeXComm"textnormal"[FixArgl]---------------------- Standard sizes ----------------------sizecomm::LaTeXCl=>String->l->lsizecommstr=liftL$\l->TeXBraces$comm0str<>ltiny::LaTeXCl=>l->ltiny=sizecomm"tiny"scriptsize::LaTeXCl=>l->lscriptsize=sizecomm"scriptsize"footnotesize::LaTeXCl=>l->lfootnotesize=sizecomm"footnotesize"small::LaTeXCl=>l->lsmall=sizecomm"small"normalsize::LaTeXCl=>l->lnormalsize=sizecomm"normalsize"large::LaTeXCl=>l->llarge=sizecomm"large"large2::LaTeXCl=>l->llarge2=sizecomm"Large"large3::LaTeXCl=>l->llarge3=sizecomm"LARGE"huge::LaTeXCl=>l->lhuge=sizecomm"huge"huge2::LaTeXCl=>l->lhuge2=sizecomm"Huge"--------------------smallskip::LaTeXCl=>lsmallskip=comm0"smallskip"bigskip::LaTeXCl=>lbigskip=comm0"bigskip"-- | The 'tabular' environment can be used to typeset tables with optional horizontal and vertical lines.tabular::LaTeXCl=>MaybePos-- ^ This optional parameter can be used to specify the vertical position of the table.-- Defaulted to 'Center'.->[TableSpec]-- ^ Table specification of columns and vertical lines.->l-- ^ Table content. See '&', 'lnbk', 'hline' and 'cline'.->l-- ^ Resulting table syntax.tabularNothingts=liftL$TeXEnv"tabular"[FixArg$TeXRaw$renderAppendts]tabular(Justp)ts=liftL$TeXEnv"tabular"[OptArg$TeXRaw$renderp,FixArg$TeXRaw$renderAppendts]-- | Column separator.(&)::LaTeXCl=>l->l->l(&)=liftL2$TeXOp"&"-- | Horizontal line.hline::LaTeXCl=>lhline=commS"hline "-- | Cell taking multiple columns.multicolumn::LaTeXCl=>Int->[TableSpec]->l->lmulticolumnnc=liftL$\l->TeXComm"multicolumn"[FixArg$rendertexn,FixArg.TeXRaw$renderAppendc,FixArgl]-- | @cline i j@ writes a partial horizontal line beginning in column @i@ and ending in column @j@.cline::LaTeXCl=>Int->Int->lclineij=fromLaTeX$TeXComm"cline"[FixArg$TeXRaw$renderi<>"-"<>renderj]parbox::LaTeXCl=>MaybePos->Measure->l->lparboxNothingw=liftL$\t->TeXComm"parbox"[FixArg$rendertexw,FixArgt]parbox(Justp)w=liftL$\t->TeXComm"parbox"[OptArg$TeXRaw$renderp,FixArg$TeXRaw$renderw,FixArgt]makebox::LaTeXCl=>MaybeMeasure->MaybePos->l->lmakeboxNothingNothing=liftL$\t->TeXComm"makebox"[FixArgt]makebox(Justw)Nothing=liftL$\t->TeXComm"makebox"[OptArg$TeXRaw$renderw,FixArgt]makeboxNothing(Justp)=liftL$\t->TeXComm"makebox"[OptArg$TeXRaw$renderp,FixArgt]makebox(Justw)(Justp)=liftL$\t->TeXComm"makebox"[OptArg$TeXRaw$renderw,OptArg$TeXRaw$renderp,FixArgt]framebox::LaTeXCl=>MaybeMeasure->MaybePos->l->lframeboxNothingNothing=liftL$\t->TeXComm"framebox"[FixArgt]framebox(Justw)Nothing=liftL$\t->TeXComm"framebox"[OptArg$TeXRaw$renderw,FixArgt]frameboxNothing(Justp)=liftL$\t->TeXComm"framebox"[OptArg$TeXRaw$renderp,FixArgt]framebox(Justw)(Justp)=liftL$\t->TeXComm"framebox"[OptArg$TeXRaw$renderw,OptArg$TeXRaw$renderp,FixArgt]raisebox::LaTeXCl=>Measure->MaybeMeasure->MaybeMeasure->l->lraiseboxmmamb=liftL$\l->TeXComm"raisebox"$[FixArg$rendertexm]++fmap(OptArg.rendertex)(catMaybes[ma,mb])++[FixArgl]-- | Produce a simple black box.rule::LaTeXCl=>MaybeMeasure-- ^ Optional lifting.->Measure-- ^ Width.->Measure-- ^ Height.->lruleNothingwh=fromLaTeX$TeXComm"rule"[FixArg$TeXRaw$renderw,FixArg$TeXRaw$renderh]rule(Justl)wh=fromLaTeX$TeXComm"rule"[OptArg$TeXRaw$renderl,FixArg$TeXRaw$renderw,FixArg$TeXRaw$renderh]-- HaTeX specific symbols-- | Print the HaTeX logo.hatex::LaTeXCl=>lhatex=mbox$"H"<>hspace(Ex$negate0.3)<>textsc"a"<>hspace(Ex$negate0.3)<>tex-- | Print the HaTeX 3 logo.hatex3::LaTeXCl=>lhatex3=hatex<>emph(textbf"3")-- | Print the HaTeX logo, beside the complete version number.hatex_version::LaTeXCl=>lhatex_version=hatex<>emph(textbf$rendertexx)<>hspace(Ex$negate0.3)<>emph("."<>fromString(intercalate"."$fmapshowxs))where(x:xs)=versionBranchversioncaption::LaTeXCl=>l->lcaption=liftL$\l->TeXComm"caption"[FixArgl]label::LaTeXCl=>l->llabel=liftL$\l->TeXComm"label"[FixArg$TeXRaw$renderl]ref::LaTeXCl=>l->lref=liftL$\l->TeXComm"ref"[FixArg$TeXRaw$renderl]pageref::LaTeXCl=>l->lpageref=liftL$\l->TeXComm"pageref"[FixArg$TeXRaw$renderl]-- Exteral files-- | Import an external file and insert its content /as it is/.input::LaTeXCl=>FilePath->linputfp=fromLaTeX$TeXComm"input"[FixArg$TeXRaw$fromStringfp]-- | Similar to 'input', but forces a page break.---- /Note: the file you are including cannot include other files./include::LaTeXCl=>FilePath->lincludefp=fromLaTeX$TeXComm"include"[FixArg$TeXRaw$fromStringfp]