Re: Render inkscape text with latex

2015-12-03 Thread Rajil Saraswat
On Dec 2, 2015 1:55 PM, "David"  wrote:
>
> Am 02.12.2015 um 20:30 schrieb Daniel CLEMENT:
> > Le mardi 01 décembre 2015 à 13:27 -0600, Rajil Saraswat a écrit :
> >> Hello,
> >>
> >> I want the text used in svg images to be rendered using latex.
> >> Inkscape provides instructions at
> >> http://wiki.inkscape.org/wiki/index.php/LaTeX on how to do this with
> >> Lyx. However this uses ERT and one loses the capability of seeing
> >> previews within Lyx.
> >>
> >> Is it possible to modify the SVG convertor with lyx to automatically
> >> carry out the steps given on the inkscape wiki mentioned above?
> >>
> >> Thanks
> > Hi,
> >
> > The solution described in the wiki is very elaborate, but have you
> > noticed the tiny link to the "textext" extension for Inkscape?
> >
> > I find it very helpful for writing TeX formulas into Inkscape. In
> > particular, you can use whatever preamble file you want within textext,
> > e.g. to specify a given font. Real easy to use. You might want to give
> > it a try.
>
> I also like to use Textext for my Inkscape figures. One should mention,
> however, that the Latex rendered with Textext looks a tiny bit thicker
> in the PDF output than "normal" pdflatex rendered Latex.
>

Thanks for these inputs. I have found that the 0.91 version of Inkscape
cuts off the data in the pdf and produces a multi page pdf from a single
page when exporting using PDF+Latex. This bug isn't present in 0.48 release
of Inkscape.


Re: Render inkscape text with latex

2015-12-03 Thread Georg Baum
Rajil Saraswat wrote:

> Hello,
> 
> I want the text used in svg images to be rendered using latex.
> Inkscape provides instructions at
> http://wiki.inkscape.org/wiki/index.php/LaTeX on how to do this with
> Lyx. However this uses ERT and one loses the capability of seeing
> previews within Lyx.
> 
> Is it possible to modify the SVG convertor with lyx to automatically
> carry out the steps given on the inkscape wiki mentioned above?

Yes. LyX has so-called external templates, they are documented in the 
Customization Manual. Unfortunately they are not so easy to understand if 
one is not used to theem, but there is already a template which does the 
equivalent of what you want for Xfig figures.

You can define an inkscape template without modifying the LyX source code. 
If you do, it would be nice if you could contribute it. If you do not want 
to have ago yourself, please file an enhancement request at 
http://www.lyx.org/trac/wiki/BugTrackerHome (if none exists alreeady).


Georg




Re: Render inkscape text with latex

2015-12-02 Thread David
Am 02.12.2015 um 20:30 schrieb Daniel CLEMENT:
> Le mardi 01 décembre 2015 à 13:27 -0600, Rajil Saraswat a écrit :
>> Hello,
>>
>> I want the text used in svg images to be rendered using latex.
>> Inkscape provides instructions at
>> http://wiki.inkscape.org/wiki/index.php/LaTeX on how to do this with
>> Lyx. However this uses ERT and one loses the capability of seeing
>> previews within Lyx.
>>
>> Is it possible to modify the SVG convertor with lyx to automatically
>> carry out the steps given on the inkscape wiki mentioned above?
>>
>> Thanks
> Hi,
> 
> The solution described in the wiki is very elaborate, but have you
> noticed the tiny link to the "textext" extension for Inkscape?
> 
> I find it very helpful for writing TeX formulas into Inkscape. In
> particular, you can use whatever preamble file you want within textext,
> e.g. to specify a given font. Real easy to use. You might want to give
> it a try.

I also like to use Textext for my Inkscape figures. One should mention,
however, that the Latex rendered with Textext looks a tiny bit thicker
in the PDF output than "normal" pdflatex rendered Latex.



Re: Render inkscape text with latex

2015-12-02 Thread Daniel CLEMENT
Le mardi 01 décembre 2015 à 13:27 -0600, Rajil Saraswat a écrit :
> Hello,
> 
> I want the text used in svg images to be rendered using latex.
> Inkscape provides instructions at
> http://wiki.inkscape.org/wiki/index.php/LaTeX on how to do this with
> Lyx. However this uses ERT and one loses the capability of seeing
> previews within Lyx.
> 
> Is it possible to modify the SVG convertor with lyx to automatically
> carry out the steps given on the inkscape wiki mentioned above?
> 
> Thanks
Hi,

The solution described in the wiki is very elaborate, but have you
noticed the tiny link to the "textext" extension for Inkscape?

I find it very helpful for writing TeX formulas into Inkscape. In
particular, you can use whatever preamble file you want within textext,
e.g. to specify a given font. Real easy to use. You might want to give
it a try.

HTH, Daniel 
-- 
Daniel CLEMENT



Re: Render inkscape text with latex

2015-12-02 Thread David
Am 01.12.2015 um 20:27 schrieb Rajil Saraswat:
> Hello,
> 
> I want the text used in svg images to be rendered using latex.
> Inkscape provides instructions at
> http://wiki.inkscape.org/wiki/index.php/LaTeX on how to do this with
> Lyx. However this uses ERT and one loses the capability of seeing
> previews within Lyx.
> 
> Is it possible to modify the SVG convertor with lyx to automatically
> carry out the steps given on the inkscape wiki mentioned above?
> 
> Thanks
> 

Hi Rajil,

instead of pasting the code

\centering
\def\svgwidth{\columnwidth}
\input{exampleIFS.pdf_tex}

into an ERT you can also just include the your_drawing.pdf_tex file as a
child document. I have tested the following successfully:

*) Inkscape: save your drawing as PDF with PDF+Latex checked
*) Lyx: create a figure float, then inside the float got to Insert >
File > Child document... and choose the your_drawing.pdf_tex file. From
the pull down choose "Input" (important!) and check the "Show preview"
box. Press OK.
*) Due to a bug (http://www.lyx.org/trac/ticket/9786) the preview is not
rendered immediately. Thus, you have to close and reopen your lyx
document to get the preview rendered for the first time. But then,
voilà, see the screenshot attached. (Note, that I deactivated the
mathdesign package as I don't have it installed)

The cool thing: you can now change the Inkscape document, save it as
PDF+Latex and the preview in Lyx gets updated instantly.

To implement the \centering command put your cursor next to the drawing
in Lyx, press the right mouse button, choose Paragraph settings... and
then Alignment > Center

To change the width of the drawing (\def\svgwidth{\columnwidth} scales
it to the width of the column) you have three options:
*) Edit your_drawing.pdf_tex by putting \def\svgwidth{...} in its first
line. Drawback: will be overwritten with the next PDF+Latex export from
Inkscape
*) put \def\svgwidth{...} in an ERT box just before the drawing (This
won't affect the preview)
*) Scale it to the desired size in Inkscape

For a whole different approach, you should check out the TexText plugin
for Inkscape: https://bitbucket.org/pv/textext
It renders Latex text/formulas inside Inkscape and converts them to SVG

David




Render inkscape text with latex

2015-12-01 Thread Rajil Saraswat
Hello,

I want the text used in svg images to be rendered using latex.
Inkscape provides instructions at
http://wiki.inkscape.org/wiki/index.php/LaTeX on how to do this with
Lyx. However this uses ERT and one loses the capability of seeing
previews within Lyx.

Is it possible to modify the SVG convertor with lyx to automatically
carry out the steps given on the inkscape wiki mentioned above?

Thanks