On 2020-08-15 18:42, Daniel wrote:
On 2020-08-15 18:39, Daniel wrote:On 2020-08-15 18:20, Richard Kimberly Heck wrote:On 8/15/20 12:05 PM, Daniel wrote:On 2020-08-15 17:52, Richard Kimberly Heck wrote:On 8/15/20 11:30 AM, Daniel wrote:On 2020-08-15 17:22, Jean-Marc Lasgouttes wrote:Le 15 août 2020 17:09:45 GMT+02:00, Daniel <xraco...@gmx.de> a écrit :On 2020-08-15 16:58, Jean-Marc Lasgouttes wrote:Short answer from my phone : this is not an empty line issue. Thereis a problem reported about space above formula. I have not looked atit yet.Concerning the bullet case, we could handle it like I did the proofbox case. More on that when I return.Okay, I would have thought that both of these problems are handled (and correctly so) if a line (not a paragraph!) before a display formula wasallowed to be empty. Because that seems exactly what LaTeX is doing.-- DanielThe spacing is created by LaTeX, not by the user, if I understand correctly.In LaTeX the user creates the spacing by adding an extra empty line or\item.As JMarc said, I think the problem here is just that LyX doesn't display the extra space about the display formula. Basically, what we have is aparagraph break immediately before the displayed formula. So there is the space for that break in the LaTeX.The space does not take care of the bullet/numbering. An empty line would take care of both problems. If the line contains a character, then LyX does exactly the right thing. So, I thought allowing an empty line in this case would make LyX do exactly the right thing. So, LyX would do this: remove an empty line only if it is empty by current standards *or contains a display formula* (which actually could kindof qualify as non-empty since the line continues with a display formula).The problem is that the following is perfectly valid LaTeX: test test $$a=b$$ And, as a general rule, we want to allow the user to write that in LyX if they want to do so. Or, as people here will sometimes say: Don't try to outsmart the user. This is a pretty fundamental LyX principle---one it took me a while to appreciate---and magically removing empty lines before display formulas violates it. So that's no go. The problem, as I see it, is that it is very easy to write what's above when what you wanted was: test test $$a = b$$ and LyX doesn't give enough indication of this difference. So we either need to display more space or, as you suggest, to display a pilcrow in the former case. The latter is probably not terribly easy to do, though, since the pilcrow would attach to the paragraph before the one in which the displayed formula lives. But maybe there's something else we could display in the space above the displayed equation, just to make it more obvious.I agree. I suggested to add an empty line in LyX not to remove it in the LaTeX output.The LaTeX spacing seems to behave exactly as if an empty line contained a character, i.e. intest test $$a=b$$ and test test x $$a=b$$the spacing between test test and the display formula is exactly the same.The same with \item $$a=b$$ and \item x $$a=b$$ That's why I thought an empty line would be the solution.And adding a special character to the empty line might be easier too. I take back my pilcrow suggestion though because this would be an empty line *without* a paragraph break. Maybe a right pointing arrow or so might be more suitable.Okay, I just noticed another argument for the empty line: If there is an bullet/numbering, it would be odd to show it in the space without the possibility to click right after it to add text to it. Instead one would have to click before the display formula...
In the attached document, I have allowed Freespacing in the Standard and Enumerate styles. With this I can get exactly the result I wold expect in the LyX work area (except that there is a space in the empty lines). And the output is exactly the same (except for Freespacing adding fixed width spaces). Obviously, I am not suggesting that these styles should be made Freespacing but only that the lines should show as empty - although in a way they aren't empty because they continue with a display formula. So, my suggestion might be more accurately described as that
* the beginning of a line that contains a display formula should be in its own row and not mixed with the display formula itself.
-- Daniel
#LyX 2.4 created this file. For more info see https://www.lyx.org/ \lyxformat 598 \begin_document \begin_header \save_transient_properties true \origin unavailable \textclass article \begin_preamble \usepackage{multicol} \end_preamble \use_default_options true \maintain_unincluded_children no \begin_local_layout Style Standard Copystyle Standard Freespacing 1 End Style Enumerate Copystyle Enumerate Freespacing 1 End \end_local_layout \language english \language_package default \inputencoding auto-legacy \fontencoding auto \font_roman "default" "default" \font_sans "default" "default" \font_typewriter "default" "default" \font_math "auto" "auto" \font_default_family default \use_non_tex_fonts false \font_sc false \font_roman_osf false \font_sans_osf false \font_typewriter_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 \use_microtype false \use_dash_ligatures true \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \float_placement class \float_alignment class \paperfontsize default \spacing single \use_hyperref true \pdf_bookmarks true \pdf_bookmarksnumbered false \pdf_bookmarksopen false \pdf_bookmarksopenlevel 1 \pdf_breaklinks false \pdf_pdfborder false \pdf_colorlinks false \pdf_backref false \pdf_pdfusetitle true \papersize default \use_geometry false \use_package amsmath 1 \use_package amssymb 1 \use_package cancel 1 \use_package esint 1 \use_package mathdots 1 \use_package mathtools 1 \use_package mhchem 1 \use_package stackrel 1 \use_package stmaryrd 1 \use_package undertilde 1 \cite_engine basic \cite_engine_type default \biblio_style plain \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \justification false \use_refstyle 1 \use_minted 0 \use_lineno 0 \index Index \shortcut idx \color #008000 \end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \paragraph_indentation default \is_math_indent 1 \math_indentation default \math_numbering_side default \quotes_style english \dynamic_quotes 0 \papercolumns 1 \papersides 1 \paperpagestyle default \tablestyle default \tracking_changes false \output_changes false \change_bars false \postpone_fragile_content false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \docbook_table_output 0 \end_header \begin_body \begin_layout Standard No break after... (same spacing in LyX and LaTeX output) \begin_inset Formula \begin{align*} x \end{align*} \end_inset \end_layout \begin_layout Standard Break after... (different spacing in LyX and LaTeX output) \end_layout \begin_layout Standard \begin_inset Formula \begin{align*} x \end{align*} \end_inset \end_layout \begin_layout Standard With text... (same spacing in LyX and LaTeX output) \end_layout \begin_layout Enumerate Text \begin_inset Formula \begin{align*} x \end{align*} \end_inset \end_layout \begin_layout Standard (Unimportant intermezzo for getting an indented paragraph...) \end_layout \begin_layout Standard Without text... (different spacing in LyX and LaTeX output) \end_layout \begin_layout Enumerate \begin_inset Formula \begin{align*} x \end{align*} \end_inset \end_layout \end_body \end_document
display_math_spacing.pdf
Description: Adobe PDF document
display_math_spacing.23.pdf
Description: Adobe PDF document
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel