Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to eliminate URL text in conversion to pdf

I have a simple simple Markdown cell in a standard Sagemath 9.4 notebook on CoCalc.com as shown below:

#### test URL links with conversion to pdf
This link **[Figure 9.1.4](https://discretemath.org/ads/images/fig-directed-graph-ex1.png)** 
uses markdown **`[text]{(url)`** for the link.

which display nicely as the following image description
in a browser. When I select the PRINT button, which performs the conversion to html I see: image description
in another tab in the browser.

The problem occurs when I do Print to pdf from any browser (Chrome, Firefox, Edge, Brave) on the displayed html tab, since the generated pdf file shows the active link among with the entire (explicit URL) as shown below. image description
The (explicit URL) also appears in the pdf if I run Save and Download as ... PDF or PDF via LaTeX.

If I use the Jupyter Classic Notebook Server, the resulting pdf does not contain the (explicit URL) after the [text] portion. A pdf from a similar CoLab notebook generated a year ago does not contain the (explicit URL) in the pdf versions.

I would like to find a way to eliminate the (explicit URL) part of the active links in the pdf conversion. Something appears to have changed in how Sagemath handles the conversion to html. Whereas the .ipynb file is less than 1KB, the .html file is 266KB. I am unable to attach the files since (apparently) only images are allowed as attachments.

How to eliminate URL text in conversion to pdf

I have a simple simple single Markdown cell in a standard Sagemath 9.4 notebook on CoCalc.com as shown below:

#### test URL links with conversion to pdf
This link **[Figure 9.1.4](https://discretemath.org/ads/images/fig-directed-graph-ex1.png)** 
uses markdown **`[text]{(url)`** for the link.

which display nicely as the following image description
in a browser. When I select the PRINT button, which performs the conversion to html I see: image description
in another tab in the browser.

The problem occurs when I do Print to pdf from any browser (Chrome, Firefox, Edge, Brave) on the displayed html tab, since the generated pdf file shows the active link among with the entire (explicit URL) as shown below. image description
The (explicit URL) also appears in the pdf if I run Save and Download as ... PDF or PDF via LaTeX.

If I use the Jupyter Classic Notebook Server, the resulting pdf does not contain the (explicit URL) after the [text] portion. A pdf from a similar CoLab notebook generated a year ago does not contain the (explicit URL) in the pdf versions.

I would like to find a way to eliminate the (explicit URL) part of the active links in the pdf conversion. Something appears to have changed in how Sagemath handles the conversion to html. Whereas the .ipynb file is less than 1KB, the .html file is 266KB. I am unable to attach the files since (apparently) only images are allowed as attachments.

How to eliminate URL text in conversion to pdf

I have a simple single Markdown cell in a standard Sagemath 9.4 notebook on CoCalc.com as shown below:

#### test URL links with conversion to pdf
This link **[Figure 9.1.4](https://discretemath.org/ads/images/fig-directed-graph-ex1.png)** 
uses markdown **`[text]{(url)`** for the link.

which display displays nicely as the following image description
in a browser. When I select the PRINT button, which performs the conversion to html I see: image description
in another tab in the browser.

The problem occurs when I do Print to pdf from any browser (Chrome, Firefox, Edge, Brave) on the displayed html tab, since the generated pdf file shows the active link among with the entire (explicit URL) as shown below. image description
The (explicit URL) also appears in the pdf if I run Save and Download as ... PDF or PDF via LaTeX.

If I use the Jupyter Classic Notebook Server, the resulting pdf does not contain the (explicit URL) after the [text] portion. A pdf from a similar CoLab notebook generated a year ago does not contain the (explicit URL) in the pdf versions.

I would like to find a way to eliminate the (explicit URL) part of the active links in the pdf conversion. Something appears to have changed in how Sagemath handles the conversion to html. Whereas the .ipynb file is less than 1KB, the .html file is 266KB. I am unable to attach the files since (apparently) only images are allowed as attachments.