Starting new environment in the middle of a line
Scott Kostyshak
scott.kostyshak at gmail.com
Wed Nov 9 17:16:07 UTC 2022
Sometimes (but not too often), I want to start an environment in the middle of a line.
In LaTeX, it seems to work fine, although I don't know if this is considered bad practice. But in LyX, we can only start an environment at the beginning of a paragraph I believe.
Attached is an example in LyX that uses ERT. I haven't actually implemented this environment in LyX yet (I'm still planning to). Sometimes I can use the \uncover command, but other times I prefer an environment.
I also attach an example .tex file with an environment that is implemented in LyX (block). I attach the example as a .tex file (example-block.tex), and the imported .lyx file (example-block-imported.23.lyx). LyX makes a paragraph break and then nests the environment. This causes a linebreak that I don't want in the corresponding PDF.
Am I missing a way to accomplish this in LyX without ERT?
Are there common use cases for wanting to start an environment in the middle of a line?
If we did want to allow this operation in LyX, I wonder if we could make a "visual-only line-break" that is a no-op LaTeX. i.e., LyX would paint it as a line break but would not output a line break to LaTeX. We would have to think of a way to show this "just kidding line break" visually. But would there be support for this?
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example-uncoverenv.23.lyx
Type: application/x-lyx
Size: 2381 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20221109/7f0c8baa/attachment-0002.lyx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example-block.tex
Type: text/x-tex
Size: 978 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20221109/7f0c8baa/attachment-0001.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example-block-imported.23.lyx
Type: application/x-lyx
Size: 2766 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20221109/7f0c8baa/attachment-0003.lyx>
More information about the lyx-devel
mailing list