"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/plugins/latex_single_outfile.lua" (12 May 2020, 713 Bytes) of package /windows/www/highlight-3.57-x64.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Lua source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 --[[
    2 
    3 Sample plugin file for highlight 3.45
    4 ]]
    5 
    6 Description="Inserts a section into each LaTeX output file to concatenate the results later"
    7 
    8 Categories = {"latex" }
    9 
   10 function formatUpdate(desc)
   11 
   12     function DocumentHeader(numFiles, currFile, options)
   13         if (HL_OUTPUT == HL_FORMAT_LATEX and numFiles > 1) then
   14             title=string.gsub(options.title,"_","\\textunderscore ")
   15             return  "\\section{"..title.."}\n", currFile == 1
   16         end
   17     end
   18 
   19     function DocumentFooter(numFiles, currFile, options)
   20         if (HL_OUTPUT == HL_FORMAT_LATEX and numFiles > 1 ) then
   21             return "", currFile==numFiles
   22         end
   23     end
   24 
   25 end
   26 
   27 Plugins={
   28 
   29   { Type="format", Chunk=formatUpdate }
   30 
   31 }