Stop converting tabs into spaces?

I use tabs often but my Bear 2 beta app turns them into spaces which is a stylistic thing I disagree with. This also creates an unintentional code block when I’m trying to just write a normal paragraph. I looked in settings but couldn’t find anything about this?

edit: I guess the editor only turns tabs into spaces at the start of a new paragraph. It doesn’t change them into spaces if done between words for example. This is only useful in the context of a code block maybe; even then it should be optional as I for one program with tabs not spaces.

One tab or 4 spaces at the beginning of lines (except when nesting lists), is an alternative one-liner code block tag in Markdown specifications, including CommonMark that now is implemented in Bear 2.0.

Think Tabs are disallowed in most Markdown specifications…

1 Like

So indenting a paragraph is impossible?

Yes, I believe so. Since it is markdown, a new paragraph is always two returns (blank line between paragraphs)

Since bear is not WYSIWYG, fonts and themes you choose for the editor is “for your eyes only”, to make a pleasant writing experience, but has no effect on print and export to PDF etc.

Indented, book style paragraphs and other stylistic changes, are usually taken care of by different style sheets applied on export and print. But at the moment, Bear has only one such style sheet, and no option for book style indented paragraphs.

I’m currently working on an Apple Shortcut that takes care of that and let’s you override default CSS styles on export.

It has the following features that overrides some aspects of Bear’s default but otherwise very excellent and elaborate CSS:

Currently used in example below (but custom configurable):

  1. Book style indented paragraphs, without blank lines in between.
  2. Serif font and 13pt size for paragraphs
  3. Center heading H1 and H2, italicized H3
  4. 3pt margins added between list elements
  5. Center images, (image sizes are already taken care of by Bears excellent default style sheet.
  6. A4 page size with page numbers. Yes! Achieved by inserted JavaScript :nerd_face:
  7. Preview and print from any browser on Mac and select browsers on iPad

See sample screen shots belowm
(from Edge on iPad opened via Textastic):

1 Like

How would you go on and modify the CSS of PDF exports in the first place? If you don’t mind to elaborate, sounds super interesting.

It’s actually a html export where I add custom CSS to override some of the default values.

At the end of the shortcut, it opens in default browser and you print or save as PDF from there. Works very well on Mac, but a bit finicky on iOS/iPad.

There it opens in Textastic, do preview there and open doc in default browser from there with Textastic as local webserver.

Print or save as PDF from browser,

Page size, margins and pagination is done by special javascript included…

1 Like

Well here is the shortcut that i put together over the last couple of days.

This is an early private beta, and please test it out, play with it, improve it, fix it, or just trash it if it doesn’t work for you :wink:

Bear Custom Formatted Print - Shortcuts


Ahh okay that’s very clever. Thanks for sharing.