Fail to convert to pdf

The problem you are experiencing is likely due to the way that nbconvert converts LaTeX to PDF. By default, nbconvert inserts dollar signs around inline math and backslashes around display math. However, if there is a space before or after a dollar sign, nbconvert will treat the dollar sign as a literal character and not as a math delimiter. This can cause problems when converting LaTeX to PDF, as the PDF converter will not expect to see dollar signs outside of math delimiters.

There are a few ways to fix this problem:

  1. Remove the spaces before and after dollar signs. This is the simplest solution, but it may not be practical if you have hundreds of notebooks to convert.
  2. Configure nbconvert to not insert dollar signs around inline math. This can be done by setting the inline_math_formats configuration option to ['latex'] .
  3. Use a different LaTeX converter. There are a number of other LaTeX converters available, such as pdflatex and lualatex. These converters may be more forgiving of spaces before and after dollar signs.

If you choose to remove the spaces before and after dollar signs, you can use a regular expression search and replace to do this automatically. For example, the following regular expression will replace all spaces before dollar signs with empty strings:

r'\s+\

You can use this regular expression to search and replace all spaces before dollar signs in all of your notebooks using a text editor such as Vim or Sublime Text.

If you choose to configure nbconvert to not insert dollar signs around inline math, you can edit the nbconvert configuration file. This file is typically located at /etc/nbconvert/config.d/ . In the configuration file, add the following line:

c.Exporter.inline_math_formats = ['latex']

Once you have made this change, restart Jupyter Notebook and try converting your notebooks to PDF again.

If you choose to use a different LaTeX converter, you will need to install the converter and configure nbconvert to use it. The instructions for doing this will vary depending on the converter you choose to use.`

You can use this regular expression to search and replace all spaces before dollar signs in all of your notebooks using a text editor such as Vim or Sublime Text.

If you choose to configure nbconvert to not insert dollar signs around inline math, you can edit the nbconvert configuration file. This file is typically located at DISCOURSE_PLACEHOLDER_4 . In the configuration file, add the following line:

DISCOURSE_PLACEHOLDER_5

Once you have made this change, restart Jupyter Notebook and try converting your notebooks to PDF again.

If you choose to use a different LaTeX converter, you will need to install the converter and configure nbconvert to use it. The instructions for doing this will vary depending on the converter you choose to use.

Forget above all, If you need PDF document conversion then you can get this from PDFInsider site online without email signup.