{ "cells": [ { "cell_type": "markdown", "id": "4f668436", "metadata": {}, "source": [ "# latex5\n", "as GIF, PS, PDF and SVG files.\n", "\n", "### png output:\n", "\n", "### pdf output:\n", "\n", "### svg output:\n", "\n", "\n", "\n", "**Author:** Rene Brun \n", "This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Tuesday, May 19, 2026 at 08:37 PM." ] }, { "cell_type": "code", "execution_count": 1, "id": "effb57e4", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:13.267812Z", "iopub.status.busy": "2026-05-19T20:37:13.267689Z", "iopub.status.idle": "2026-05-19T20:37:13.611988Z", "shell.execute_reply": "2026-05-19T20:37:13.611357Z" } }, "outputs": [], "source": [ "auto c1 = new TCanvas(\"mathsymb\", \"Mathematical Symbols\", 600, 600);\n", "\n", "TLatex l;\n", "l.SetTextSize(0.03);" ] }, { "cell_type": "markdown", "id": "7c2ca96a", "metadata": {}, "source": [ "Draw First Column" ] }, { "cell_type": "code", "execution_count": 2, "id": "595c7246", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:13.613766Z", "iopub.status.busy": "2026-05-19T20:37:13.613639Z", "iopub.status.idle": "2026-05-19T20:37:13.820279Z", "shell.execute_reply": "2026-05-19T20:37:13.819306Z" } }, "outputs": [], "source": [ "l.SetTextAlign(12);\n", "float y, step, x1, x2;\n", "y = 0.96;\n", "step = 0.044;\n", "x1 = 0.02;\n", "x2 = x1 + 0.04;\n", "l.DrawLatex(x1, y, \"#club\");\n", "l.DrawText(x2, y, \"#club\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#voidn\");\n", "l.DrawText(x2, y, \"#voidn\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#leq\");\n", "l.DrawText(x2, y, \"#leq\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#approx\");\n", "l.DrawText(x2, y, \"#approx\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#in\");\n", "l.DrawText(x2, y, \"#in\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#supset\");\n", "l.DrawText(x2, y, \"#supset\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#cap\");\n", "l.DrawText(x2, y, \"#cap\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#ocopyright\");\n", "l.DrawText(x2, y, \"#ocopyright\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#trademark\");\n", "l.DrawText(x2, y, \"#trademark\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#times\");\n", "l.DrawText(x2, y, \"#times\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#bullet\");\n", "l.DrawText(x2, y, \"#bullet\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#voidb\");\n", "l.DrawText(x2, y, \"#voidb\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#doublequote\");\n", "l.DrawText(x2, y, \"#doublequote\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#lbar\");\n", "l.DrawText(x2, y, \"#lbar\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#arcbottom\");\n", "l.DrawText(x2, y, \"#arcbottom\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#downarrow\");\n", "l.DrawText(x2, y, \"#downarrow\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#leftrightarrow\");\n", "l.DrawText(x2, y, \"#leftrightarrow\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#Downarrow\");\n", "l.DrawText(x2, y, \"#Downarrow\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#Leftrightarrow\");\n", "l.DrawText(x2, y, \"#Leftrightarrow\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#void8\");\n", "l.DrawText(x2, y, \"#void8\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#hbar\");\n", "l.DrawText(x2, y, \"#hbar\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#forall\");\n", "l.DrawText(x2, y, \"#forall\");" ] }, { "cell_type": "markdown", "id": "45af5f5e", "metadata": {}, "source": [ "Draw Second Column" ] }, { "cell_type": "code", "execution_count": 3, "id": "c9b79671", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:13.821819Z", "iopub.status.busy": "2026-05-19T20:37:13.821687Z", "iopub.status.idle": "2026-05-19T20:37:14.028288Z", "shell.execute_reply": "2026-05-19T20:37:14.027294Z" } }, "outputs": [], "source": [ "y = 0.96;\n", "x1 = 0.27;\n", "x2 = x1 + 0.04;\n", "l.DrawLatex(x1, y, \"#diamond\");\n", "l.DrawText(x2, y, \"#diamond\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#aleph\");\n", "l.DrawText(x2, y, \"#aleph\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#geq\");\n", "l.DrawText(x2, y, \"#geq\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#neq\");\n", "l.DrawText(x2, y, \"#neq\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#notin\");\n", "l.DrawText(x2, y, \"#notin\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#subseteq\");\n", "l.DrawText(x2, y, \"#subseteq\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#cup\");\n", "l.DrawText(x2, y, \"#cup\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#copyright\");\n", "l.DrawText(x2, y, \"#copyright\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#void3\");\n", "l.DrawText(x2, y, \"#void3\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#divide\");\n", "l.DrawText(x2, y, \"#divide\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#circ\");\n", "l.DrawText(x2, y, \"#circ\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#infty\");\n", "l.DrawText(x2, y, \"#infty\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#angle\");\n", "l.DrawText(x2, y, \"#angle\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#cbar\");\n", "l.DrawText(x2, y, \"#cbar\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#arctop\");\n", "l.DrawText(x2, y, \"#arctop\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#leftarrow\");\n", "l.DrawText(x2, y, \"#leftarrow\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#otimes\");\n", "l.DrawText(x2, y, \"#otimes\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#Leftarrow\");\n", "l.DrawText(x2, y, \"#Leftarrow\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#prod\");\n", "l.DrawText(x2, y, \"#prod\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#Box\");\n", "l.DrawText(x2, y, \"#Box\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#parallel\");\n", "l.DrawText(x2, y, \"#parallel\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#exists\");\n", "l.DrawText(x2, y, \"#exists\");" ] }, { "cell_type": "markdown", "id": "6fa51abb", "metadata": {}, "source": [ "Draw Third Column" ] }, { "cell_type": "code", "execution_count": 4, "id": "e05e5651", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:14.029835Z", "iopub.status.busy": "2026-05-19T20:37:14.029704Z", "iopub.status.idle": "2026-05-19T20:37:14.236382Z", "shell.execute_reply": "2026-05-19T20:37:14.235272Z" } }, "outputs": [], "source": [ "y = 0.96;\n", "x1 = 0.52;\n", "x2 = x1 + 0.04;\n", "l.DrawLatex(x1, y, \"#heart\");\n", "l.DrawText(x2, y, \"#heart\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#Jgothic\");\n", "l.DrawText(x2, y, \"#Jgothic\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#LT\");\n", "l.DrawText(x2, y, \"#LT\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#equiv\");\n", "l.DrawText(x2, y, \"#equiv\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#subset\");\n", "l.DrawText(x2, y, \"#subset\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#supseteq\");\n", "l.DrawText(x2, y, \"#supseteq\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#wedge\");\n", "l.DrawText(x2, y, \"#wedge\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#oright\");\n", "l.DrawText(x2, y, \"#oright\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#AA\");\n", "l.DrawText(x2, y, \"#AA\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#pm\");\n", "l.DrawText(x2, y, \"#pm\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#3dots\");\n", "l.DrawText(x2, y, \"#3dots\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#nabla\");\n", "l.DrawText(x2, y, \"#nabla\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#downleftarrow\");\n", "l.DrawText(x2, y, \"#downleftarrow\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#topbar\");\n", "l.DrawText(x2, y, \"#topbar\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#arcbar\");\n", "l.DrawText(x2, y, \"#arcbar\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#uparrow\");\n", "l.DrawText(x2, y, \"#uparrow\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#oplus\");\n", "l.DrawText(x2, y, \"#oplus\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#Uparrow\");\n", "l.DrawText(x2, y, \"#Uparrow\");\n", "y -= step;\n", "l.DrawLatex(x1, y - 0.01, \"#sum\");\n", "l.DrawText(x2, y, \"#sum\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#perp\");\n", "l.DrawText(x2, y, \"#perp\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#textendash\");\n", "l.DrawText(x2, y, \"#textendash\");" ] }, { "cell_type": "markdown", "id": "c5021e63", "metadata": {}, "source": [ "Draw Fourth Column" ] }, { "cell_type": "code", "execution_count": 5, "id": "7ea6614b", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:14.237931Z", "iopub.status.busy": "2026-05-19T20:37:14.237806Z", "iopub.status.idle": "2026-05-19T20:37:14.444340Z", "shell.execute_reply": "2026-05-19T20:37:14.443346Z" } }, "outputs": [], "source": [ "y = 0.96;\n", "x1 = 0.77;\n", "x2 = x1 + 0.04;\n", "l.DrawLatex(x1, y, \"#spade\");\n", "l.DrawText(x2, y, \"#spade\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#Rgothic\");\n", "l.DrawText(x2, y, \"#Rgothic\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#GT\");\n", "l.DrawText(x2, y, \"#GT\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#propto\");\n", "l.DrawText(x2, y, \"#propto\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#notsubset\");\n", "l.DrawText(x2, y, \"#notsubset\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#oslash\");\n", "l.DrawText(x2, y, \"#oslash\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#vee\");\n", "l.DrawText(x2, y, \"#vee\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#void1\");\n", "l.DrawText(x2, y, \"#void1\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#aa\");\n", "l.DrawText(x2, y, \"#aa\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#/\");\n", "l.DrawText(x2, y, \"#/\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#upoint\");\n", "l.DrawText(x2, y, \"#upoint\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#partial\");\n", "l.DrawText(x2, y, \"#partial\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#corner\");\n", "l.DrawText(x2, y, \"#corner\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#ltbar\");\n", "l.DrawText(x2, y, \"#ltbar\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#bottombar\");\n", "l.DrawText(x2, y, \"#bottombar\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#rightarrow\");\n", "l.DrawText(x2, y, \"#rightarrow\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#surd\");\n", "l.DrawText(x2, y, \"#surd\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#Rightarrow\");\n", "l.DrawText(x2, y, \"#Rightarrow\");\n", "y -= step;\n", "l.DrawLatex(x1, y - 0.015, \"#int\");\n", "l.DrawText(x2, y, \"#int\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#odot\");\n", "l.DrawText(x2, y, \"#odot\");\n", "y -= step;\n", "l.DrawLatex(x1, y, \"#textemdash\");\n", "l.DrawText(x2, y, \"#textemdash\");" ] }, { "cell_type": "markdown", "id": "011e9b8e", "metadata": {}, "source": [ "Save the picture in various formats" ] }, { "cell_type": "code", "execution_count": 6, "id": "fee7259e", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:37:14.445866Z", "iopub.status.busy": "2026-05-19T20:37:14.445741Z", "iopub.status.idle": "2026-05-19T20:37:14.653141Z", "shell.execute_reply": "2026-05-19T20:37:14.652312Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "