CodeBrix.Texinfo2Html.MitLicenseForever
1.0.243.66
dotnet add package CodeBrix.Texinfo2Html.MitLicenseForever --version 1.0.243.66
NuGet\Install-Package CodeBrix.Texinfo2Html.MitLicenseForever -Version 1.0.243.66
<PackageReference Include="CodeBrix.Texinfo2Html.MitLicenseForever" Version="1.0.243.66" />
<PackageVersion Include="CodeBrix.Texinfo2Html.MitLicenseForever" Version="1.0.243.66" />
<PackageReference Include="CodeBrix.Texinfo2Html.MitLicenseForever" />
paket add CodeBrix.Texinfo2Html.MitLicenseForever --version 1.0.243.66
#r "nuget: CodeBrix.Texinfo2Html.MitLicenseForever, 1.0.243.66"
#:package CodeBrix.Texinfo2Html.MitLicenseForever@1.0.243.66
#addin nuget:?package=CodeBrix.Texinfo2Html.MitLicenseForever&version=1.0.243.66
#tool nuget:?package=CodeBrix.Texinfo2Html.MitLicenseForever&version=1.0.243.66
CodeBrix.Texinfo
CodeBrix.Texinfo is a pair of fully managed, cross-platform .NET libraries that turn GNU Texinfo documentation into nicely-formatted PDF documents.
CodeBrix.Texinfo2Html reads a Texinfo source file and renders it into HTML and CSS written specifically for PDF generation, and CodeBrix.Texinfo2Pdf takes that markup the rest of the way and produces the finished PDF using CodeBrix.PdfDocCreate.Html2Pdf.
Both libraries read standard Texinfo (.texi) files as well as the .tely Texinfo dialect produced by LilyPond and CodeBrix.LilyPort.
They are provided as .NET 10 libraries and the associated CodeBrix.Texinfo2Html.MitLicenseForever and CodeBrix.Texinfo2Pdf.MitLicenseForever NuGet packages.
CodeBrix.Texinfo supports applications and assemblies that target Microsoft .NET version 10.0 and later. Microsoft .NET version 10.0 is a Long-Term Supported (LTS) version of .NET, and was released on Nov 11, 2025; and will be actively supported by Microsoft until Nov 14, 2028. Please update your C#/.NET code and projects to the latest LTS version of Microsoft .NET.
Fully managed on every operating system
Both libraries are pure managed .NET. There is no native library, no runtime identifier and no
apt/brew/msi step anywhere in the chain, on Windows, macOS or Linux - the NuGet packages are
all an application needs. CodeBrix.Texinfo2Html only emits HTML and CSS and rasterizes nothing,
and the PDF stage underneath CodeBrix.Texinfo2Pdf - CodeBrix.PdfDocCreate.Html2Pdf - draws SVG
with CodeBrix.Imaging.Drawing.NoSkia, so a document's SVG pictures render identically everywhere
with nothing extra to install or reference.
SVG pictures land in the PDF as vector content by default. Paths, strokes, dashes, clips,
gradients and group opacity become PDF drawing operators, and SVG text becomes real PDF text in an
embedded font - so it stays sharp at any zoom, and remains selectable and searchable. Only a part
that PDF cannot express - an image filter such as a blur, Porter-Duff compositing, a difference
clip, a repeating gradient, a gradient whose stops differ in alpha, or a pattern fill - is
rasterized on its own, and that is reported as a warning with the code image.svg.rasterized.
To embed SVG as a bitmap instead, set the PDF stage's placement mode - the option object is the PDF renderer's own, so no extra package reference is involved:
using CodeBrix.PdfDocCreate.Html2Pdf; //SvgPlacementMode
using CodeBrix.Texinfo2Pdf; //TexinfoPdfRenderer
var renderer = new TexinfoPdfRenderer();
renderer.Options.Html.SvgPlacement = SvgPlacementMode.Raster; //default is Vector
renderer.Options.Html.SvgRasterScale = 3.0; //default 2.0
SvgRasterScale is the picture's pixel density in Raster mode. In Vector mode it applies only
to a part that had to fall back to a raster, and does nothing at all to a picture that stays
entirely vector.
Project status
Both libraries are complete and have public APIs — see the samples below.
CodeBrix.Texinfo2Html renders Texinfo to HTML and CSS end to end. It resolves cross references to real links, prints indices, places footnotes at the end of the chapter they belong to, carries a document's pictures along with it, and reads the LilyPond music environments of a .tely document so that a renderer you register can engrave them. It expands a document's own macros — @macro, @rmacro and @linemacro, including the ones a manual uses to define new definition commands — which is what lets a real manual work at all. It covers the general-Texinfo commands a GNU manual is built from as well: the @deffn definition family, numbered floats and their captions, the full index set including the indices a document defines for itself, and the accent and glyph commands.
Anything a document uses that these libraries do not implement becomes a warning and the closest readable degradation, never an exception — so the way to find out whether your manual works is to render it and read result.Warnings. The whole English LilyPond documentation set renders, as do the GNU Texinfo manual and the GNU Make manual.
CodeBrix.Texinfo2Pdf performs the whole conversion in one call, and is the package to install if what you want is a PDF.
The two libraries
CodeBrix.Texinfo2Html
Takes a standard Texinfo (.texi) file — or a LilyPond/CodeBrix.LilyPort .tely file — and renders it into HTML and CSS. The markup it emits is written for PDF generation rather than for the browser: it stays inside the documented HTML and CSS subset that CodeBrix.PdfDocCreate.Html2Pdf understands, so the output is ready to be fed straight into that library to produce a nicely-formatted PDF.
NuGet package: CodeBrix.Texinfo2Html.MitLicenseForever
dotnet add package CodeBrix.Texinfo2Html.MitLicenseForever
CodeBrix.Texinfo2Pdf
A convenience library that performs the whole conversion in one step. It renders the Texinfo source to HTML and CSS with CodeBrix.Texinfo2Html, then hands that markup to CodeBrix.PdfDocCreate.Html2Pdf to produce the finished PDF document. Use this package when you want a PDF; use CodeBrix.Texinfo2Html on its own when you want the intermediate HTML and CSS, or when you want to post-process the markup before it is rendered.
CodeBrix.Texinfo2Pdf.MitLicenseForever depends on CodeBrix.Texinfo2Html.MitLicenseForever and on CodeBrix.PdfDocCreate.Html2Pdf.MitLicenseForever, so installing it brings the whole conversion chain with it.
Nothing else is needed, on any operating system: the whole chain is managed code, and a document's SVG pictures are placed into the PDF as vector content — see the note near the top of this document.
NuGet package: CodeBrix.Texinfo2Pdf.MitLicenseForever
dotnet add package CodeBrix.Texinfo2Pdf.MitLicenseForever
CodeBrix.Texinfo supports:
- Standard GNU Texinfo (
.texi) source files - The
.telyTexinfo dialect produced by LilyPond and CodeBrix.LilyPort - Rendering Texinfo to HTML and CSS that is ready for PDF generation
- Producing a finished, nicely-formatted PDF in a single call
- A seam for engraving
@lilypondmusic, so a.telymanual can print its music as music
Note that the NuGet package ids carry the .MitLicenseForever suffix but the assemblies and namespaces do not — they are simply CodeBrix.Texinfo2Html and CodeBrix.Texinfo2Pdf. The suffix is a CodeBrix family convention that records the license the packages will always be published under.
Sample Code
Turn a Texinfo manual into a PDF:
using CodeBrix.Texinfo2Pdf;
var renderer = new TexinfoPdfRenderer();
var result = renderer.RenderFile("manual.texi", "out/manual.pdf");
Console.WriteLine($"{result.PageCount} pages, {result.Warnings.Count} warnings");
foreach (var warning in result.Warnings.Messages) { Console.WriteLine(warning); }
The output directory is created if it is not there, the document's pictures are carried along without your having to place them, and what lands in out is one PDF and nothing else. Leave the output path off entirely and the PDF is written beside the source file.
Set the page up, or give the document a running header and footer of your own:
var renderer = new TexinfoPdfRenderer();
renderer.Options.Html.SetPageSize("a4");
renderer.Options.Html.FooterText = "Page {page} of {pages}";
renderer.Options.Texinfo.PredefinedValues["version"] = "2.1"; //as though @set version 2.1
var pdf = renderer.RenderFileToBytes("manual.texi"); //or RenderFile, to disk
Options.Texinfo and Options.Html are the real option objects of the two libraries underneath, so anything either of them can do is reachable without a second package reference.
Restyle the intermediate before it becomes a PDF:
var renderer = new TexinfoPdfRenderer();
var html = renderer.GenerateHtmlFromFile("manual.texi");
//html.BodyHtml, html.Css, html.Title and the document's picture list are all here
var myCss = html.Css.Replace("#111111", "#000033"); //or replace it wholesale
renderer.RenderHtml(html, "out/manual.pdf", myCss);
Or write the pair out, edit the files by hand, and come back in:
var path = html.WriteToDirectory("work"); //work/manual.html plus work/manual.css
//...edit them...
renderer.RenderHtmlFile(path, "out/manual.pdf");
Warnings from both halves of the conversion arrive in one list, each tagged with the half that produced it, and split out as Warnings.TexinfoMessages and Warnings.PdfMessages when you want to tell a problem in the source from a problem in the typesetting.
If all you want is the HTML and CSS, install CodeBrix.Texinfo2Html on its own and use TexinfoHtmlRenderer directly — it has no dependencies at all beyond .NET, on any operating system:
using CodeBrix.Texinfo2Html;
var result = new TexinfoHtmlRenderer().GenerateFromFile("manual.texi");
var htmlPath = result.WriteToDirectory("out"); //manual.html, manual.css, and the pictures
Engrave the music of a .tely manual. Without a renderer registered, every @lilypond snippet is shown as its source text — this library will not take on a dependency on LilyPond, so it defines the seam and leaves the engraving to a consumer who already has an engraver:
public sealed class MyEngraver : ILilypondSnippetRenderer
{
public LilypondSnippetResult Render(LilypondSnippet snippet)
{
//snippet.Source (or snippet.FilePath), plus snippet.Options.Relative,
//.Fragment, .RaggedRight, .LineWidth, .StaffSize and the rest
byte[] png = MyLilypond.Engrave(snippet);
return LilypondSnippetResult.FromContent(png, "png");
}
}
var renderer = new TexinfoPdfRenderer();
renderer.Options.Texinfo.SnippetRenderer = new MyEngraver();
//the engraved pictures travel with the document, exactly as @image pictures do
renderer.RenderFile("notation.tely", "out/notation.pdf");
An identical snippet is engraved once and the picture reused, so a manual that repeats a snippet does not pay for it twice. Return LilypondSnippetResult.NotRendered to decline one quietly, or LilypondSnippetResult.Failed("...") to report why it could not be done.
Nothing about a document's contents throws: unsupported, malformed or missing constructs degrade to the nearest readable thing and are reported in result.Warnings. That includes an exception escaping your own snippet renderer.
Documentation
Both NuGet packages include an AGENT-README.txt - a complete API reference and usage guide written
for AI coding agents, specific to the package you referenced. Point your agent at that file when it
is writing code against these libraries.
Additional sample code and usage examples are available in the test projects: https://github.com/ellisnet/CodeBrix.Texinfo/tree/main/tests
License
The project is licensed under the MIT License. see: https://en.wikipedia.org/wiki/MIT_License
These libraries are original implementations that read the Texinfo file format. They contain no code
from the GNU Texinfo project or from any other Texinfo implementation, and no affiliation with or
endorsement by the GNU Project is claimed or implied - "Texinfo" is used here only to name the file
format these libraries read. See THIRD-PARTY-NOTICES.txt, which ships inside both NuGet packages.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CodeBrix.Texinfo2Html.MitLicenseForever:
| Package | Downloads |
|---|---|
|
CodeBrix.Texinfo2Pdf.MitLicenseForever
A fully managed, cross-platform convenience library that turns GNU Texinfo source files directly into PDF documents. It renders standard Texinfo (.texi) documents and the .tely Texinfo dialect produced by LilyPond and CodeBrix.LilyPort to HTML and CSS with CodeBrix.Texinfo2Html, then feeds that markup to CodeBrix.PdfDocCreate.Html2Pdf to produce the finished, nicely formatted PDF in a single step. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.243.66 | 38 | 8/31/2026 |
| 1.0.240.201 | 43 | 8/28/2026 |
| 1.0.238.1201 | 53 | 8/26/2026 |
| 1.0.238.626 | 69 | 8/26/2026 |
| 1.0.233.879 | 94 | 8/21/2026 |
| 1.0.232.110 | 96 | 8/20/2026 |
| 1.0.220.120 | 113 | 8/8/2026 |