import { HtmlGenerator } from '../generator/html/generator.cjs';
import { MacroArgs, MacroMode } from '../macros.cjs';
import { PackageOpts } from '../options.cjs';
import { Length, Vector } from '../types.cjs';
/** an item of itemize or description: the optional label and the content */
interface Item {
label: unknown;
text: unknown;
}
/** an item of enumerate: the label node, with the id of its anchor if it is numbered */
interface EnumItem {
label: {
id?: string;
node: unknown;
};
text: unknown;
}
/**
* This is where most macros are defined. This file is like base/latex.ltx in LaTeX.
*
* By default, a macro takes no arguments and is a horizontal-mode macro; mode and arguments are declared with
* the @Macro and @Args decorators (see macros.ts). A macro must return an array with elements of type Node or
* string (text), or nothing if it only changes state.
*
* State is held in the generator, this class is immutable. When macros are defined/changed, those are added
* in the generator.
*
* TODO: the picture and box macros depend on the HtmlGenerator (SVG, style and class attributes); the rest
* only needs the generator interface.
*/
export declare class LaTeX {
g: HtmlGenerator;
static symbols: Map;
static args: Record;
constructor(generator: HtmlGenerator, options?: PackageOpts);
empty(): void;
TeX(): HTMLElement[];
LaTeX(): HTMLElement[];
today(): string[];
newline(): HTMLElement[];
negthinspace(): HTMLElement[];
onecolumn(): void;
twocolumn(_opt?: unknown): void;
smallbreak(): HTMLElement[];
medbreak(): HTMLElement[];
bigbreak(): HTMLElement[];
addvspace(l: Length): HTMLElement[];
marginpar(txt: unknown): unknown[];
abstractname(): string[];
title(t: unknown): void;
author(a: unknown): void;
date(d: unknown): void;
and(): any[];
thanks(_text: unknown): void;
/**
* A font command \textXX{text} is declared "X g", so it is called twice: first without arguments, before
* the text is parsed; then it opens a group and sets the font. Then with the parsed text; then it wraps
* the text with the attributes of the group and closes the group.
*/
private _fontCommand;
textrm(...args: unknown[]): Node[] | undefined;
textsf(...args: unknown[]): Node[] | undefined;
texttt(...args: unknown[]): Node[] | undefined;
textmd(...args: unknown[]): Node[] | undefined;
textbf(...args: unknown[]): Node[] | undefined;
textup(...args: unknown[]): Node[] | undefined;
textit(...args: unknown[]): Node[] | undefined;
textsl(...args: unknown[]): Node[] | undefined;
textsc(...args: unknown[]): Node[] | undefined;
textnormal(...args: unknown[]): Node[] | undefined;
emph(...args: unknown[]): Node[] | undefined;
rmfamily(): void;
sffamily(): void;
ttfamily(): void;
mdseries(): void;
bfseries(): void;
upshape(): void;
itshape(): void;
slshape(): void;
scshape(): void;
normalfont(): void;
em(): void;
tiny(): void;
scriptsize(): void;
footnotesize(): void;
small(): void;
normalsize(): void;
large(): void;
Large(): void;
LARGE(): void;
huge(): void;
Huge(): void;
theenumi(): string[];
theenumii(): string[];
theenumiii(): string[];
theenumiv(): string[];
labelenumi(): string[];
labelenumii(): string[];
labelenumiii(): string[];
labelenumiv(): string[];
"p@enumii"(): string[];
"p@enumiii"(): string[];
"p@enumiv"(): string[];
labelitemi(): string[];
labelitemii(): string[];
labelitemiii(): string[];
labelitemiv(): string[];
centering(): void;
raggedright(): void;
raggedleft(): void;
private _startlist;
private _endlist;
center(): HTMLElement[];
endcenter(): void;
flushleft(): HTMLElement[];
endflushleft(): void;
flushright(): HTMLElement[];
endflushright(): void;
titlepage(): HTMLElement[];
quote(): HTMLElement[];
endquote(): void;
quotation(): HTMLElement[];
endquotation(): void;
verse(): HTMLElement[];
endverse(): void;
itemize(...args: [Item[]] | []): HTMLElement[] | undefined;
enditemize(): void;
enumerate(...args: [EnumItem[]] | []): HTMLElement[] | undefined;
endenumerate(): void;
description(...args: [Item[]] | []): HTMLElement[] | undefined;
enddescription(): void;
picture(size: Vector, offset: Vector | undefined, content: unknown): HTMLElement[];
hspace(_s: boolean, l: Length): HTMLElement[];
label(label: unknown): void;
ref(label: unknown): unknown[];
llap(txt: unknown): HTMLElement[];
rlap(txt: unknown): HTMLElement[];
clap(txt: unknown): HTMLElement[];
smash(txt: unknown): HTMLElement[];
hphantom(txt: unknown): HTMLElement[];
vphantom(txt: unknown): HTMLElement[];
phantom(txt: unknown): HTMLElement[];
underline(txt: unknown): HTMLElement[];
mbox(txt: unknown): unknown[];
makebox(vec: Vector | undefined, width: Length | undefined, pos: string | undefined, txt: unknown): unknown[];
fbox(txt: unknown): HTMLElement[] | undefined;
framebox(vec: Vector | undefined, width: Length | undefined, pos: string | undefined, txt: unknown): HTMLElement[] | undefined;
private _box;
parbox(pos: string | undefined, height: Length | undefined, innerPos: string | undefined, width: Length, txt: unknown): HTMLElement[];
thinlines(): void;
thicklines(): void;
linethickness(l: Length): void;
arrowlength(l: Length): void;
maxovalrad(): string[];
qbeziermax(): number;
frame(txt: unknown): HTMLElement[];
private _stroke;
put(v: Vector, obj: unknown): HTMLElement[];
multiput(v: Vector, dv: Vector, n: number, obj: unknown): Node[];
qbezier(N: number | undefined, v1: Vector, v: Vector, v2: Vector): HTMLElement[];
cbezier(N: number | undefined, v1: Vector, v: Vector, v2: Vector, v3: Vector): HTMLElement[];
private _path;
circle(s: boolean, d: Length): HTMLElement[];
line(v: Vector, l: Length): HTMLElement[];
vector(v: Vector, l: Length): HTMLElement[];
Line(vs: Vector, ve: Vector): HTMLElement[];
Vector(vs: Vector, ve: Vector): HTMLElement[];
private _slopeLengthToCoords;
private _line;
private _vector;
oval(maxrad: Length | undefined, size: Vector, part: string | undefined): HTMLElement[];
private _intersect;
newlength(id: string): void;
setlength(id: string, l: Length): void;
addtolength(id: string, l: Length): void;
newcounter(c: string, p?: string): void;
stepcounter(c: string): void;
addtocounter(c: string, n: number): void;
setcounter(c: string, n: number): void;
refstepcounter(c: string): unknown[];
alph(c: string): string[];
Alph(c: string): string[];
arabic(c: string): string[];
roman(c: string): string[];
Roman(c: string): string[];
fnsymbol(c: string): string[][];
input(_file: unknown): void;
include(_file: unknown): void;
documentclass(options: PackageOpts | undefined, documentclass: string, _version?: string): void;
usepackage(opts: PackageOpts | undefined, packages: string[], _version?: string): void;
includeonly(_filelist: string[]): void;
makeatletter(): void;
makeatother(): void;
pagestyle(_s: string): void;
linebreak(_o?: number): void;
nolinebreak(_o?: number): void;
fussy(): void;
sloppy(): void;
pagebreak(_o?: number): void;
nopagebreak(_o?: number): void;
samepage(): void;
enlargethispage(_s: boolean, _l: Length): void;
newpage(): void;
clearpage(): void;
cleardoublepage(): void;
vfill(): void;
thispagestyle(_s: string): void;
}
export {};