I have dart doc . working and generating HTML files.
I want to generate Markdown files instead.
When googling, I found this answer https://github.com/dart-lang/dartdoc/issues/1479#issuecomment-868961953 - which led me to this PR: https://github.com/dart-lang/dartdoc/pull/2703
In the diff https://github.com/dart-lang/dartdoc/pull/2703/files - I see format and md - but I'm new to this, so I don't know how to use this info to create the command I need to use.
I was expecting something like dart doc . --format md to work, but it doesn't.
Also, when I run dart doc --help, it leads me here: https://dart.dev/go/dartdoc-options-file - and it doesn't mention the ability to generate docs in Markdown.
Maybe this isn't supported? TY
dart doc can't create documentation in markdown format, you have to use the package dartdoc (see https://github.com/dart-lang/dartdoc/issues/3241#issuecomment-1302150336)
You have to run dart pub global run dartdoc --format=md (but the generated md may not be pure md, see https://github.com/dart-lang/dartdoc/issues/3237).
Related
I am trying to automate conversion of a GitHub Pages site to LateX in order to produce a PDF. The Kramdown parser used by GHP understands the following definition list syntax:
term1
: definition1
term2
: definition 2
so definition lists formatted this way in Markdown show up correctly on GHP. However, Pandoc's --from=gfm flag does not understand this syntax, since it's not officially part of the GFM spec. I have tried:
--from=gfm+definition_lists
but the definition_lists extension appears to be ignored with from=gfm. I have also tried:
--from=markdown+definition_lists+attribute_headers
but that doesn't appear to understand Kramdown-style attribute headers (which I need in order to specify section IDs, because legacy text). Is there a way to get Pandoc to deliver the definition list behavior of Jekyll+Kramdown and attribute headers? Thanks.
Try -f markdown_github+definition_lists. markdown_github is pandoc's legacy gfm parser. gfm is the new one, which just wraps the C library and so doesn't accept all the extensions.
I'm trying to convert latex code embedded in an HTML document (Intended to be used with a Javascript shim) into MathML. Pandoc seems like a great tool. Following this example: http://pandoc.org/demos.html,
pandoc input.html -s --latexmathml -o output.html
Produces no change in the file. I even made a barebones blank HTML file with various text expressions to test; no change in the output. What am I missing?
http://math.etsu.edu/LaTeXMathML/ This site, linked to by Pandoc, appears to show documentation for a standalone case, but it uses a JS shim instead of outputting the MathML directly. (I think it has the browser render dynamically-rendered MathML, but doesn't actually output it to the file) It's also missing some basic functionality, like own-line functions with \begin{equation}.
I've spent several hours googling ways to accomplish this. Any ideas? The only fully-working solution I've found is https://www.mathtowebonline.com/ This website. There's also a python module called latex2mathml, but it's also missing large chunks of the spec.
You'll need the --mathml flag (not the --latexmathml flag) to generate MathML and the tex_math_dollars extension enabled for reading the math between dollar signs:
$ echo '<p>$$x = 4$$</p>' | pandoc -f html+tex_math_dollars -t html --mathml
<p>
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
<mrow><mi>x</mi><mo>=</mo><mn>4</mn></mrow><annotation encoding="application/x-tex">x = 4</annotation>
</semantics>
</math>
</p>
Or maybe you're better off using somehting like snuggleTeX or LaTeXMathML.js...
Do we have any code documentation syntax and tool support for generating Code Documentation out of Dart Application Code, something similar to Doxygen for C/C++. I prefer to use Markdown styled syntax than doxygen-syntax.
The DartDoc tool (which uses markdown) creates API documentation (as found at api.dartlang.org )
This describes the api reference for using DartDoc in your own code
The Readme.txt here, shows how you can format your code comments to generate API doc
///I am the beerclass
class BeerClass{
///this is a beer variable
String beername;
///this is a beer method
String get getBeer => "beer for the people";
}
Just go in the Darteditor: Tools->Generate Dartdoc. You get a new directory docs and you start index.html in your browser. Your class, variable and method have now documentation.
I'm writing a manual of sorts in LaTeX for some software. I'm constrained to use the article class. I must include docs of individual c++ classes in the manual. I'm looking at doxygen for this, but I've never used doxygen (if there's a better way, let me know).
I can get doxygen to produce a nice LaTeX (--> pdf) file of my entire project. But what I'd like to do is somehow extract the LaTeX source for each class and drop it into my LaTeX manual source at the appropriate place.
I've tried putting all the preamble stuff from refman.tex (generated by doxygen) in my preamble, and then later in the document using \input to include the tex file of an individual class. After cleaning up a few conflicts, I get to one that I don't know how to get past. The doxygen-generated doxygen.sty file makes reference to \chaptermark, but I believe that this is a macro defined in the book class.
So 1.) Am I going about this all the wrong way? 2.)Is it possible to force Doxygen to produce code in the article class? 3.) Anything else?
-garyp
You can make doxygen produce a document that uses the article document class by setting COMPACT_LATEX to YES in your doxygen config file.
I would like to be able to edit LaTeX parts of some Doxygen comments externally with some suitable editor. I would use that only for complex environments. To do that, I figured I can have LaTeX-only files and include them from Doxygen. I did create Doxygen aliases for \begin and \end to make the syntax compatible.
(For example, I know how to set-up Emacs/AUCTex for working with LaTeX snippets that have no preamble and document structure.)
Is there a way to include the contents of a .tex file inside a Doxygen comment? I look for something analogous to \htmlinclude, but for TeX files. Is there some way to emulate the functionality, given my requirements for having a TeX-only external source?
You may use something like
\latexonly
\input <file>
\endlatexonly
where <file> is the path to the file to include, either absolute or relative to the directory in which the latex documentation is generated.
Have you tried the \verbinclude command? This command includes any file verbatim in the documentation (in contrast to \include, which is used to include source files).
From the doxygen manual:
\verbinclude <file-name>
This command includes the file <file-name> verbatim in the documentation. The command is equivalent to pasting the file in the documentation and placing \verbatim and \endverbatim commands around it.
Files or directories that doxygen should look for can be specified using the EXAMPLE_PATH tag of doxygen's configuration file.
Edit: I just had a thought that you may wish to strip the preamble from your .tex file before including the rest of the file in the documentation. you could do this using the \dontinclude command which, together with the \line, \skip, \skipline, and \until commands allows you to include specific lines/blocks of a particular file. See the example in the \dontinclude documentation.