I want to use RapidWeaver 8 to teach some coding and for that I need to display blocks of code. (The subject is FPGA design using Verilog)
I thought the markdown plugin might be the ideal way to go, but I’m having trouble getting it to look right. In particular, I need blockquotes to look boring and tidy with a courier font for even spacing.
The 1st screen shot is what I want.
The 2nd screen shot is what I get with the “Engineer” Theme. Way wrong!
The 3rd screen shot is using the “Mountain” Theme. A bit better, but still not usable.
How do I control the way the markdown plugin displays? (The manual didn’t have much to say about markdown.)
Any suggestions as to how to achieve a style that is appropriate for teaching Verilog code?
Thanks in advance,
What I want:
What I get with Engineer:
What I get with Mountain:
Markdown has been invented to make writing prose easier (within html realm). That’s why quotes are pre-formated. Notice, that different themes also pre-format quotes—as well as other elements—in different ways, depending on the specific theme.
For technical stuff you should use plain html. Then, you will be able to format your quotes the way you like them, or not format them at all.
Blocked quotes and
Preformatted text are two different things.
In markdown you can mark code (called preformatted) text two ways.
Put code between two lines With three "back-ticks"
That creates a code block
You can also mark code in-line by surrounding the code with single
@pghalverson All of the above suggestions work fine. They should be enough. If you want to make the code look “fancier” you might want to use a little app called Carbonize. It lets you easily/quickly create great looking screenshots of code. The end product is an image you insert.
My guess is you don’t need Carbonize, but you can take a look on the App Store for details.
The SyntaxHighlight stack has worked well for some users in the past:
I have tested and confirmed that the Verilog language can be added to SyntaxHighlight, as a custom language package.
However this has the pre-requirement that you already have the Stacks plugin for RapidWeaver.
While the Carbonize app and free plugins for text editors like the excellent ‘atom-screenshot’ package are good for creating images of code, the trouble is I think they are mostly intended for print publications or social media.
For code you actually want to present on a website, I think the ability to display the code as text (with copy and paste support) would be essential. Or place links immediately under the screen grabs that link to Gist or PasteBin.
Thank you all for the excellent information and suggestions. Its making my path forward much easier.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.