Mathematical formulae

Post questions on how to use or achieve an effect in Inkscape.
Gedep
Posts: 20
Joined: Sat Apr 21, 2012 8:58 pm

Mathematical formulae

Postby Gedep » Wed Apr 03, 2013 12:59 am

Hi there,

I would like to create math formulae in Inkscape.
When searching the web, I found something about LaTex en TexTex.

I'm unable to get it running. I searched this forum for help, but I get info that I don't understand :oops:

Running Inkscape 0.48.4 on Windows 7.

Arjan

User avatar
ragstian
Posts: 1169
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Mathematical formulae

Postby ragstian » Wed Apr 03, 2013 2:04 am

Hi,

Have a look at these;
http://blog.felixbreuer.net/2010/10/24/poster.html
http://wiki.inkscape.org/wiki/index.php/LaTeX
http://typethinker.blogspot.com/2008/06/integrating-inkscape-graphics-in-latex.html

If you still need help getting laTex to work on win7 chime back - got it working on my win7 system.

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

Gedep
Posts: 20
Joined: Sat Apr 21, 2012 8:58 pm

Re: Mathematical formulae

Postby Gedep » Wed Apr 03, 2013 2:47 am

Well, I tried them all, installing ghostscript, pstoedit, textext, but nothing worked. I still don't have the LaTeX option under "Effect-> Render". I do have a Tex Text now, but get the same error I read about in another thread.

[EDIT]The error about: RuntimeError: Neither pygtk nor Tkinter is available!

pfff, why should this be so hard?

littlegrassfolks
Posts: 23
Joined: Tue Mar 12, 2013 2:16 am

Re: Mathematical formulae

Postby littlegrassfolks » Wed Apr 03, 2013 4:12 am

I just tried it on my linux and it worked like a charm. Now, I dont know about windows; I havent used a windows machine in a while. However comparing each linux step with windows, this is what I would suggest as means to troubleshoot.
Look at this page: http://pav.iki.fi/software/textext/index.html If you scroll down to the section titled instructions for windows, read the number 4. The textext installer is supposed to also write some support files in python\Lib\site-packages under your inkscape directory. Can you confirm that these files exist? If not, extract the zip linked to "necessary library files" into that location. Also, make sure that you can run step 5 in those instructions.
When installing textext, are you running it as an administrator?

Gedep
Posts: 20
Joined: Sat Apr 21, 2012 8:58 pm

Re: Mathematical formulae

Postby Gedep » Wed Apr 03, 2013 4:14 am

Yes and yes.
I mean, I did run textext installer and I do have the right packages in that folder...

littlegrassfolks
Posts: 23
Joined: Tue Mar 12, 2013 2:16 am

Re: Mathematical formulae

Postby littlegrassfolks » Wed Apr 03, 2013 4:33 am

Try this as suggested on this post: https://bitbucket.org/pv/textext/issue/ ... nkscape048

1. Move C:\Program Files (x86)\Inkscape\python to C:\Program Files (x86)\Inkscape\python_backup

2. Copy your C:\Python26 to C:\Program Files (x86)\Inkscape

3. Rename C:\Program Files (x86)\Inkscape\Python26 to C:\Program Files (x86)\Inkscape\python

4. Restart inkscape

In fact, read the other posts on that discussion there as well. Seems like that might do it.

Gedep
Posts: 20
Joined: Sat Apr 21, 2012 8:58 pm

Re: Mathematical formulae

Postby Gedep » Wed Apr 03, 2013 5:01 am

Is it me or is this a bit elaborate/devious?

Gedep
Posts: 20
Joined: Sat Apr 21, 2012 8:58 pm

Re: Mathematical formulae

Postby Gedep » Wed Apr 03, 2013 5:13 am

Not that I don't appreciate the help... Ido very mucg so.
But I'm no computer wizard... :oops:

littlegrassfolks
Posts: 23
Joined: Tue Mar 12, 2013 2:16 am

Re: Mathematical formulae

Postby littlegrassfolks » Wed Apr 03, 2013 5:16 am

What do you mean? If you read the link I sent you, people are talking about the exact same error as you are mentioning. They also talk of the fixes. Are you able to try similar things yourself and see if you also get it working?

Gedep
Posts: 20
Joined: Sat Apr 21, 2012 8:58 pm

Re: Mathematical formulae

Postby Gedep » Wed Apr 03, 2013 5:19 am

Well, I tried a fix mentioned in one of those links where they talk about editing textext.py.
Tried that, didn't work. I did get a different error, though.

And changing python? All I know about a python involves reptiles :roll:

Gedep
Posts: 20
Joined: Sat Apr 21, 2012 8:58 pm

Re: Mathematical formulae

Postby Gedep » Wed Apr 03, 2013 5:39 am

http://waluyo-adi-siswanto.blogspot.nl/ ... ows-7.html

