Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug : The "-po, --pictureoptions" argument should not contains quotes after processing #24

Open
sebma opened this issue Jun 20, 2018 · 1 comment

Comments

@sebma
Copy link

sebma commented Jun 20, 2018

Hi,

This bug is for real this time :)

Here is what I get I Jupyter Notebook :

%tikz --showlatex -po "node distance=\layersep" \input{neuralNetwork.tikz}
\documentclass[convert={convertexe={convert},density=300,size=400x240,outext=.png},border=0pt]{standalone}
        \usepackage[]{tikz}

\usepackage{}
            
\usetikzlibrary{}
            

            
\begin{document}
\begin{tikzpicture}[scale=1,"node distance=\layersep"]
        \input{neuralNetwork.tikz}
\end{tikzpicture}
\end{document}

BTW : layersep is a variable defined neuralNetwork.tikz as this : \def\layersep{2.5cm}

You can be solve this by doing this in your code :

picture_options·=·args.pictureoptions.strip('"')
@sebma sebma changed the title Bug : The "-po, --pictureoptions" argument should not contains quotes Bug : The "-po, --pictureoptions" argument should not contains quotes after processing Jun 20, 2018
@ballynakill-waif
Copy link

I'm not sure exactly how you managed to work around this bug.
I've been following tutorials from the few that utilized this project and I can't get it to work:
my first cell says:

tikz_env = "node distance=2cm"
picture_options·=·args.pictureoptions.strip('"')
print(tikz_env)

and this is followed by:

%%tikz -l arrows,positioning -po "$tikz_env" -f png
\node (1) [circle, draw] {Point 1};
\node (2) [circle, draw, below right of=1] {Point 2};
\node (3) [circle, draw, below left of=1] {Point 3};
\node (4) [circle, draw, below of=1] {Point 4};

\draw [->] (1) -- (2);
\draw [->] (2) -- (3);
\draw [->] (3) -- (4);
\draw [->] (4) -- (1);

but the error shows that the string preserves the double quotes:



    ! Package pgfkeys Error: I do not know the key '/tikz/"node distance', to which
     you passed '2cm"', and I am going to ignore it. Perhaps you misspelled it.

    See the pgfkeys package documentation for explanation.
    Type  H <return>  for immediate help.
     ...                                              
                                                  
    l.8 ...n{tikzpicture}[scale=1,"node distance=2cm"]
                                                  
    ? 
    ! Emergency stop.
     ...                                              
                                                  
    l.8 ...n{tikzpicture}[scale=1,"node distance=2cm"]
                                                  
    !  ==> Fatal error occurred, no output PDF file produced!
    Transcript written on tikz.log.

    Executing command:
    convert -density 300 -units PixelsPerInch tikz.pdf -resize 400x240 -quality 90 
    tikz.png


    Class standalone Warning: Conversion unsuccessful!
    (standalone)              There might be something wrong with your
    (standalone)              conversation software or the file permissions!

    ! Package pgfkeys Error: I do not know the key '/tikz/"node distance', to which
     you passed '2cm"', and I am going to ignore it. Perhaps you misspelled it.

    See the pgfkeys package documentation for explanation.
    Type  H <return>  for immediate help.
     ...                                              
                                                  
    l.8 ...n{tikzpicture}[scale=1,"node distance=2cm"]
                                                  
    ? 
    ! Emergency stop.
     ...                                              
                                                  
    l.8 ...n{tikzpicture}[scale=1,"node distance=2cm"]
                                                  
    !  ==> Fatal error occurred, no output PDF file produced!
    Transcript written on tikz.log.

stderr:
    system returned with code 256
   convert: unable to open image 'tikz.pdf': No such file or directory @ error/blob.c/
OpenBlob/3571.
    convert: no images defined `tikz.png' @ error/convert.c/ConvertImageCommand/3362.
    system returned with code 256

No image generated.

strange days indeed ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants