On 10/28/2018 3:36 PM, Pol wrote:

Hi all,
​I don't know  if this a lyx software issue or a tikz programming issue (i
am
rather new to tikz)

I would like to lower a bit the circle in the 'in line' command:

 \tikz \draw (0,-9pt) circle (4pt);

so that the circle appear shifted a little lower, with respect to the text
line it is in.
​inserting the latex command:

\tikz \draw (0,-9pt) circle (4pt);

​obtains:
1 - ​the ​picture​​,​ on the lyx display​,​ effectively shifted downward, but
its lower part has been cut away.​ I would have a full circle in the text
line.
​
​2 - T​he picture appears unmoved, in the pdf rendering

Any comments will be appreciated

thank you

paolo m.



Hello,

It seems like, inline tikz figures ignores the white spaces around the figure. 
So, even if you shift the figure, you will not see a change in the PDF. To fix 
that you can use "baseline" as in:

\tikz[baseline]{\draw (0,0pt) circle (4pt);}

This seems to glue the 0,0 center point to the baseline.

See the SE query at

https://tex.stackexchange.com/questions/416226/move-an-inline-tikz-node-vertically-to-align-with-baseline-of-surrounding-text

I think this may help with your PDF output.

When it comes to LyX rendering, I don't think you should expect too much from 
LyX. As far as I know, the "Instant Preview" option is not intended to show the 
perfect PDF output. Maybe it needs an adjustment with the inline Tikz figures. 
You can report this issue to the developers, if you wish.

Baris

Attachment: test-inline-tikz-new.lyx
Description: test-inline-tikz-new.lyx

Reply via email to