Before I run off the in wrong direction, if adding a new output format to Sphinx, might one have to add special case code to all existing Sphinx extensions?
For example I see that the 'todo' extension seems to try and use admonitions but has to have special case latex code - might I have to do similar for every extension that someone might use unless I can do some similar jiggery-pokery to reuse existing formatting features?
All extensions that make use of Sphinx's add_node() function need to be adjusted to cover the new output format. Otherwise, your new output format builder will not be able to process the custom nodes. You still should be able to build, though.
However, let me clarify the following:
Not all extensions make use of add_node().
In many cases, you should be able to register an already existing function for the new output format, just like in the example of the extension development tutorial in the Sphinx documentation.
You should be able to override the add_node() registrations of the extensions you use without modifying the source code of the extensions by re-registering the nodes at the end of your project's conf.py file.
Related
As the title says, I would like to build a VS extension that's able to react to certain changes made on the editor window (for various languages). Not necessarily an adornment.
To do this I would like to be able to analyse the editor document through the Roslyn service API (that if I understood well is now part for the Microsoft.CodeAnalysis).
Can someone indicate some documentation?
What's the best practice to do this?
What are the interface to import via MEF?
As example you can export a custom ISuggestedActionsSourceProvider to add new feature in the light bulb, you can use ExportCodeRefactoringProviderAttribute to add a new refactoring, also you can export IClassifierProvider and ITagProvider to classificate a elements in the text editor, import ITextDocumentFactoryService to retrieve the current VS Document by ITextBuffer and etc.
Also you wouldn't be enough to use only Microsoft.CodeAnalysis for some kind of analyzing, so you will need to add a some additional packages in these cases. As example these packages can be Microsoft.CodeAnalysis.EditorFeatures.Text, Microsoft.CodeAnalysis.Workspaces.Common and etc.
If you want to get from community the more concrete answer you should concrete what exactly do you want in the question.
Also you can check a more useful links and examples: Roslynator are refactoring and analyzing a code, Getting start editor extensions, Light bulb guide, Classification elements for highlighting
When adding a link using the default link-plugin, I want to be able to write "what-ever", e.g. #my-id. The link-plugin, doesn't allow this. It extracts all possible "anchors" in the current text being edited, but in my case, it is just part of a bigger "page".
Any ideas on configuration options, or do I need to write a custom plugin?
There are numerous suggestions around on how-to configure the existing plugins and remove UI-elements etc. It does not work in current version (4.4.3), but thankfully you can build your own plugin and remove the existing one, quite easily. There's a good explanation of a similar plugin in the documentation: http://docs.ckeditor.com
I also wrote a bit about this here: http://danielwertheim.se/2014/08/15/ckeditor-the-link-plugin-is-painfully-clever/
I'm using a slightly modified version of the example generator from Jekyll's plugins section of their docs (https://github.com/mojombo/jekyll/wiki/Plugins#generators) and I'm curious if there is any way to parse a liquid/markdown file instead of a plain HTML files from the example?
Notice this line:
self.read_yaml(File.join(base, '_layouts'), 'category_index.html')
That category index.html file is the target file which will be used in generated files. My goal is to be able to pass an object to a my generator from my _config file which I can then use to build a bunch of pages from a .markdown file instead. Does anyone know if this is possible or have any recommendations for achieving this? I looked into the Kramdown lib that's used to parse markdown internally, and I'm not opposed to invoking it myself if I have to, just wasn't sure if I was going deeper than I needed to for something that should be so simple. The API for the Page object which my generator creates is here: http://ruby-doc.org/gems/docs/j/jekyll-0.12.0/Jekyll/Page.html
Thanks a ton,
- Keith
You can generate virtually any format you want, from virtually any data source you want, in a generator, because you're writing straight Ruby with full access to the Jekyll object model. For example, here's a generator I put together the other night that fetches GitHub commits during jekyll build.
The question I would be asking is this:
Do I need a plugin to accomplish this?
If so, do I need a formal generator plugin as discussed in the Jekyll docs?
Or should I subclass, monkey-patch, or otherwise change the behavior of the built-in generator?
Also, the differences between Markdown and HTML files in this context (where you control 100% of what gets generated) are mostly nominal. read_yaml IIRC will actually read the front matter from both, so that shouldn't be an issue.
Ruby has a few good document generators like Yard, rDoc, even Glyph. The thing is that Sphinx does websites, PDF's, epub, LaTex...etc. It does all these things in restructuredtext.
Is there an alternative to this in the Ruby world? Maybe a combination of programs? If I could use Markdown as well that would be even better.
Since version 1.0, Sphinx has had a concept of "domains" which are ways of marking up code entities (like method calls, objects, functions, whatever) from lannguages other than Python and/or C.
There is a ruby domain, so you could just use Sphinx itself. The only thing you would be missing (I think) is Sphinx's ability to create documentation from source automatically using the autodoc extension, which works specifically on Python code.
If you want to use Markdown, you might check out JDoc, which is a very simple, Ruby-based documentation framework that lets you use widely-supported markup and put it under source control. It lets you edit the documentation in your text editor of choice, and it supports:
Markdown or Textile
syntax highlighting
easy internal links
a hierarchical documentation structure (useful for large projects)
customizable styling and structure (but it looks nice out of the box, too)
It generates static HTML, so the resulting documentation is easy to host and doesn't have much of an impact on your server load.
To see it in action, check out wpmvc.org.
Another couple of options would be to use Middleman which is a static site generator that accepts either Kramdown or Markdown as input.
There are also frameworks that are designed specifically for technical documentation that use Middleman (both of which are on GitHub) including lord/slate and pnerger/dpslate (the later is a fork of the former and provides some enhancements that were not appropriate for pulling). The Slate format provides a format for documentation that includes many of the features of Sphinx with some additional enhancements. It features a three-pane view of a document which includes an automatically generated Table of Contents, a Main center body, and then sample code panel to the right. Like Sphinx the sample code has syntax highlighting.
Is there an official list of Inno Setup messages like "WinVersionTooLowError" somewhere? I need to change the "This will install AppName on your computer" but don't know how. Thanks!
The default language file should have a complete list, you can view the online CVS version here.
The translation download page contains this note:
Starting with version 5.1.0, the Inno Setup compiler will accept a
translation even if it's missing messages (it will use the default
English messages to replace them) or contains unknown messages.
so you should be able to create a custom English language file that only changes a couple of strings if that is what you want, but it is also possible to override the strings without using language files.
You might also want to take a look at Inno Setup Easy Translator