This helped me. Especially the part about changing PATH. Didn't know what it ment.
I now have LaTex-option in Effect-> Render.

Going to try it out.

Gedep
Posts: 20
Joined: Sat Apr 21, 2012 8:58 pm

Re: Mathematical formulae

Postby Gedep » Thu Apr 04, 2013 12:14 am

So far it wors fine. A bit getting used to the LaTeX syntax, but my first formulae are there!

Thanks for helping out.

Arjan

User avatar
ragstian
Posts: 1169
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Mathematical formulae

Postby ragstian » Thu Apr 04, 2013 12:18 am

Hi.

Glad you got it to work - looks like you got some good help here.
Can we see an example of what you are making?

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

littlegrassfolks
Posts: 23
Joined: Tue Mar 12, 2013 2:16 am

Re: Mathematical formulae

Postby littlegrassfolks » Thu Apr 04, 2013 12:55 am

Hi Arjan,

Good to hear that it is working. If you are new to LaTex, I would recommend this online equation editor: http://www.codecogs.com/latex/eqneditor.php
You can type out symbols and equations by clicking the pictures and it will generate the corresponding LateX code for you.

Regards

Lazur
Posts: 4562
Joined: Tue Jun 14, 2016 10:38 am

Re: Mathematical formulae

Postby Lazur » Sat May 11, 2013 10:43 am

Hello there, I have some problems with latex too.

Installed 62 latin modern fonts.
Installed texmaker.
Installed texstudio.
Installed ghostscript.
Installed gsview.
Installed pstoedit.
Put textext py and inx in the extension folder.
Downloaded and put files in use for the python built in as opposed here.
Edited the py and inx as was written.
Installed imagemagick.
Installed miktex.
Downloaded bibtool.

If pasted right formula inside the box, it gets plotted.
But more often an error message appears:
Traceback (most recent call last):
File "textext.py", line 211, in cb_ok
self.callback(self.text, self.preamble_file, self.scale_factor)
File "textext.py", line 370, in <lambda>
converter_cls, old_node))
File "textext.py", line 388, in do_convert
new_node = converter.convert(text, preamble_file, scale_factor)
File "textext.py", line 751, in convert
self.tex_to_pdf(latex_text, preamble_file)
File "textext.py", line 728, in tex_to_pdf
exec_command(['pdflatex', self.tmp('tex')] + latexOpts)
File "textext.py", line 597, in exec_command
% (' '.join(cmd), p.returncode, out + err))
RuntimeError: Command pdflatex c:\docume~1\....\locals~1\temp\tmpe1ysug\tmp.tex -interaction=nonstopmode -halt-on-error failed (code 1): This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9)

entering extended mode

(c:/docume~1/..../locals~1/temp/tmpe1ysug/tmp.tex

LaTeX2e <2011/06/27>

Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar

abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,

croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga

lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland

ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,

lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n

german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman

ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm

an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl

ishmax, welsh, loaded.

("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"

Document Class: article 2007/10/19 v1.4h Standard LaTeX document class

("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"))



LaTeX Warning: Unused global option(s):

[a0].



No file tmp.aux.



! LaTeX Error: Can be used only in preamble.



See the LaTeX manual or LaTeX Companion for explanation.

Type H <return> for immediate help.

...



l.7 \documentclass

[12pt]{article}

! ==> Fatal error occurred, no output PDF file produced!

Transcript written on tmp.log.




When trying to plot this from wikipedia:

\documentclass[12pt]{article}
\title{\LaTeX}
\date{}
\begin{document}
\maketitle \LaTeX{} is a document preparation system for the \TeX{} typesetting program. It offers programmable
desktop publishing features and extensive facilities for automating most aspects of typesetting and desktop
publishing, including numbering and cross-referencing, tables and figures, page layout, bibliographies, and much
more. \LaTeX{} was originally written in 1984 by Leslie Lamport and has become the dominant method for using \TeX;
few people write in plain \TeX{} anymore. The current version is \LaTeXe.
\newline
% This is a comment, it is not shown in the final output.
% The following shows a little of the typesetting power of LaTeX
\begin{eqnarray}
E &=& mc^2 \\
m &=& \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}
\end{eqnarray}
\end{document}




If opened a .tex, no message given, but won't produce anything.

What do I missing?
What should be the 7*. step, that would do the job?

Lazur
Posts: 4562
Joined: Tue Jun 14, 2016 10:38 am

Re: Mathematical formulae

Postby Lazur » Sat May 11, 2013 11:56 am

Also when it actually renders, the letters look worse than one could draw blindfolded.
Attachments
wat.PNG
wat.PNG (48.74 KiB) Viewed 15552 times

User avatar
ragstian
Posts: 1169
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Mathematical formulae

