Javadoc with Equations? - math

I'm only familiar with the no-frills javadoc generator, however I'd like to include some mathematical equations in my javadoc (rather than constantly referencing another document).
Is there a convenient option to do something like include/properly render LaTeX (most preferred - then I could just cut-n-paste) or MathML tags?

Check out Doxygen.
It's blazing fast, free, and supports embedded LaTeX.

Maybe something like MathJax or jsMath could be your solution. They're both JavaScript libraries, so you'll have to find a way to add them into your javadocs pages.

While I haven't done it personally, there are ways to create your own using the Doclet or Taglet API to create your own Doclet or Taglet. Several of these have already been done according to a quick search providing one such example http://www.ohloh.net/p/latextaglet
If you're feeling daring enough the latextaglet project is open source, so you might be able to further adapt it to your needs.

Related

Control over OpenAPI 3.0 package generation for jersey-jaxrs

I'm using openapi-generator for jersey-jaxrs (OpenAPI 3.0). I'd like to control the package where my code is being generated.
I'm setting the api-package, model-package, package-name, and invoker-package options, all to a xxx.yyy.zzz value.
My problem is that most of the code is generated under gen.xxx.yyy.zzz, and it's not discoverable by the part of the code generated under xxx.yyy.zzz. Implicitly, gen is prepended to the package name. I understand this is convenient in many cases, but not mine. Is there any generator option to avoid this?
I've learned a bit about the Mustache templates and they seem like a possible solution, but maybe a bit too much for my requirements.
Ultimately, I can move the code in gen to the other (non-gen) package manually, and it works, but this is quite inconvenient.
Finally, I found out that you can mark folders in IntelliJ IDEA as "generated sources root", which makes it discoverable to the rest of the project's code.
This doesn't solve my question, but it does solve the problem that originated the question.

How to find other built-in DWT fields?

Within a DWT Template Building Block, we can use a few "free" variables such as ##Component.Title## or ##Component.ID## as well as built-in DWT functions.
I didn't realize we can also get a component's schema description with ##Component.Description## or ##Description##.
The out-of-the-box Default Dreamweaver Component Design has a good set of examples, along with the Tridion Cook book's iteration example, and SDL Live Content.
How else could I find other allowed built-in DWT functions and variables, programmatic or otherwise?
In other words, I wouldn't have thought ##Description## was even available in DWT without seeing an example first (not that I have a use for it yet).
Edit (June 8, 2013): I did find additional information on SDL Live Content (requires login). We can of course use available Package variables as described in the documentation.
Researching a bit, I found that if we go to the tridion.contenmanager.config file, we will discover the node, which references to the Dreamweaver mediator type:
<mediator matchMIMEType="text/x-tcm-dreamweaver" type="Tridion.ContentManager.Templating.Dreamweaver.DreamweaverMediator" />
This namespace can be found inside Tridion.ContentManager.Templating.dll
Decompiling is the best way to find out what is inside and learn something. Since it is .Net code, that will not be a problem, there is many free good tools available. I'm using lately JustDecompile
I did not go too deep into the code, but I can see that there is a TridionObjectSource class, with a number of Constants for reserved words, like:
ReservedNameTitle
ReservedNameDescription
Searching where this constants are used on the code, can help to better understand what they do, and the way the Dreamweaver Mediator works inside.
Seems like an interesting learning exercise
I take it that you've searched the documentation for the answer and come up empty. I suggest that you go to the relevant part of the LiveContent documentation and add a comment. This will reach the documentation team directly, and I'm sure they'll be very interested to hear of a feature that isn't properly covered. With a bit of luck they'll update it, and you'll have done us all a favour.
I have some sympathy for the "help yourself" approach too, but if you find a feature by your own analysis of the software, and it gets removed in a later release, you won't have a leg to stand on to complain about this. So help Tridion to get the feature documented, and then it's there to use with confidence.

Version diff in alfresco

Alfresco allows uploading newer versions of documents in the repository and also keeps track of the version history, it seems. However, I could not find any way to compare or diff a document with its prior versions.
Is this possible? are there any good external plugins or tools for this?
I assume you think of something similiar to the good old Unix diff tool which basically compares text files and can show the result in a human readable form.
The general equivalent situation in alfresco is far more complicated. You have an arbitrary amount of properties of different type. The text file you might think of just happens to have character bytes in cm:content.
So to answer your question : I don't know of any extension providing a general diff between versions, but it should not be two hard rolling your own for text files other simple special comparisons. In the former case you might want to have a look at Java library for free-text diff for libraries providing the base functionality.
Looking for the same functionality and found this Alfresco addon
http://code.google.com/p/versions-difference-alfresco-plug-in/

