I have a problem similar to the one in: Obey spaces with URL package (path command). The obeyspaces option is not working within the pgfplots table column.

However, my problem is slightly different because I am using reStructuredText and sphinx at the top level with a LaTeX preamble.

This is the generated output, I have very little control over any of the "auto-generated" sections:

% auto-generated
\documentclass[letterpaper,10pt, openany, oneside, english]{sphinxmanual}

% user preamble

% auto-generated
\chapter{Path Testing}

% user generated
\path{test path with spaces.pdf}

% auto-generated

The problem seems to stem out of the sphinx package's use of the url package, but that package is loaded before I have control over it.

On top of that, even though I CAN add the obeyspaces option to the document using the sphinx conf.py file it breaks UNC path names

  • 3
    It would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that reproduces the problem (i.e., shows that obeyspaces is not working). Did you try \PassOptionsToPackage{obeyspaces}{url} or adding \makeatletter \makeatother around the code snippet you provided. Oct 31, 2014 at 16:44
  • @PeterGrill OK. I updated it. Sorry, I was missing the fact that this is embedded in a pgfplots table, which may be pertinent to the problem.
    – Jeremy
    Oct 31, 2014 at 17:30
  • I can't run your code as provided since there are numerous compile issues. After hacking away at it I was able to reproduce the problem, but adding \PassOptionsToPackage{obeyspaces}{url} before the document fixed the problem. So, depending on how you are processing this file you can add that option to the command line when you run pdflatex. To even get your code to run I had to remove the obeyspaces,spaces options to the url package, so if the code compiles as is for you then it should work. Oct 31, 2014 at 18:20
  • You should eliminate unnecessary stuff from the MWE so we have the minimum needed to be able to reproduce the problem. For instance is \tableofcontents and \printindex really required to reproduce the problem. I understand it is auto generated, but if you can reproduce the MWE to have less code then it will help to get to the root cause. Oct 31, 2014 at 18:23
  • @PeterGrill: Yes, but as with LaTeX it is sometimes hard to be sure what is causing the side-effects. Can you post the minimal solution that you have?
    – Jeremy
    Oct 31, 2014 at 18:47


You must log in to answer this question.

Browse other questions tagged .