Inkscape: A Vector Drawing Tool

latex+pdf export text duplicated

Reported by C. Hintermüller on 2012-02-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Low
Unassigned

Bug Description

When exporting Image with text as latex+pdf the text appears duplicated in latex. One set of text objects is placed on top of the figure as expected. A second copy of all texts is placed top left corner overlapping each other. Im using inkscape 0.48 from ubuntu 10.04 LTS distribution.

I do attache two examples. The first file is the SVG file. The second pdf_tex~ is the file as exported by inkscape and pdf_tex is the one as the figure should appear and the pdf is the exported graphics.

~suv (suv-lp) on 2012-02-26
tags: added: exporting latex
~suv (suv-lp) wrote :

Your zip archive only includes one SVG exmaple: "MessKette.svg". Taking a closer look at this SVG files reveals:
The second copies of most of the text objects are actually _in_ the SVG file (inside nested groups with one of them having fill and stroke set to 'None' (see attached modified version which has the invisible text (fill: None) made visible.

SVG snippet of such an invisible text:
    <g
       transform="matrix(0.03537273,0,0,0.03537273,0.26645914,891.84749)"
       style="fill-rule:evenodd;visibility:visible"
       id="g4281">
      <desc
         id="desc4283">Drawing</desc>
      <g
         id="g4285">
        <g
           style="fill:none;stroke:none"
           id="g4287">
          <rect
             x="-14"
             y="-14"
             width="1820"
             height="758"
             id="rect4289" />
        </g>
        <g
           id="g4291">
          <g
             style="font-size:353px;font-weight:400;font-family:Liberation Sans embedded"
             id="g4293">
            <g
               style="fill:none;stroke:none"
               id="g4295">
              <text
                 id="text4297">
                <tspan
                   x="250 525 720 915 991 1067"
                   y="443"
                   id="tspan4299">Quelle</tspan>
              </text>
            </g>
          </g>
        </g>
      </g>
    </g>

~suv (suv-lp) wrote :

I'm not familiar with LaTex myself, and don't know how these two objects (with regard to color and visibility) are supposed to be rendered:

    \put(0.00082213,0.25234136){\makebox(0,0)[lb]{\smash{Quelle}}}%
    \put(0.01660131,0.22826158){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{Quelle}}}%

The first one is obviously the one inheriting the SVG fill style 'none' from a parent group, the second one has its fill color explicitly set to black in the SVG (fill:#000000).

Am Sonntag 26 Februar 2012, 02:09:16 schrieben Sie:
> Your zip archive only includes one SVG exmaple: "MessKette.svg". Taking a
> closer look at this SVG files reveals: The second copies of most of the
> text objects are actually _in_ the SVG file (inside nested groups with one
> of them having fill and stroke set to 'None' (see attached modified
> version which has the invisible text (fill: None) made visible.
>
Thank you very much. Is there a possibility to make this invisible texts
visible within inkscape without editing the SVG to be able to delete them.

Christoph

> SVG snippet of such an invisible text:
> <g
> transform="matrix(0.03537273,0,0,0.03537273,0.26645914,891.84749)"
> style="fill-rule:evenodd;visibility:visible"
> id="g4281">
> <desc
> id="desc4283">Drawing</desc>
> <g
> id="g4285">
> <g
> style="fill:none;stroke:none"
> id="g4287">
> <rect
> x="-14"
> y="-14"
> width="1820"
> height="758"
> id="rect4289" />
> </g>
> <g
> id="g4291">
> <g
> style="font-size:353px;font-weight:400;font-family:Liberation
> Sans embedded" id="g4293">
> <g
> style="fill:none;stroke:none"
> id="g4295">
> <text
> id="text4297">
> <tspan
> x="250 525 720 915 991 1067"
> y="443"
> id="tspan4299">Quelle</tspan>
> </text>
> </g>
> </g>
> </g>
> </g>
> </g>
>
>
> ** Attachment added:
> "MessKette-doubled-text-with-no-fill-made-visible-1.svg"
> https://bugs.launchpad.net/inkscape/+bug/941174/+attachment/2783745/+files
> /MessKette-doubled-text-with-no-fill-made-visible-1.svg

C. Hintermüller (nothere) wrote :

Hi
I have found it meanwhile my self. Just select everything and define the color
of the stroke. And the ghost characters become visible. By the way. These
images were exported from Open Office Draw. So it seems that their SVG exporter
is either broken or users an SVG specification which is incompatible to
inkscape. However from my point the problem is solved and the report can be
marked as solved and closed.
thank you for your help

Christoph

~suv (suv-lp) wrote :

As discussed with Johan on irc, setting bug status to 'Confirmed':

> |20:41| < johan_e> the pdf+tex exporter does not know about "style = none"
> |20:41| < johan_e> because the exporter does not know about it, it exports it anyway, hence visible in tex

The second question by the reporter:
> Is there a possibility to make this invisible texts
> visible within inkscape

reveals a bug in outline view mode in Inkscape stable and trunk: normally, invisible objects due to fill and stroke set to 'None' are visible and selectable in outline view mode (menu 'View > Display Mode > Outline'). This unexpectedly does not apply to text objects with fill and stroke set to 'None' (be it by an explicit style attribute of the text, or by an inherited style of the parent container (group).

Due to this bug (not related to the latex export), it is not possible to quickly detect such invisible text objects by switching to outline mode (see attached reduced test case).

The bug in outline view mode should be filed and tracked separately.

Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
~suv (suv-lp) wrote :

Follow-up report filed as
Bug #941597 “Text objects with fill and stroke 'None' are invisible in outline mode”
<https://bugs.launchpad.net/inkscape/+bug/941597>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers