# Example of LaTeX preprocessor input written in UDL. # # Compile this document to LaTeX using the preprocessor with command: # cargo run --features="tex" --bin udl-tex-cmd -- examples/equations.tex.u :article :amsmath :document
:Equations # Define a sum-range command. ::*:4:{ _{#1}^{#2 #3} #4 } :math :k:0:100:k = 0 + 1 + 2 + + 99 + 100 = (0 + 100) + (1 + 99) + (49 + 51) + 50 = 5050 :math :math :k:0:n:k = 0 + 1 + 2 + + (n - 1) + n = n :n:2 + :n:2 = :n^2:2 + :n:2 = n :{n + 1}:2 :math
:Matrices :math :X = :bmatrix <@tabulate-sq>:3:[ 1;0;0; 0;1;0; 0;0;1; ] :bmatrix :math :document