Problem when compile the example

Deplate
huashuai
2008-04-12
2013-04-17
  • huashuai
    huashuai
    2008-04-12

    I just started to learn deplate. I tried to compile the code given in Example 10.12 about the Inline Latex region with the command:

    deplate -x -X test.txt

    But I can't get the result given in the manual. And I guess the command is wrong, can you give me a hint? The code in Example 10.12 is following:

    #Set: InlatexExampleClip <<EOC
    #Inlatex inline! id=InlatexExample sfx=jpeg bh=27 bw=79 <<EOI
    \usepackage{graphicx}
    $\sum_{i=n}^{n} \rotatebox{90}{$x_{i}$}$
    EOI
    EOC

    This is a test ({get: InlatexExampleClip}) of a clipped Inlatex region
    as an inline graphic.

    #Inlatex id=InlatexExampleXY <<-----
    \usepackage[all]{xy}
    \parbox{5cm}{
    \xymatrix{
    U \ar@/_/[ddr]_y \ar@/^/[drr]^x
    \ar@{.>}[dr]|-{(x,y)} \\ & X \times_Z Y \ar[d]^q \ar[r]_p
    & X \ar[d]_f \\ & Y \ar[r]^g & Z }
    }
    -----
    #CAP: An example from the xypic-user guide

     
    • Tom Link
      Tom Link
      2008-04-13

      Do you get an error message? There should a few files be created in the current directory:

      $ ls
      InlatexExample.01.jpeg  InlatexExample.tex        InlatexExampleXY.ps*  test.html
      InlatexExample.ps*      InlatexExampleXY.01.jpeg  InlatexExampleXY.tex  test.txt*

      Are you able to compile the tex files from the command line? How exactly does it fail?

       
    • huashuai
      huashuai
      2008-04-13

      Sorry for providing not enough information.

      I checked it again, and I found the problem is in the tex files. The line contains
      "\usepackage[]" is not converted corrently. The tex file looks like this:

      \documentclass[10pt,a4paper,notitlepage]{article}
      \usepackage{amsmath}
      \usepackage{amsfonts}
      \usepackage{amssymb}
      \begin{document}
      \pagestyle{empty}
      +++disabled+++{graphicx}
      $\sum_{i=n}^{n} \rotatebox{90}{$x_{i}$}$
      \end{document}

      The line with "+++disabled+++" make it fail. So what's the problem? Did I use the wrong command?

       
      • Tom Link
        Tom Link
        2008-04-13

        You also have to allow "t".

        If you convert only your own files and can trust the input, you could add the following statement to ~/.deplate/deplate.ini

        allow r,t,x,X,l

        See also: http://deplate.sourceforge.net/Usage.html

        I admit this shouldn't happen because the usepackage isn't user input in the document source but is inserted by the formatter and should thus be trusted anyway.

         
        • Tom Link
          Tom Link
          2008-04-13

          Ok, I reviewed the example. It actually is user input and that's why it is filtered unless you allow "t" ~~ unfiltered latex input.

           
        • huashuai
          huashuai
          2008-04-13

          Thanks so much, tlink. I can move on to learn deplate