Error at compilation time

Help
Anonymous
2011-08-17
2013-05-30

  • Anonymous
    2011-08-17

    Hello,
    I'm having an issue with the following file on an arch linux distribution with the following version
    asymptote 2.13
    pdfTeX 3.1415926-1.40.11-2.2 (TeX Live 2010/Arch Linux)
    I tried to compile

    // i=  <---
    // i= process_2.process_1 <---
    // i= process_2 <---
    // ['process_2', 'process_2.process_1']
    //Marc-Andre Luthi
    //
    unitsize(1cm);
    import fontsize;
    import patterns;
    add("brick",brick());
    // flow_process_noleafs definition
    path flow_process_noleafs_out=(0,0)--(0,2.0)--(2.5,2.0)--(2.5,0)--cycle;
    pair flow_process_noleafs_title=(1.25,1.0);
    path flow_process_noleafs_title_out=(1.25-2.0/2,1.0-1.5/2)--(1.25-2.0/2,1.0+1.5/2)--(1.25+2.0/2,1.0+1.5/2)--(1.25+2.0/2,1.0-1.5/2)--cycle;
    pair flow_process_noleafs_ap=( 1.25,1.0 );
    path flow_process_noleafs_inner=(0.25,0.25)--(0.25,0.25+1.5)--(0.25+2.0,0.25+1.5)--(0.25+2.0,0.25)--cycle;
    // flow_process_leafs_title definition
    path flow_process_leafs_title_out=(0,0)--(0,2.0)--(2.5,2.0)--(2.5,0)--cycle;
    pair flow_process_leafs_title_title=(1.25,1.75);
    path flow_process_leafs_title_title_out=(1.25-2.0/2,1.75-0.5/2)--(1.25-2.0/2,1.75+0.5/2)--(1.25+2.0/2,1.75+0.5/2)--(1.25+2.0/2,1.75-0.5/2)--cycle;
    pair flow_process_leafs_title_ap=( 1.25,1.0 );
    path flow_process_leafs_title_inner=(0.25,0.25)--(0.25,0.25+1.25)--(0.25+2.0,0.25+1.25)--(0.25+2.0,0.25)--cycle;
    //Transformation
    transform t_el[];
    //  no transform lines
    t_el[1] = shift(0.3125,0.4) * scale(1.0, 1.0 );
    t_el[0] = shift(0.0,0.0) * scale(1.25, 1.6 );
    //Elements
    // flow_process_leafs_title process_2
    int element_num = 0;
    transform t = t_el[ 0 ];
    //no color filling fill_color
    draw( t * flow_process_leafs_title_out , black+0.03cm+solid );
    //draw( t * flow_process_leafs_title_inner, dotted+.5blue+1bp );
    //draw( t * flow_process_leafs_title_title_out, dotted+.5blue+1bp );
    // !wrap title
    label( "process_2", t * flow_process_leafs_title_title, black+fontsize(11pt) );
    // flow_process_noleafs process_2.process_1
    int element_num = 1;
    transform t = t_el[ 1 ];
    fill( t * flow_process_noleafs_out , red+opacity(1));
    draw( t * flow_process_noleafs_out , black+0.03cm+solid );
    //draw( t * flow_process_noleafs_inner, dotted+.5blue+1bp );
    //draw( t * flow_process_noleafs_title_out, dotted+.5blue+1bp );
    //wrap title
    picture tmp_pic;
    label( tmp_pic , minipage("\center{Insane process}", width=2.0cm ) , t * flow_process_noleafs_title, black+fontsize(10pt)  ) ;
    clip( tmp_pic , t * flow_process_noleafs_title_out );
    add( tmp_pic );
    //Relations
    

    and I get the following with asymptote -vvv

    Using configuration directory /home/malik/.asy
    Loading plain from /usr/share/asymptote/plain.asy
    Including plain_constants from /usr/share/asymptote/plain_constants.asy
    Loading version from /usr/share/asymptote/version.asy
    Including plain_strings from /usr/share/asymptote/plain_strings.asy
    Including plain_pens from /usr/share/asymptote/plain_pens.asy
    Including plain_paths from /usr/share/asymptote/plain_paths.asy
    Including plain_filldraw from /usr/share/asymptote/plain_filldraw.asy
    Including plain_margins from /usr/share/asymptote/plain_margins.asy
    Including plain_picture from /usr/share/asymptote/plain_picture.asy
    Loading plain_scaling from /usr/share/asymptote/plain_scaling.asy
    Loading simplex from /usr/share/asymptote/simplex.asy
    Loading plain_bounds from /usr/share/asymptote/plain_bounds.asy
    Including plain_scaling from /usr/share/asymptote/plain_scaling.asy
    Including plain_prethree from /usr/share/asymptote/plain_prethree.asy
    Including plain_Label from /usr/share/asymptote/plain_Label.asy
    Including plain_shipout from /usr/share/asymptote/plain_shipout.asy
    Including plain_xasy from /usr/share/asymptote/plain_xasy.asy
    Including plain_arcs from /usr/share/asymptote/plain_arcs.asy
    Including plain_boxes from /usr/share/asymptote/plain_boxes.asy
    Including plain_markers from /usr/share/asymptote/plain_markers.asy
    Including plain_arrows from /usr/share/asymptote/plain_arrows.asy
    Including plain_debugger from /usr/share/asymptote/plain_debugger.asy
    Loading fig_06.txt.asy from fig_06.txt.asy
    Loading fontsize from /usr/share/asymptote/fontsize.asy
    Loading patterns from /usr/share/asymptote/patterns.asy
    latex \scrollmode
    This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010/Arch Linux)
     restricted \write18 enabled.
    entering extended mode
    LaTeX2e <2009/09/24>
    Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
    rman-x-2009-06-19, ngerman-x-2009-06-19, afrikaans, ancientgreek, ibycus, arabi
    c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
    h, dutch, ukenglish, usenglishmax, esperanto, estonian, farsi, finnish, french,
     galician, german, ngerman, swissgerman, monogreek, greek, hungarian, icelandic
    , assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, oriya, panja
    bi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji, lao, lati
    n, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, polish, portu
    guese, romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedis
    h, turkish, turkmen, ukrainian, uppersorbian, welsh, loaded.
    *
    \documentclass[12pt]{article}
    \usepackage{type1cm}
    \def\ASYprefix{}
    \newbox\ASYbox
    \newdimen\ASYdimen
    \long\def\ASYbase#1#2{\leavevmode\setbox\ASYbox=\hbox{#1}\ASYdimen=\ht\ASYbox%
    \setbox\ASYbox=\hbox{#2}\lower\ASYdimen\box\ASYbox}
    \usepackage{graphicx}
    \begin{document}
    \makeatletter%
    \let\ASYencoding\f@encoding%
    \let\ASYfamily\f@family%
    \let\ASYseries\f@series%
    \let\ASYshape\f@shape%
    \makeatother%
    \fontsize{11}{13.2}\selectfont
    (Please type a command or say `\end')
    *
    *\usefont{\ASYencoding}{\ASYfamily}{\ASYseries}{\ASYshape}%
    (/usr/share/texmf-dist/tex/latex/base/article.cls
    Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
    (/usr/share/texmf-dist/tex/latex/base/size12.clo))
    *\setbox\ASYbox=\hbox{process_2}
    (/usr/share/texmf/tex/latex/type1cm/type1cm.sty)
    *
    *
    *
    *
    *
    *(/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
    (/usr/share/texmf-dist/tex/latex/graphics/keyval.sty)
    (/usr/share/texmf-dist/tex/latex/graphics/graphics.sty
    (/usr/share/texmf-dist/tex/latex/graphics/trig.sty)
    (/usr/share/texmf-dist/tex/latex/latexconfig/graphics.cfg)
    (/usr/share/texmf-dist/tex/latex/graphics/dvips.def)))
    No file texput.aux.
    *
    *
    *
    *
    *
    *
    *
    *
    *! Missing $ inserted.
    <inserted text> 
                    $
    <*> \setbox\ASYbox=\hbox{process_
                                     2}
    ! Extra }, or forgotten $.
    <*> \setbox\ASYbox=\hbox{process_2}
                                       
    *
    ! Missing $ inserted.
    <inserted text> 
                    $
    <*> 
        
    (Please type a command or say `\end')
    *
    (Please type a command or say `\end')
    */usr/share/asymptote/plain_Label.asy: 324.15: runtime: ! Missing $ inserted.
    <inserted text> 
                    $
    <*> \setbox\ASYbox=\hbox{process_
                                     2}
    ! Extra }, or forgotten $.
    <*> \setbox\ASYbox=\hbox{process_2}
                                       
    *! Missing $ inserted.
    <inserted text> 
                    $
    <*> 
        
    (Please type a command or say `\end')
    *
    

    It seems like there is no issue with the syntax, is there already a bug filled with the same issue ? Or it's maybe just me.

     
  • John Bowman
    John Bowman
    2011-08-17

    In your label command you need to escape the underscore: "process\_2".

     

  • Anonymous
    2011-08-22

    Oh sorry. Thanks for the fast reply