LaTeX equivalent to Google Chart API

I'm currently looking at different solutions getting 2 dimensional mathematical formulas into webpages. I think that the wikipedia solution (generating png images from LaTeX sourcecode) is good enough until we get support for MathML in webbrowsers.
I suddenly realized that it might be possible to create a Google Charts API equivalent for mathformulas. Has this already been done? Is it even possible due to the strange characters involved in LaTeX-code?
I would like to hit an url like latex2png.org/api/?eq="E = mc^2" and get the following response:
edit:
Thanks for the answers sofar. However, I am already aware of several tools to generate png images from latex source code (both online and from my commandline), but what I was looking for was a simple way to get the image via an Http GET request. Perhaps such a service does not exist.
Update
As #hughes (and others) pointed out, the previous Google Chart API has been deprecated.
The example I wrote still works as of Sept 2015, but a new one shall be used now (documentation):
Old answer
Google Chart can do it (Documentation):
http://chart.apis.google.com/chart?cht=tx&chl=%5CLaTeX
I'm using this with Google Docs, because it doesn't support math yet.
chart.apis.google with background color changed
https://chart.apis.google.com/chart?cht=tx&chf=bg,s,FFFF00&chl=%0D%0A4x_0%5CDelta%28x%29%2B3%5CDelta%28x%29%2B2%5CDelta%28x%5E2%29%3E0%0D%0A
or chart.apis.google with background color transparent and resized
For better readability URL needs to be decoded.
https://chart.apis.google.com/chart?cht=tx&chs=428x35&chf=bg,s,FFFFFF00&chl=
4x_0\Delta(x)+3\Delta(x)+2\Delta(x^2)>0
Data structure looks like this
{
"cht":"tx",
"chs":"428x35",
"chf":"bg,s,FFFFFF00",
"chl":"n4x_0\Delta(x) 3\Delta(x) 2\Delta(x^2)>0"
}
https://chart.apis.google.com/chart?cht=tx&chs=428x35&chf=bg,s,FFFFFF00&chl=%0D%0A4x_0%5CDelta%28x%29%2B3%5CDelta%28x%29%2B2%5CDelta%28x%5E2%29%3E0%0D%0A
You could try the Online image generator for mathematical formulas for a start.
mathurl is a mathematical version of TinyURL.com. It allows you to reference LaTeXed mathematical expressions using a short url. For example, http://mathurl.com/?5v4pjw will show [LaTeX output Image] which you can then edit. More details on mathurl’s help page
I just ran across MathJax on Ajaxian [via Wayback Machine]:
MathJax seems to have a chance at being a practical solution that offers a high quality display of LaTeX and MathML math notation in HTML pages.
The output is remarkably beautiful, and it's all pure HTML and CSS, which makes it scalable and selectable. Performance is currently a bit sluggish, but this is recognized.
As everyone has said, there are many services that do this already. Here is another easy one that I've used a number of times (and you can install it locally on your server if necessary):
http://www.codecogs.com/components/equationeditor/equationeditor.php
I'd take a good look at how the MediaWiki LaTeX support does it and borrow from there.
Please check out this site for a way to create TeX documents without any software installed. You can then snippet the result image with any screen capture method and embed the resulting image into a any website.
Go to http://sharelatex.com
The software is free to use, but you need to register to create documents.

Which library should I use to generate RSS in Common Lisp?

What's the best library to use to generate RSS for a webserver written in Common Lisp?
Most anything will probably do. Personally, I've been using xml-emitter for my blog's Atom feed, which has worked out well so far.
Just choose whichever XML generation library you like and hack away, I'd say. As others have remarked, RSS is simple; it's little work to generate it manually.
That said, I recommend not generating plain strings directly. Having to deal with quoting data is more of a hassle than installing an XML library, and it's also insecure in case your feed contains data submitted by visitors of your website.
xml-emitter says it has an RSS 2.0 emitter built in.
CL-WHO can generate XML pretty easily.
I am not aware of any specific RSS library. But the format is fairly simple so any library that can write xml will do at that level.
You could have e.g. a look at the nuclblog (http://cyrusharmon.org/projects?project=nuclblog) project as that has the capability to generate an RSS feed for the blog entries it maintains.
cl-rss-gen is a tiny library (LGPL, depends on CL-WHO) that does some boilerplate work for you (supports generating RSS entries directly from CLOS class instances by specifying which slot maps to which attribute).
Take a look at the code before using it, it may give you the idea how it's working and whether you need it or not (as other posters said, you can generate RSS yourself with CL-WHO or any XML generation library).
Oh, and sorry for resurrecting a four years old thread, but if anyone searches for similar library, he/she will find the answer here.

Resources