mcand / abntex2

Automatically exported from code.google.com/p/abntex2
0 stars 0 forks source link

Tikzexternalize not compatible with Miktex 2.9 abntex2 package #118

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
What is the expected output? What do you see instead?
What version of the product are you using? 

http://tex.stackexchange.com/questions/182783/tikzexternalize-not-compatible-wit
h-miktex-2-9-abntex2-package

On what operating system?
Windows 7 x64

Original issue reported on code.google.com by daniel.k...@gmail.com on 9 Jun 2014 at 1:01

GoogleCodeExporter commented 9 years ago
Daniel,

Você deveria mencionar que a classe abntex2 é extensão de memoir. 

Inclusive, testei o exemplo que você colocou, sem o uso de abntex2, e o erro 
é o mesmo. Acredito que esteja faltando algo no seu exemplo.

! Package tikz Error: Sorry, the system call 'pdflatex -halt-on-error -interact
ion=batchmode -jobname "figures/Untitled-figure0" "\def\tikzexternalrealjob{Unt
itled}\input{Untitled}"' did NOT result in a usable output file 'figures/Untitl
ed-figure0' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that you hav
e enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometim
es it is also named 'write 18' or something like that. Or maybe the command sim
ply failed? Error messages can be found in 'figures/Untitled-figure0.log'. If y
ou continue now, I'll try to typeset the picture.

Original comment by laurocesar on 9 Jun 2014 at 1:34

GoogleCodeExporter commented 9 years ago
O problema está numa incompatibilidade da biblioteca external do tikz com o 
pacote "calc", usado pela classe abntex2.cls.

Seria necessário investigar substituir o pacote calc da classe, ou identificar 
uma forma de "avisar" o compilador que o arquivo intermediário criado para 
compilar as imagens tikz deveria usar outra classe, e não a classe padrão do 
documento.

Se quiser se aventurar, olhe a página 625 do manual do pdgmanual.pdf.

Original comment by laurocesar on 9 Jun 2014 at 2:13

GoogleCodeExporter commented 9 years ago
O exemplo está completo. Rodo ele assim no Eclipse + Texlipse + Miktex.
Acredito que o que está faltando pra vc é o argumento -shell-escape.

pdftex -synctex=1 -interaction=nonstopmode --src-specials %input -shell-escape

Original comment by daniel.k...@gmail.com on 9 Jun 2014 at 2:15

Attachments:

GoogleCodeExporter commented 9 years ago
Na verdade, foi mais simples do que imaginava. Uma vez identificado o problema 
com o pacote calc, alterei o código do abntex2.cls para funcionar sem ele. E 
pronto. Agora funciona. Farei um commit em alguns minutos. Um novo release do 
abntex2 deverá ser gerado para que todos possam ver as modificações. Porém, 
até lá, poderá usar a versão do repositório.

Agora, há uma maneira de gerar o documento sem ter que passar --shel-scape à 
pdflatex?

Original comment by laurocesar on 9 Jun 2014 at 2:28

GoogleCodeExporter commented 9 years ago
Por favor, teste a nova classe abntex2.cls e me avise se funcionou:

https://code.google.com/p/abntex2/source/browse/tex/latex/abntex2/abntex2.cls

Original comment by laurocesar on 9 Jun 2014 at 2:37

GoogleCodeExporter commented 9 years ago
Excelente, Lauro. Utilizo o shell-escape porque acelera e muito a compilação 
do documento. As figuras são compiladas em modo externo, o que é feito 
paralelamente em computadores multicore por exemplo. O resultado é uma 
compilação mais rápida.

http://olezfdtd.wordpress.com/2012/03/28/precompile-pgfplots-using-tikzexternali
ze/
http://scrolls.mafgani.net/2011/03/latex-shell-escape/

http://tex.stackexchange.com/questions/103565/tips-for-choosing-hardware-for-bes
t-latex-compile-performance

Original comment by daniel.k...@gmail.com on 9 Jun 2014 at 2:39

GoogleCodeExporter commented 9 years ago
Lauro, como eu faço o teste? Dentro da pasta de instalação do MiKTeX 2.9 eu 
não encontrei a classe abntex2.cls. Somente encontrei o arquivo abntex2.tpm.

Original comment by daniel.k...@gmail.com on 9 Jun 2014 at 3:09

GoogleCodeExporter commented 9 years ago
Coloque o arquivo abntex2.cls na raiz do seu projeto.

Original comment by laurocesar on 9 Jun 2014 at 3:15

GoogleCodeExporter commented 9 years ago
Funcionou perfeitamente, mestre Lauro!

Original comment by daniel.k...@gmail.com on 9 Jun 2014 at 3:19

GoogleCodeExporter commented 9 years ago
Lauro, dá uma olhada aqui: 

O pacote calc mudou os comandos\setcounter e amigos que se tornaram frágeis. 
Então você tem que fazê-los robustos manualmente. O exemplo usa o etoolbox 
com \robustify:

http://tex.stackexchange.com/questions/114764/calc-and-settocdepth-break-tikzext
ernalize

Original comment by daniel.k...@gmail.com on 9 Jun 2014 at 4:13

GoogleCodeExporter commented 9 years ago
A versão atual do abntex2.cls não usa mais o pacote calc. Então, essa issue 
foi boa por isso também.

Original comment by laurocesar on 9 Jun 2014 at 4:51