Comments (10)
Or actually better, add a
default.yaml
file in the PanWriter User Data Directory, then you can keep the format and it will be previewed correctly. See the PanWriter Manaul
Good tip, I tried it and it works! Thank you very much!
from panwriter.
Can you provide a minimal reproducible example of a markdown document that doesn't work?
from panwriter.
Below is the markdown.
In Firefox, the links are not displayed in light blue because they are overwritten by the default CSS (there are two <style> sections in the HTML). The one from Panwriter has been overwritten.
---
title: Test formating in Panwriter
mainfont: Helvetica, Arial, sans-serif
header-includes: |-
<style>
h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
}
h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code {
font-size: inherit;
}
h1 {
font-size: 24px;
color: #000;
}
h2 {
font-size: 20px;
border-bottom: 1px solid #ccc;
color: #000;
}
h3 {
font-size: 18px;
}
/* LINKS */
a {
color: #4183C4;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
---
# Links Beispiele
- [Google](https://www.google.com)
- [GitHub Panwriter ](https://github.com/mb21/panwriter)
from panwriter.
How do you generate the HTML? With File
-> Save as
or Export
?
they are overwritten by the default CSS (there are two <style> sections in the HTML)
overwritten by which default CSS? from panwriter or pandoc?
In the other issue you wrote:
there should not be an embedded style section in the YAML area of the Markdown, as this overwrites the definitions from default.yaml.
I'm confused. which do you expect to take precedence?
from panwriter.
Sorry for the late response, I was away for a few days.
How do you generate the HTML? With File -> Save as or Export ?
With export.
overwritten by which default CSS? from panwriter or pandoc?
Neither, in the generated HTML there are two style sections one below the other, with partly contradictory definitions for the elements, which different browsers probably interpret differently.
It would be better if there was a CSS template that the user could customize as desired, so that the HTML only contains one style section. This is what MarkdownPad does, for example.
from panwriter.
Okay, now I understand.
which different browsers probably interpret differently.
No, nowadays all browsers behave exactly the same in regards to such basic things.
In Firefox, the links are not displayed in light blue
That's because in your browser you have visited those links, so the a:visited
color applies.
Now, where the two style sections come from. The second is your CSS from the markdown document, the first style is the document-css from pandoc's own template. You can turn it off by adding the following to your markdown document's metadata:
document-css: false
But the idea of this feature was actually that you would only override a few document-specific styles. If you want to change everything, it's probably better to add a ~/Library/Application Support/PanWriterUserData/default.yaml
(or ~/.pandoc/templates/styles.html
) file so that it applies to all your documents.
from panwriter.
But the idea of this feature was actually that you would only override a few document-specific styles. If you want to change everything, it's probably better to add a ~/.pandoc/templates/styles.html file so that it applies to all your documents.
Now I just need to know how the styles.html must be composed ...
from panwriter.
Or actually better, add a default.yaml
file in the PanWriter User Data Directory, then you can keep the format and it will be previewed correctly. See the PanWriter Manaul
from panwriter.
How do you generate the HTML? With
File
->Save as
orExport
?
Hmm, I have just noticed that only .md is available for selection under 'Save as'. Should .html also be available here?
from panwriter.
Hmm, I have just noticed that only .md is available for selection under 'Save as'. Should .html also be available here?
No, .md
is just saving the exact text you currently have in the PanWriter editor while .html
actually needs an export by running it through pandoc.
from panwriter.
Related Issues (20)
- Takes over DOCX default without asking HOT 4
- Feature Requests HOT 1
- Export problem with AppImage 0.8.4 on Linux Slackware HOT 14
- Preview: image width in units other than px are not converted HOT 2
- Linux AppImage: ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process. HOT 4
- White screen on launch HOT 6
- If anybody has time to try to add [markdown-it-highlightjs](https://www.npmjs.com/package/markdown-it-highlightjs) to [markdown-it-pandoc](https://github.com/mb21/markdown-it-pandoc/) without breaking attributes, that would be welcome!
- TOC? HOT 2
- Fonts are ignored in PDF HOT 7
- defaults.yaml in PanWriterUserData partially ignored HOT 1
- Does not compile HOT 2
- Markdown Table Formatting HOT 1
- Feature request: do not force to auto update the application (Mac) HOT 2
- ICML as a target export format HOT 2
- windows 7 HOT 1
- Export to reveal.js HOT 2
- DEV ISSUE: npm ERR! No workspaces found: HOT 4
- Please could we have an Arm Linux package? HOT 4
- default.yaml in "...AppData\Local\PanWriterUserData" is not used HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from panwriter.