GroupDocs.Merger allows developers to merge TEX files when it’s needed to organize multiple
TEX files into single document or send fewer attachments etc. And you can do this without any third-party software or manual work involved.
With GroupDocs.Merger it is possible to combine TEX documents of any size and structure - all text, images, tables, graphs, forms and other content will be preserved.
The following example demonstrates how to merge TEX files with several lines of C# code:
Create an instance of Merger class and pass source TEX file path as a constructor parameter. You may specify absolute or relative file path as per your requirements.
Add another TEX file to merge with Join method. Repeat this step for other TEX documents you want to merge.
Call Merger class Save method and specify the filename for the merged TEX file as parameter.
// Load the source TEX fileusing(Mergermerger=newMerger(@"c:\sample1.tex")){// Add another TEX file to mergemerger.Join(@"c:\sample2.tex");// Merge TEX files and save resultmerger.Save(@"c:\merged.tex");}
About TEX File Format
TeX is a language that consists of programming as well as mark-up features, used to typeset documents. Donald Knuth from Stanford University, is the creator of this resourceful typesetting system. Across the world, TeX is the ultimate choice of authors and publishers to produce high quality technical documents. TeX performs an outstanding job of formatting complex mathematical expressions. In conjunction with a high-quality phototypesetter, TeX competes the results generated by the best traditional typesetting systems.