cakebake / markdown-themeable-pdf

ARCHIVED. NOT MAINTAINED. Themeable Markdown Converter (Print to PDF, HTML, JPEG or PNG)
https://atom.io/packages/markdown-themeable-pdf
133 stars 37 forks source link

Request: Per Project style.css/header.js/footer.js #8

Closed tairun closed 9 years ago

tairun commented 9 years ago

I would like to use different styles, headers and footers for every project. My suggestion is, to look for these files in the project root, if they exist - use these - otherwise use global defaults.

Thank you by the way for this awesome project. Its easy to use and very fast.

cakebake commented 9 years ago

Hmm, good Idea... I will think about it :)

cakebake commented 9 years ago

Can you describe to me briefly your advantage?

What's better to create in each project the footer, header and style, than changing in the plugin settings the path to this files? The latter is already possible. :) Generally I find the idea interesting.

tairun commented 9 years ago

Okay, here are my 2 cents. Firstly I think having to open the settings page and search for the package and write out the path to the file is a bit tedious (since there is no file picker at the moment). Secondly if you switch branch or project the alternate headings would already be in place, that speeds up the workflow. For the third point: I use atom-sync-settings and different OS's. The path specified for the one OS wouldn't work with the other. Relative paths however could solve this problem and be implemented on the package side.

And by the way - couldn't you put header and footer into one file (could probably dump the styles in this one too)? You could save a file-read like this.

module.exports = function () {
    return {
          header {
            height: '2cm',
            contents: 'This is the header'
          }
          footer {
            height: '1cm',
            contents: 'This is the footer'
          }
    };
cakebake commented 9 years ago

To improve the workflow, I refer to your idea. Query whether css, header and footer in the current project root are found. For simplicity I also use a directory ./markdown-themeable-pdf/* to contain the custom pdf settings.

For my purposes, it is actually easier if headers and footers are in separate files. That should make no problems. :)

tairun commented 9 years ago

Thank you. I think using the same seperate folder as for global config is a good idea. :-)

cakebake commented 9 years ago

@tairun Can you try that once?

Must also rewrite the documentation ...

tairun commented 9 years ago

@cakebake Do you want me to pull 0b8f28c and testdrive? (Sidenote, I don't know how to install packages outside of atom)

tairun commented 9 years ago

Okay nevermind, the update just showed in atom.

tairun commented 9 years ago

Changes in the header and footer file don't seem to carry over to the pdf (from global and local header and footer files). Need to do more testing on this one. But I got an error while updating (or reinstalling the package). There seems to be a missing backslash in joined paths: See picture below (Bremse is my username) markdown-themeable-pdf-error

cakebake commented 9 years ago

I will test it again with a clean installation... Thank´s for fast response

cakebake commented 9 years ago

Oh, I think you must only restart atom after updating markdown-themeable-pdf...

The wrong path is only a display issue by atom notifications...

unbenannt-1

tairun commented 9 years ago

Sorry that's embarrassing. Did not think of that. :+1: Now its working like a charm!

cakebake commented 9 years ago

Great, as it should be :)