These snippets demonstrate how to use external LaTeX packages with Aspose.TeX for .NET. Learn how to provide packages from the file system, ZIP archives, and implement custom input directory handling for packages with fonts.
- Use external LaTeX packages from the file system
- Use external LaTeX packages from a ZIP archive
- Implement custom IInputWorkingDirectory for packages with fonts
- Handle external font maps from packages
- Reference Aspose.TeX for .NET: Aspose.TeX on Windows; Aspose.TeX.Drawing on non‑Windows.
- Copy a snippet into your project.
- Apply a temporary license as described in the licensing guide.
- Build and run.
In evaluation mode, the output may contain watermarks and limitations. Apply a valid license to unlock full features.
More about external LaTeX packages:
- Documentation – Aspose.TeX for .NET
- Product page – Aspose.TeX for .NET
- Free Support Forum – Aspose.TeX
- Blog – Aspose.TeX Product Family
- API Reference – Aspose.TeX for .NET
- NuGet (Windows) – Aspose.TeX
- NuGet (non‑Windows) – Aspose.TeX for .NET
- .NET 6.0+, .NET Core, or .NET Framework
- Aspose.TeX for .NET library
Provide external LaTeX packages from a file system directory. The directory containing packages may be located anywhere on your file system. Use InputFileSystemDirectory to specify the location.
Use Case: When you have packages installed locally or in a custom directory structure.
Provide external LaTeX packages from a ZIP archive. This allows you to package all required dependencies together. Use InputZipDirectory to specify the ZIP archive and optional base path inside it.
Use Case: When distributing LaTeX documents with all dependencies packaged together, or when packages are downloaded as ZIP archives.
Implement IInputWorkingDirectory and IFileCollector interfaces for advanced package handling. This is particularly useful when the required input contains fonts provided by external packages.
Key Features:
- IInputWorkingDirectory: Provides access to package files
- IFileCollector: Enables the collection of files by extension
- Font Maps: Handles external font maps that map TeX's internal font names to physical font files
Use Case: When working with packages that include custom fonts or when you need fine-grained control over package loading.
Examples work with common LaTeX packages such as:
fancybox- Fancy frames and boxesfancyhdr- Extensive control of page headers and footerspgfplots- Create normal/logarithmic plots in two and three dimensions- And many others supported by Aspose.TeX
The RequiredInputDirectory class demonstrates:
- File Name Storage: Pre-registering files that will be requested by the TeX engine
- Extension-Based Collection: Organizing files by extension for efficient lookup
- Stream Handling: Returning file streams when requested by the TeX engine
- Disposal: Proper cleanup of resources