https://bugs.documentfoundation.org/show_bug.cgi?id=148025 is marked as a
duplicate but it needs confirming and changing to related because nearly
all of the assertions in #66181 are wrong, and the bugs have a different
Pasting the selection from https://pdf-xchange.eu/ will contain the
required blank lines *if* it is written in the pdf. LibreOffice does not
write blank lines in the pdf.
Please understand this is a two-part fix:
1) Tweak LibreOffice pdf to write blank lines -
2) User must view pdf in software that captures pdf layout
Adobe Acrobat only captures text, not layout. Maintainers of pdf viewer
software generally consider this is all that is required but I note the
viewers often offer features not found in Acrobat.
The only reason to use a pdf editor is they must capture layout to be
functional but they generally don't have the best interface for viewing pdf
files. For example, LibreOffice is not the software of choice to view pdf
files. https://pdf-xchange.eu/ has an acceptable interface.
See attached XpdfReader screenshot showing selection. Ideally, a freely
available pdf viewer can be found or tweaked to capture that selection into
the clipboard rather than stripping leading/trailing spaces and blank lines.
In relation to link to code in the guide, the main point is to demonstrate
it is not consistent. That code is not colorized, code is not indented in
that chapter, and it's published. I don't agree the Andrew Pitonyak
extension works given it has, for example, highlighted keywords in part of
python macro names. It needs more customisation.
Indented code blocks are a potential complication that could be overcome
by formatting it left-aligned.
I raised this issue because I foresee indented code blocks will be a
problem using copy/paste from pdf with layout. I suggest code blocks
shouldn't be indented so any indents are part of the code layout,
especially since code style is inconsistent throughout the guides.