manuskript icon indicating copy to clipboard operation
manuskript copied to clipboard

"Indent 1st line" doesn't work once compiled

Open bnichs opened this issue 3 years ago • 5 comments

Hi there,

I've found that when I set "indent 1st line" in the manuskript settings[1] it works fine in the editor, but the compiled document never gets the option[2][3] and I don't see a way to get it working. Even manually inserting tabs causes the formatting to put the whole paragraph on one line[4][5] so It's seeming like there's no way to get a compiled document with first line indented. Doesn't work when outputting at html, plain, and pdf.

Is there any way to indent first line in the compiled doc?

Thanks!

Version 0.12.0 [5]

1: Options set: manuskript-options

2: 1st line working in the editor: manuskript-first-line

3: Compiled without first line working: manuskript-out

4: With manual tab in editor manuskript-with-tab

5: With manual tab when compiled manuskript-with-tabs-out

5: My versions:

Hardware: x86_64 / x86_64
Running from unpackaged source code.
* sys.executable = '/usr/bin/python3'
* sys.argv = ['/usr/bin/manuskript']
* sys.path = ['/usr/bin',
 '/usr/share/manuskript/',
 '/usr/lib/python39.zip',
 '/usr/lib/python3.9',
 '/usr/lib/python3.9/lib-dynload',
 '/home/ben/.local/lib/python3.9/site-packages',
 '/usr/local/lib/python3.9/dist-packages',
 '/usr/lib/python3/dist-packages']
* sys.prefix = '/usr'
Manuskript 0.12.0 (Python 3.9.5)
* PyQt 5.15.4 (compiled against Qt 5.15.2)
  * Qt 5.15.2 (runtime)
* lxml.etree 4.6.3.0
  * libxml   2.9.10 (compiled: 2.9.10)
  * libxslt  1.1.34 (compiled: 1.1.34)
* pyEnchant 3.2.0 (libenchant: 2.2.15)
* pySpellChecker N/A
* Symspellpy N/A
* Markdown 3.3.4
Web rendering engine: QtWebKit
Preferred translation: ['en-US'] (based on available ui languages)
Using the builtin translation. (U.S. English)
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.21.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.21.04, mixed mode, sharing)
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.21.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.21.04, mixed mode, sharing)

bnichs avatar Jan 02 '22 17:01 bnichs

I assume the indentation setting was added for the editor only once but I agree it can be confusing that way. I guess this could be kept in mind to solve issue #913.

TheJackiMonster avatar Jan 02 '22 22:01 TheJackiMonster

We might be able to solve this with some inline html like this: https://stackoverflow.com/questions/6046263/how-to-indent-a-few-lines-in-markdown-markup

If we put the nbsp into the exported markdown I think pandoc will do the rest for us. We could trigger off the editor option.

jdanielp avatar Jan 30 '22 05:01 jdanielp

We just have to make sure to allow both options. Like I mentioned the option was probably designed as visual feature only (for the editor itself, not for the exported document).

So there might users expecting the setting not to interfere with their exported documents using it already even if it's not intuitive.

TheJackiMonster avatar Jan 31 '22 20:01 TheJackiMonster

  1. Definitely +1 for separation of concerns between formatting in the editor (I might want courier with blank lines between paragraphs) and in the compilation target(s) (no blank lines between paragraphs, but with indentation of pragraphs, perhaps), where different options might be applicable also to epub, and others for pdf, etc.
  2. The indentation of the paragraph is best achieved via css in epub (i.e. editing in Sigil), usually by applying a css class to the line in html, and applying text-indent: 1.2em or whatever value is preffered. For PDF I suppose there is a LaTeX alternative, etc. etc.

So... that makes it hard and would have to be implemented for each compilation target in the options, and perhaps all in different ways. I wonder how people do this now? My approach would be to edit html or epub output in Sigil, and perhaps do pdf via a markdown export from Manuskript + editing + pandoc or panwrite conversion.

victorkane avatar Apr 01 '22 13:04 victorkane

Manuskript is using pandoc for generating all kinds of formats, so if you need a preferred Layout, you must say pandoc what you want.

Or you are working with an in between format, like odt and use a Master document for the formatting. So you only must change the formatting of the document, when you change your Layout!

The documentation of pandoc is found here: https://pandoc.org/MANUAL.html#templates

Regards

obw avatar Apr 02 '22 09:04 obw