[Paraview] exporting selection labels to an SVG as editable/movable text-objects

David Lonie david.lonie at kitware.com
Fri Jan 23 09:22:22 EST 2015


>
> On 23/01/15 11:44, Dr. Roman Grothausmann wrote:
>
>> Hi Dave,
>>
>>
>> Again some issues concerning this old topic:
>> On 22/05/14 14:11, David Lonie wrote:
>>
>>> On Thu, May 22, 2014 at 6:22 AM, Dr. Roman Grothausmann
>>> <grothausmann.roman at mh-hannover.de> wrote:
>>>
>>>> Many thanks for fixing the Label exporter issue. It does work with 4.1
>>>> to
>>>> get the text exported into e.g. an SVG. However, the text is always
>>>> rendered
>>>> as paths (always consists of triangles). Is it also possible to have the
>>>> text being exported as actual text-fields (like e.g. gnuplot does) that
>>>> can
>>>> be edited with the text-tool in e.g. inkscape?
>>>>
>>>
>>> There is an checkbox in the export options "Render text as paths" (see
>>> http://www.kitware.com/blog/home/post/508 ). It's enabled by default
>>> for portability, but disabling this option should do what you need.
>>>
>>
>> Exporting selection labels as text ("Render text as paths" not checked)
>> works
>> for me with PV-4.1.0. However, PV-4.1.0 does not allow one to specify the
>> formatting, like printf formats as: %.2f\circ.
>> PV-4.3.1 does allow one to specify the formatting, however whether
>> "Render text
>> as paths" is checked or not, the output SVG does not contain any
>> text-tags any
>> more, that would allow editing in inkscape or text setting by latex.
>>
>> Did Your changes get lost/reverted?
>>
>> I tried to find the commits that made it possible for PV-4.1 but could
>> not find
>> them in the git logs:
>> http://www.paraview.org/gitweb?p=ParaView.git&a=
>> search&h=HEAD&st=commit&s=gl2ps
>> It seems the bug number 14231 was never mentioned in the commit messages.
>>
>> What is the general procedure to find the right commits in such a case?
>>
>
The commit that made the change is in VTK, not ParaView (the histories are
stored in separate repositories):

http://www.vtk.org/gitweb?p=VTK.git;a=commit;h=78d211edd3aa7d8019bc83b562166d957feec656

On Fri, Jan 23, 2015 at 6:51 AM, Dr. Roman Grothausmann <
grothausmann.roman at mh-hannover.de> wrote:

> I just noticed that the problem only occurs if a $ (as needed for latex
> math) is used in the format string, e.g. $%.2f^\circ$. If I remove the $
> signs the text IS exported with text-tags.
> Does the $ sign have a special meaning here in PV?
>

The issue here is that the MathText is not like regular text -- regular
text can go directly into the vector document with a reasonable expectation
that it will be rendered properly by the viewer. Some of the more complex
mathematical expressions MathText is capable of rendering cannot be encoded
as pure text in the document.

So any strings that contain MathText expressions (e.g. those containing a
pair of unescaped $ characters) will always be rendered as a path, since we
know that these will always come out correctly.

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150123/fabd49f5/attachment.html>


More information about the ParaView mailing list