Postby ragstian » Sat May 11, 2013 12:24 pm

Hi Lazur URH

When inputting the latex code from your post TeXworks throws an error,
when cutting & pasting direct from Wikipedia it works like a charm.

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

Lazur
Posts: 4562
Joined: Tue Jun 14, 2016 10:38 am

Re: Mathematical formulae

Postby Lazur » Sat May 11, 2013 12:30 pm

More wierdly the same letter in the same plotted material appears with different errors as well.

And uses lines not only paths, and paths with strokes and not with fill only.

That much of an effort for such a horrible result is not right.
Attachments
wat2.PNG
wat2.PNG (58.2 KiB) Viewed 15545 times

Lazur
Posts: 4562
Joined: Tue Jun 14, 2016 10:38 am

Re: Mathematical formulae

Postby Lazur » Sat May 11, 2013 12:39 pm

ragstian wrote:Hi Lazur URH

When inputting the latex code from your post TeXworks throws an error,
when cutting & pasting direct from Wikipedia it works like a charm.

RGDS
Ragnar


Tex Text extension throws the same error message that was quoted before with the sample wikipedia tex file copy/pasted.
! ==> Fatal error occurred, no output PDF file produced!

User avatar
ragstian
Posts: 1169
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Mathematical formulae

Postby ragstian » Sat May 11, 2013 12:52 pm

Hi.

Character coding can throw you off.
Have a look at this; http://goo.gl/GFOM4

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

Lazur
Posts: 4562
Joined: Tue Jun 14, 2016 10:38 am

Re: Mathematical formulae

Postby Lazur » Sat May 11, 2013 1:08 pm

If this message was pasted without the part that page mentioned, it worked.
$result = iconv(“windows-1252″,“UTF-8″,$source);x = a_0 + \frac{1}{a_1 + \frac{1}{a_2 + \frac{1}{a_3 + a_4}}}$


Now the same error message appears:

Traceback (most recent call last):
File "textext.py", line 211, in cb_ok
self.callback(self.text, self.preamble_file, self.scale_factor)
File "textext.py", line 370, in <lambda>
converter_cls, old_node))
File "textext.py", line 388, in do_convert
new_node = converter.convert(text, preamble_file, scale_factor)
File "textext.py", line 751, in convert
self.tex_to_pdf(latex_text, preamble_file)
File "textext.py", line 728, in tex_to_pdf
exec_command(['pdflatex', self.tmp('tex')] + latexOpts)
File "textext.py", line 597, in exec_command
% (' '.join(cmd), p.returncode, out + err))
RuntimeError: Command pdflatex c:\docume~1\....\locals~1\temp\tmpdkjld2\tmp.tex -interaction=nonstopmode -halt-on-error failed (code 1): This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9)

entering extended mode

(c:/docume~1/..../locals~1/temp/tmpdkjld2/tmp.tex

LaTeX2e <2011/06/27>

Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar

abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,

croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga

lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland

ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,

lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n

german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman

ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm

an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl

ishmax, welsh, loaded.

("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"

Document Class: article 2007/10/19 v1.4h Standard LaTeX document class

("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"))



LaTeX Warning: Unused global option(s):

[a0].



No file tmp.aux.

! Missing $ inserted.

<inserted text>

$

l.7 ...windows-1252″,“UTF-8″,$source);x = a_

0 + \frac{1}{a_1 + \frac{1...

! ==> Fatal error occurred, no output PDF file produced!

Transcript written on tmp.log.



Lazur
Posts: 4562
Joined: Tue Jun 14, 2016 10:38 am

Re: Mathematical formulae

Postby Lazur » Sat May 11, 2013 1:21 pm

Installed texlive recently.

Now it's producing another error:
textext.py:227: GtkWarning: gtk_text_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed

txt.get_buffer().set_text(err_msg)


And now it can't render even that it could before.

User avatar
ragstian
Posts: 1169
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Mathematical formulae

Postby ragstian » Sat May 11, 2013 4:45 pm

Hi.

la consigna es la consigna… there is, still, a lot to understand

Have a look here; http://goo.gl/leIxR

Good Luck.
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

Lazur
Posts: 4562
Joined: Tue Jun 14, 2016 10:38 am

Re: Mathematical formulae

Postby Lazur » Sat May 11, 2013 11:39 pm

Lazur URH wrote:...
Downloaded and put files in use for the python built in as opposed here.
Edited the py and inx as was written.
...

User avatar
ragstian
Posts: 1169
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Mathematical formulae

Postby ragstian » Sun May 12, 2013 12:49 am

Hi.
Lazur URH wrote:...
Downloaded and put files in use for the python built in as opposed here.
Edited the py and inx as was written.
...

Sorry about that oversight.

Have a look at this; https://answers.launchpad.net/inkscape/+question/58856

RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: No registered users and 2 guests