{ "cells": [ { "cell_type": "markdown", "id": "b4582d85", "metadata": {}, "source": [ "# latex_url\n", "Demonstrates how to use interactive URL links in TLatex.\n", "\n", "JSROOT and standard SVG output support the syntax '#url[link]{label}'.\n", "This can be combined with other LaTeX commands, such as color or font settings.\n", "\n", "Since TLatex is used in many contexts, external links can be added to\n", "histogram titles, axis titles, legend entries, and more.\n", "\n", "This functionality is available only in web-based graphics and\n", "standard SVG output.\n", "\n", "\n", "\n", "\n", "**Author:** Sergey Linev \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:38 PM." ] }, { "cell_type": "code", "execution_count": 1, "id": "0ac64231", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:38:57.269592Z", "iopub.status.busy": "2026-05-19T20:38:57.269476Z", "iopub.status.idle": "2026-05-19T20:38:57.730320Z", "shell.execute_reply": "2026-05-19T20:38:57.729865Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n", "
\n", "\n", "\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stderr", "output_type": "stream", "text": [ "Info in : SVG file c1.svg has been created\n", "Info in : pdf file c1.pdf has been created\n" ] } ], "source": [ "auto c1 = new TCanvas(\"c1\", \"Use of #url in TLatex\", 1200, 800);\n", "\n", "auto latex = new TLatex(0.5, 0.5, \"Link on #color[4]{#url[https://root.cern]{root.cern}} web site\");\n", "latex->SetTextSize(0.1);\n", "latex->SetTextAlign(22);\n", "latex->SetTextAngle(30.);\n", "c1->Add(latex);\n", "c1->Print(\"c1.svg\");\n", "c1->Print(\"c1.pdf\");" ] }, { "cell_type": "markdown", "id": "27bbadc4", "metadata": {}, "source": [ "Draw all canvases " ] }, { "cell_type": "code", "execution_count": 2, "id": "06dbceb8", "metadata": { "collapsed": false, "execution": { "iopub.execute_input": "2026-05-19T20:38:57.732190Z", "iopub.status.busy": "2026-05-19T20:38:57.732071Z", "iopub.status.idle": "2026-05-19T20:38:57.953697Z", "shell.execute_reply": "2026-05-19T20:38:57.953164Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "
\n", "
\n", "\n", "\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%jsroot on\n", "gROOT->GetListOfCanvases()->Draw()" ] } ], "metadata": { "kernelspec": { "display_name": "ROOT C++", "language": "c++", "name": "root" }, "language_info": { "codemirror_mode": "text/x-c++src", "file_extension": ".C", "mimetype": " text/x-c++src", "name": "c++" } }, "nbformat": 4, "nbformat_minor": 5 }