picture environment
Joe Babb
jsbabb52 at gmail.com
Sat Jan 16 17:56:35 UTC 2021
Thanks for all the recommendations. For what I want to do at this time,
which is very simple, I think the picture environment will work okay.
I tried the diagrams.net and it was very simple to draw my block diagram,
but when saved as pdf it did not want to import into Lyx. I saved it as
svg and
looked at in my my Rhino3D drawing program and found it to be huge and had
to scale it way way down. I think that eventually I'll want to try
Tikz/pgf and I looked into it and realize that there is a learning curve.
So I'll stick with simple for now. In fact, I think I'm going to go back
to plain old Latex that I used several years ago. I feel like I can know
what's going on better.
Incidentally, I don't have a good understanding of how this group works so
I hope I'm responding in a good way. My apologies if not. I seem to be
getting messages about other issues that I'm not interested in also.
Joe
On Sat, Jan 16, 2021 at 8:17 AM Baris Erkus <bariserkus at hotmail.com> wrote:
> On 15-Jan-21 9:21 PM, Joe Babb wrote:
>
> I am trying to use Lyx to document some math and electronics and I need to
> place a block diagram into my document. I can draw the diagram in a
> separate program and insert the jpg into Lyx, but what I'd rather do is
> draw it directly in Lyx and be able to place Greek characters in each box.
> I used to use Latex years ago and have the fourth edition of Guide to
> Latex which talks about the picture environment. But I find no picture
> environment in Lyx. I read on the Internet about typing an M-x somewhere
> to get to insert commands directly but can't get that to work. I keep
> wanting to work in the code preview pane to insert Latex code directly but
> can't. Is it possible at all in Lyx to to a block diagram?
> thanks,
> Joe
>
> Normally, you can insert any LaTeX code (including picture environment)
> using Ctrl-L or Insert -> TeX Code. This is called "ERT" in LyX AFAIK.
>
> Since you want to write your code for graphics, I would recommend Tikz/pgf
> for general sketches, instead of the old-school picture environment. Of
> course, Some other WYSIWYG tools maybe more faster to generate some
> specific graphics (e.g. the type of diagrams you want in your document)
> without LaTeX coding, but I find Tikz quite powerful to invest in.
>
> CTAN says "PGF is a macro package for creating graphics. It is platform-
> and format-independent and works together with the most important TEX
> backend drivers, including pdfTEX and dvips. It comes with a user-friendly
> syntax layer called TikZ"
>
> So, inclusion of LaTeX math is straightforward in Tikz, while other tools
> may need some tricks to get full benefits of LaTeX. Tikz has some many
> packages, maybe one of them is good for your diagrams. Please look at the
> Pgf/Tikz manual.
>
> One recommendation here tough: Do not write your graphics code in LyX.
> Generate it outside with regular LaTeX, and save your image as PDF. Then,
> include the PDF into the LyX as figure. The issue with including the
> graphics code in LyX is that, compilation times will get longer, and it
> would be difficult to find the errors in your code as you have more
> graphics and you have more text. Moreover, you will find out that the ERT
> coding environment is not very user friendly as your figure gets
> complicated, as it was not intended to develop code in there. I have done
> this before, and I have found myself testing the code with LaTeX outside
> LyX to find the errors. Therefore, LaTeX editors are better for this
> purpose (e.g. TeXmaker, TeXstudio, even Notepad++).
>
> If you want to give a try, I have attached two files: one for the figure
> and the other one is for the settings. Compile sample.tex with latex and
> you have your figure as PDF, ready to insert into LyX.
>
> --
> ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
> Please bottom-post. Start your reply here:
>
> --
> lyx-users mailing list
> lyx-users at lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20210116/0e810b7f/attachment.html>
More information about the lyx-users
mailing list