Bear Custom Formatted Print - Apple shortcut
Customize Bear print, HTML and PDF production with this Apple Shortcut:
Bear Custom Formatted Print & PDF - v.1.7 - Shortcut
See updated description below!
Customize Bear print, HTML and PDF production with this Apple Shortcut:
Bear Custom Formatted Print & PDF - v.1.7 - Shortcut
See updated description below!
Updated: Mar 10, 2024 at 10:56 EDT
Customize Bear print, HTML and PDF production with Apple Shortcut
Download and install: Bear Custom Formatted Print & PDF - v.1.7 - Shortcut
3 Sample Sheets are included in Shortcut and can be run as is.
---
divider./*** My additions ***/
, where you can override Bear’s default export style, using keyword !important;
to ensure override “sticks”.The three sample stylesheets are saved to folder: “iCloud/Shortcuts/CSS for Bear Print PDF/”
only first time the shortcut is run!
After that, modify the .CSS files directly in that folder to suit your needs.
If you want to restore the original samples: Temporarily move all files in “iCloud/Shortcuts/CSS for Bear Print PDF/” to a subfolder (so that root is empty of files), and they will be restored on next run
Page formatting and page nubering is done by included javascript:
Paged.js — How to use Paged.js
/*** Special Section setting: page size, page numbering, ***/
/*** and page breaks; used by included JavaScript ***/
/*** (script added to output file by shortcut) ***/
@media print {
@page {
size: letter;
margin-top: 20mm;
margin-right: 10mm;
margin-bottom: 20mm;
margin-left: 10mm;
@bottom-center {
content: counter(page);
}
}
h1 {break-before: page;}
/* h2 {break-before: page;} */
hr {
/* Using Bear's --- divider */
break-after: page;
visibility: hidden;
}
Thanks for this!
I have a question: when using Bear Default Style CSS, anything I type in square brackets starting with a capital letter loses that capitalization.
I.e. [Foo] prints as [foo].
Since I am using square brackets for academic citations, that doesn’t work well since the names of all cited authors are printed in lower case.
How can I change this behavior, please? I am a total CSS noob.
Thank you for your kind attention.
Additional trial and error shows that Bear does this by default when exporting to HTML regardless of whether I use the Shortcut provided here.
Try to escape the [ with \ (back-slash):
\[Foo]
This should solve your issue