View previous topic :: View next topic |
Author |
Message |
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Fri Aug 23, 2019 2:02 am Post subject: Problem Importing a TEX File into an SVG file |
|
|
Problem Importing a TEX File into an SVG file
EDIT(TED) #1 : 23/8/2019 around mid-day - TEX code used with sample program added, see in RED at bottom of post
(related to a previous post: http://forums.silverfrost.com/viewtopic.php?t=4061)
When I compile & run the following test program:-
Quote: | !
! ftn95-ex-svg_tex_eqn_gen-1b2.3a.f95 - IMPORT TEX OBJECT Only
!
INCLUDE <windows.ins>
!INCLUDE <clearwin.ins>
INTEGER i,icolor,ans
DOUBLE PRECISION X_OFFSET, Y_OFFSET, SCALE, WIDTH,HEIGHT
X_OFFSET = 0.0d+00
Y_OFFSET = 0.0d+00
SCALE = 1.0d+00
ans = open_svg@("sample2incleqn.svg",600,900)
CALL SAVE_TEX_SVG_CONVERSION@()
CALL IMPORT_TEX_OBJECT@("ftn95-Tex_ex_1a-NormCumDistrEq.tex",X_OFFSET,Y_OFFSET, SCALE,WIDTH,HEIGHT)
ans = close_svg@(0)
PRINT*, 'SVG image WIDTH = ',WIDTH
PRINT*, 'SVG image HEIGHT = ',HEIGHT
END |
it runs fine without any runtime error.
Note: that the following is part of the output in the DOS window:-
Quote: | processing EPS file
graphic size: 598.235pt x 845.1575pt (210.255556mm x 297.038889mm)
output written to __SVGTEMP.svg
file converted in 0.303 seconds
SVG image WIDTH = -594.000000000
SVG image HEIGHT = -842.000000000 |
which is why I chose a IMPORT_TEX_OBJECT SVG window dimensions of 600 x 900 and zero offsets in the code, so the image fits within the 'SVG surface'
Opening the saved file: __SVGTEMP.svg by double-clicking, it open fine in an internet browser (for me Firefox) and the TEX equation is there.(*)
However, opening it in EditSVG, the SVG blank, white 'drawing surface' is visible, but not the equation.
Opening it with the 'crop' option from the menu produces no image at all not even just the 'blank page' (obviously (?) ... because it has cropped out everything, there being no equation image detected from the __SVGTEMP-svg file !)
The second file created: sample2incleqn.svg created by a simple IMPORT_TEX_OBJECT@ call
this time also shows nothing when double clicked to open it in the internet browser
The same eìwhen opening in EditSVG.
My conclusion is that:
1) there is some problem with Editsvg in reading in the svg file created by IMPORT_TEX_OBJECT
2) there is some problem with the creation of the second svg file: sample2incleqn.svg by IMPORT_TEX_OBJECT@ because it is neither cropped, nor does the equation appear in either an internet browser, nor in EditSVG.
... unless of course I've made a fundamental mistake.
An Observation:-
If you open both .svg files in Notepad you'll see that :-
the __SVGTEMP.svg file has all positive co-ordinates
while in sample2incleqn.svg all the co-ordinates are negative !
I knoweth not if this is significant and an indcation where the problem might be.
So, what am I doing wrong?
John-S
__________________________________
(*) note that I tried also opening it in a number of other SVG programs and it opened fine, albeit in some cases as a 'reversed ' image !
Edit #1 - I forgot the TEX code used with the sample program,.
it's the same as that in the documentation
It's also the code which fails to load within EditSVG via the menu 'OPEN TEX'
Quote: |
\documentclass[12pt]{article}
\usepackage{amsmath,bm}
\pagestyle{empty}
\begin{document}
\Large
\[
\frac{1}{\sigma \sqrt{2\pi}}
\int\limits_{-\infty}^x
\exp -\left\{
\frac{1}{2} \left( \frac{t-\mu}{\sigma} \right)^2 \right\}\,dt
\]
\end{document}
|
_________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... "
Last edited by John-Silver on Fri Aug 23, 2019 2:04 pm; edited 9 times in total |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Fri Aug 23, 2019 7:27 am Post subject: |
|
|
The author is preparing a sample program and I will aim to make it available on this thread. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Fri Aug 23, 2019 10:47 am Post subject: |
|
|
Thank you,
I look forward to David's input.
You mentioned at the end of the other post Paul an example of calling calls EDITSVG_DRIVER routine, and subsequent 'messing about' interactively on the 'collage' rover.
What is more interesting for me would be an example showing how to programatically (not via EditSVG) to place the equation (previously created as a seperate file) precisely on a drawing surface (be it an svg one (or on the screen via a %gr maybe if that's possible?) would be ideal for my application.
Say with a single vertical object (say a square) in the middle of the page and the formula placedto it's left hand side ?
I suspect I'm barking up the 'it's impossible' tree, due to the apparent impossibility to programatically not interactively) crop the image, know it's dimensions, and how to consequntly place it in a precise location, ... but we'll see. _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Sun Aug 25, 2019 11:57 pm Post subject: |
|
|
I tried this example and got totally empty screen. Produced SVG file i do not know how to see, none of my browsers show anything inside this file (Edge, Opera, Chrome, Firefox, Brave).
MicTEX produces image of formula on screen and in pdf file.
Full version of FTN95, June 6 update
/* This might be also because i hate TEX and TEX hates me.
We all have bad habits, this is given by DNA probably. I for example make billions of typos and recompilations. This is possibly why i like FTN95 - i find it smarter than me in cleaning my Fortran sources.
But within SF also exists bad tradition started with the Salford FTN90 in 90th to issue half-cooked software and let users report the bugs and polish its rough edges. Anyone in SF team worked on FTN90 ? This person/people have to pay attention to their bad habit and triple check everything before issuing anything new for consumers. I can also offer quality control via my codes-- send me your new versions and if my codes (which in 30 years with this compiler and 40 years total collect both legacy and new sources and use VAX extensions, something from old DBOS, Clearwin+, OpenGL in their 300 000 lines) are compiled and work OK -- then chances are that all is OK
Last edited by DanRRight on Sun Sep 08, 2019 2:41 am; edited 1 time in total |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Sat Sep 07, 2019 2:01 am Post subject: |
|
|
Gosh I just relisd that we're already 2 weeks down the lin on this thread.
Any feedback from David yet Paul ?
About the specific bugs with Editsvg or with progress on creation of sample programs ? _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Sat Sep 07, 2019 8:35 am Post subject: |
|
|
The authors (whose names I have not mentioned) are still working on this. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Tue Sep 10, 2019 4:13 am Post subject: |
|
|
It would be useful to know from the authors (whoever they might be, and even though you haven't mentioned them) if there's a bug or not with the reading into EditSVG
And also to know what type of example problem(s) they're working on creating (you must be aware of that) so I know if my comments about that are being taken onboard or not, because you initial comment on that particular topic were in a direction at 90 deg. to the one I'm looking to go in, I think. That's not a criticism, I just don't want to 'hang around' waiting for something that might no appear . (I'm sue something very useful will appearwhatever it is).
I won't ask how long it might be before something consequential appears, because clearly we have a piece of string here of indeterminate length (again, that's no criticism of anyone by the way, it's just a fact of life with software) _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Tue Sep 10, 2019 6:49 am Post subject: |
|
|
I suggest that we wait. I don't think that it will be long now. Any extra admin just slows down the development. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Sat Sep 21, 2019 12:15 am Post subject: |
|
|
Here we are, another 2 weeks later .... what news brave bug-basher (that's you Paul) ? _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... "
Last edited by John-Silver on Wed Sep 25, 2019 9:13 pm; edited 1 time in total |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Wed Sep 25, 2019 9:12 pm Post subject: |
|
|
So, what update can you give us please on the status of this then Paul ? _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Tue Oct 01, 2019 10:47 am Post subject: |
|
|
Unfortunately it has proved necessary to make changes to salflibc.dll and clearwin64.dll relating to TEX files. This means that we will need to wait until we have stable versions of these DLLs before providing an update on this topic. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Tue Oct 01, 2019 8:30 pm Post subject: |
|
|
Thanks for the update Paul, I look forwrd to the updates.
Can you give us some brief idea of what the problem was ?
... and what do you men exactly by Stable DLLs release ? a formal update (8.5.2 ?) and will the perso version be updated at same time this time round with these changes in it ?
... and of course the 6 million dollar question ...... when ? _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Thu Dec 12, 2019 8:03 am Post subject: |
|
|
Any update on this subject Paul ? _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Sun Jan 19, 2020 8:34 pm Post subject: |
|
|
I've just seen that v8.6ìwas released as a Hogmanay gift.
Well done Paul for getting out a release which appears to have a lot of new features and the usual bug fixes.
However, I don't see any mention of fixing of the TEX anomalies which were first identified back in August, and which were at the last awaiting a 'stable dlls' release, which is what I'm sure is the case with v8.6 :O).
As th original incolusion was 'experimental' I can understand if there is no announcement as a 'fix', but have things beeen overhauled in v8.6 ?
As a personal user I don't even have acces to the new .enh file to see in detail.
Can that be made available somewhere for info. ?
.... and also the inevitable question ... do personal users have to wait 3 months for v8.6 to 'hit the shops' ? _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Fri Feb 21, 2020 2:25 am Post subject: |
|
|
is that a v8.61 I see before me .... almost 6 months down the line, maybe those 'stable dlls' have now arrived ?
.... to allow an update on the the TEX bug situation ? _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
|