Re: ddoc latex/formulas?

2016-09-16 Thread Meta via Digitalmars-d
On Friday, 16 September 2016 at 20:46:55 UTC, Tourist wrote: Bitter much? When you started Walter opined progress will soon stall and you will have an incomplete tool with no users to maintain. That is what happened. Well, he's got at least one user. When I find the official docs too cluttere

Re: ddoc latex/formulas?

2016-09-16 Thread bachmeier via Digitalmars-d
On Friday, 16 September 2016 at 21:02:26 UTC, Adam D. Ruppe wrote: On Friday, 16 September 2016 at 20:25:33 UTC, bachmeier wrote: The advantage of ddoc is generating documentation from that file with a single call to dmd. dmd could just as well call executeShell as another program. dependenci

Re: ddoc latex/formulas?

2016-09-16 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 16 September 2016 at 20:46:55 UTC, Tourist wrote: Bitter much? It was decided some time ago that dlang.org would migrate to ddox. There was even a push by Andrei recently to hammer out some more of the ddox bugs to keep these plans on track, and he reported another just today. W

Re: ddoc latex/formulas?

2016-09-16 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 16 September 2016 at 20:25:33 UTC, bachmeier wrote: The advantage of ddoc is generating documentation from that file with a single call to dmd. dmd could just as well call executeShell as another program. dependencies, you either have to include it with DMD or allow the documentati

Re: ddoc latex/formulas?

2016-09-16 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 16 September 2016 at 18:30:25 UTC, Andrei Alexandrescu wrote: and does not change color when part of a link. That's only partially true, image links traditionally got a colored border (such behavior is nowadays CSS defined and still fully possible) and there's other options too. Wi

Re: ddoc latex/formulas?

2016-09-16 Thread Tourist via Digitalmars-d
On Friday, 16 September 2016 at 19:57:38 UTC, Adam D. Ruppe wrote: On Friday, 16 September 2016 at 17:25:10 UTC, bachmeier wrote: You have to be able to build your documentation using DMD. eh, speak for yourself. Even Phobos is moving away from actually using dmd's doc generator! Bitter muc

Re: ddoc latex/formulas?

2016-09-16 Thread bachmeier via Digitalmars-d
On Friday, 16 September 2016 at 19:57:38 UTC, Adam D. Ruppe wrote: On Friday, 16 September 2016 at 17:25:10 UTC, bachmeier wrote: You have to be able to build your documentation using DMD. eh, speak for yourself. Even Phobos is moving away from actually using dmd's doc generator! The advant

Re: ddoc latex/formulas?

2016-09-16 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 16 September 2016 at 17:25:10 UTC, bachmeier wrote: You have to be able to build your documentation using DMD. eh, speak for yourself. Even Phobos is moving away from actually using dmd's doc generator!

Re: ddoc latex/formulas?

2016-09-16 Thread Andrei Alexandrescu via Digitalmars-d
On 09/16/2016 01:25 PM, bachmeier wrote: On Friday, 16 September 2016 at 16:03:44 UTC, Adam D. Ruppe wrote: It isn't really a difficult process and it is only 62 lines of code in my doc gen source. I don't do as much validation as Wikipedia but even if it were to, it'd just be a larger source f

Re: ddoc latex/formulas?

2016-09-16 Thread bachmeier via Digitalmars-d
On Friday, 16 September 2016 at 16:03:44 UTC, Adam D. Ruppe wrote: It isn't really a difficult process and it is only 62 lines of code in my doc gen source. I don't do as much validation as Wikipedia but even if it were to, it'd just be a larger source file, no real trouble for the end user.

Re: ddoc latex/formulas?

2016-09-16 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 16 September 2016 at 15:45:36 UTC, bachmeier wrote: I'm not sure it's good to compare ddoc to Wikipedia. If I want to output documentation from a .d file, I don't want to go through a process like that. It is again simple with my program: `adrdox yourfile.d`. It renders the latex t

Re: ddoc latex/formulas?

2016-09-16 Thread Andrei Alexandrescu via Digitalmars-d
On 09/16/2016 11:38 AM, bachmeier wrote: On Friday, 16 September 2016 at 12:33:59 UTC, tn wrote: Yes. I opened the link [1] by Andrei into a new tab, saw some latex source code, wondered what was the point, closed the tab, and remained confused. Only later did I find out that it was supposed re

Re: ddoc latex/formulas?

2016-09-16 Thread bachmeier via Digitalmars-d
On Friday, 16 September 2016 at 08:20:34 UTC, John Colvin wrote: Wikipedia render to svg serverside and have dropped mathjax support. I'm not sure it's good to compare ddoc to Wikipedia. If I want to output documentation from a .d file, I don't want to go through a process like that.

Re: ddoc latex/formulas?

2016-09-16 Thread bachmeier via Digitalmars-d
On Friday, 16 September 2016 at 12:33:59 UTC, tn wrote: Yes. I opened the link [1] by Andrei into a new tab, saw some latex source code, wondered what was the point, closed the tab, and remained confused. Only later did I find out that it was supposed render it by javascript. It was way too sl

Re: ddoc latex/formulas?

2016-09-16 Thread bachmeier via Digitalmars-d
On Friday, 16 September 2016 at 02:30:37 UTC, Manu wrote: I'm guessing that's mathjax? Strangely, it renders really badly on my system. I can barely read it. I'd still rather use latex to produce images for my own docs. Normally this happens when you are not allowing the use of MathJax fonts

Re: ddoc latex/formulas?

2016-09-16 Thread Andrei Alexandrescu via Digitalmars-d
On 9/16/16 8:33 AM, tn wrote: On Thursday, 15 September 2016 at 17:32:16 UTC, Adam D. Ruppe wrote: On Thursday, 15 September 2016 at 14:40:24 UTC, Andrei Alexandrescu wrote: Wait, but I just showed how with vanilla ddoc you can immediately use mathjax to do better than adrdox. No need for any p

Re: ddoc latex/formulas?

2016-09-16 Thread Andrei Alexandrescu via Digitalmars-d
On 9/16/16 9:17 AM, Marco Leise wrote: Am Fri, 16 Sep 2016 12:30:37 +1000 schrieb Manu via Digitalmars-d : That strikes me as an inferior solution to what's available today, which is used at http://erdani.com/d/DIP1000-typing-baseline.html. I'm guessing that's mathjax? Strangely, it renders r

Re: ddoc latex/formulas?

2016-09-16 Thread Marco Leise via Digitalmars-d
Am Fri, 16 Sep 2016 12:30:37 +1000 schrieb Manu via Digitalmars-d : > > That strikes me as an inferior solution to what's available today, which is > > used at http://erdani.com/d/DIP1000-typing-baseline.html. > > I'm guessing that's mathjax? Strangely, it renders really badly on my > system. I

Re: ddoc latex/formulas?

2016-09-16 Thread tn via Digitalmars-d
On Thursday, 15 September 2016 at 17:32:16 UTC, Adam D. Ruppe wrote: On Thursday, 15 September 2016 at 14:40:24 UTC, Andrei Alexandrescu wrote: Wait, but I just showed how with vanilla ddoc you can immediately use mathjax to do better than adrdox. No need for any pre/postprocessing or scripting

Re: ddoc latex/formulas?

2016-09-16 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 16 September 2016 at 11:22:59 UTC, Andrei Alexandrescu wrote: Didn't know that. Did they open-source their solution? Thanks! They did, and I looked at it for my adrdox too and based my solution on their concepts, though I didn't use their code (because it was too heavyweight with

Re: ddoc latex/formulas?

2016-09-16 Thread Andrei Alexandrescu via Digitalmars-d
On 9/16/16 4:20 AM, John Colvin wrote: On Thursday, 15 September 2016 at 13:23:36 UTC, Andrei Alexandrescu wrote: On 09/15/2016 08:40 AM, Adam D. Ruppe wrote: On Wednesday, 14 September 2016 at 15:49:27 UTC, bachmeier wrote: I agree. That's why I quickly gave up on ddoc. My doc generator jus

Re: ddoc latex/formulas?

2016-09-16 Thread Andrei Alexandrescu via Digitalmars-d
On 9/15/16 10:30 PM, Manu via Digitalmars-d wrote: I'm guessing that's mathjax? Strangely, it renders really badly on my system. I can barely read it. I'd still rather use latex to produce images for my own docs. You may want to check the options discussed at http://tex.stackexchange.com/quest

Re: ddoc latex/formulas?

2016-09-16 Thread Johan Engelen via Digitalmars-d
On Friday, 16 September 2016 at 02:30:37 UTC, Manu wrote: On 15 September 2016 at 23:48, Andrei Alexandrescu: That strikes me as an inferior solution to what's available today, which is used at http://erdani.com/d/DIP1000-typing-baseline.html. I'm guessing that's mathjax? Strangely, it rend

Re: ddoc latex/formulas?

2016-09-16 Thread John Colvin via Digitalmars-d
On Thursday, 15 September 2016 at 13:23:36 UTC, Andrei Alexandrescu wrote: On 09/15/2016 08:40 AM, Adam D. Ruppe wrote: On Wednesday, 14 September 2016 at 15:49:27 UTC, bachmeier wrote: I agree. That's why I quickly gave up on ddoc. My doc generator just pipes special input text through the

Re: ddoc latex/formulas?

2016-09-15 Thread Manu via Digitalmars-d
On 15 September 2016 at 23:48, Andrei Alexandrescu via Digitalmars-d wrote: > On 09/15/2016 09:12 AM, Manu via Digitalmars-d wrote: >> >> On 15 September 2016 at 22:40, Adam D. Ruppe via Digitalmars-d >> wrote: >>> >>> On Wednesday, 14 September 2016 at 15:49:27 UTC, bachmeier wrote: >>

Re: ddoc latex/formulas?

2016-09-15 Thread Johan Engelen via Digitalmars-d
On Thursday, 15 September 2016 at 16:35:53 UTC, Andrei Alexandrescu wrote: On 09/15/2016 11:43 AM, Johan Engelen wrote: - Perhaps we can "standardize" the MathJax thing for Phobos docs? Johan, do you think I could impose on you to try your hand? The solution would redefine DDOC as above and

Re: ddoc latex/formulas?

2016-09-15 Thread Johan Engelen via Digitalmars-d
On Thursday, 15 September 2016 at 16:35:53 UTC, Andrei Alexandrescu wrote: - Also, how about that parameter name problem? Any good fix for that? Let's see how the underscore does. Underscore works, updating SO example.

Re: ddoc latex/formulas?

2016-09-15 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 15 September 2016 at 14:40:24 UTC, Andrei Alexandrescu wrote: Wait, but I just showed how with vanilla ddoc you can immediately use mathjax to do better than adrdox. No need for any pre/postprocessing or scripting, just one line of import. mathjax IS postprocessing via scripting.

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 11:43 AM, Johan Engelen wrote: On Thursday, 15 September 2016 at 14:42:37 UTC, Andrei Alexandrescu wrote: On 09/15/2016 10:37 AM, Johan Engelen wrote: Btw, Ddoc is perhaps a little more than a macro system, and that's why using parameter names in equations is broken. Parameter nam

Re: ddoc latex/formulas?

2016-09-15 Thread ag0aep6g via Digitalmars-d
On 09/15/2016 05:43 PM, Johan Engelen wrote: - Perhaps we can "standardize" the MathJax thing for Phobos docs? Would be nice for Manu's color lib and for Mir too. (where are the Mir guys anyway in this discussion? ;) I'm not familiar with MathJax. Looks like a client-side library. In my opinio

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 11:13 AM, bachmeier wrote: On Thursday, 15 September 2016 at 13:48:44 UTC, Andrei Alexandrescu wrote: That strikes me as an inferior solution to what's available today, which is used at http://erdani.com/d/DIP1000-typing-baseline.html. But how did you do that? See source at htt

Re: ddoc latex/formulas?

2016-09-15 Thread bachmeier via Digitalmars-d
On Thursday, 15 September 2016 at 15:43:39 UTC, Johan Engelen wrote: - Perhaps we can "standardize" the MathJax thing for Phobos docs? Would be nice for Manu's color lib and for Mir too. (where are the Mir guys anyway in this discussion? ;) As I commented above to Andrei, I think KaTeX is be

Re: ddoc latex/formulas?

2016-09-15 Thread Johan Engelen via Digitalmars-d
On Thursday, 15 September 2016 at 14:42:37 UTC, Andrei Alexandrescu wrote: On 09/15/2016 10:37 AM, Johan Engelen wrote: On Thursday, 15 September 2016 at 11:39:13 UTC, Andrei Alexandrescu wrote: * ddoc has absolutely nada notion of rendering. To ask "how do I render sqrt and aligned matrices

Re: ddoc latex/formulas?

2016-09-15 Thread bachmeier via Digitalmars-d
On Thursday, 15 September 2016 at 13:48:44 UTC, Andrei Alexandrescu wrote: That strikes me as an inferior solution to what's available today, which is used at http://erdani.com/d/DIP1000-typing-baseline.html. But how did you do that? I think KaTeX may be a better solution for documentation be

Re: ddoc latex/formulas?

2016-09-15 Thread Jonathan M Davis via Digitalmars-d
On Thursday, September 15, 2016 10:43:56 Andrei Alexandrescu via Digitalmars-d wrote: > Probably a wiki page would be an awesome idea. -- Andrei Well, for better or worse, he asked it on SO: http://stackoverflow.com/questions/39514027/how-to-show-math-equations-with-ddoc

Re: ddoc latex/formulas?

2016-09-15 Thread Johan Engelen via Digitalmars-d
On Thursday, 15 September 2016 at 14:43:56 UTC, Andrei Alexandrescu wrote: On 09/15/2016 10:37 AM, Johan Engelen wrote: Now, can we please add this question to stackoverflow, and add this as an answer? :) Probably a wiki page would be an awesome idea. -- Andrei We need more stackoverflow

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 10:37 AM, Johan Engelen wrote: Well, I'm pretty sure just typing \( \) and running `dmd -D` is not going to give me the output that I want. Indeed it doesn't. But, as you write, it's easy to make it happen. Full example: ``` /** * Macros: * DDOC = * * * * https://cdn.mathjax.or

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 10:37 AM, Johan Engelen wrote: On Thursday, 15 September 2016 at 11:39:13 UTC, Andrei Alexandrescu wrote: * ddoc has absolutely nada notion of rendering. To ask "how do I render sqrt and aligned matrices with ddoc" does not compute. Is there agreement on that? D has absolutely n

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 10:15 AM, Adam D. Ruppe wrote: On Thursday, 15 September 2016 at 13:12:05 UTC, Manu wrote: What does that mean? What's your process to produce this output? ./adrdox test.d The program internally runs pipeProcess over to latex to make the image when it sees the $(MATH ) synta

Re: ddoc latex/formulas?

2016-09-15 Thread Johan Engelen via Digitalmars-d
On Thursday, 15 September 2016 at 11:39:13 UTC, Andrei Alexandrescu wrote: * ddoc has absolutely nada notion of rendering. To ask "how do I render sqrt and aligned matrices with ddoc" does not compute. Is there agreement on that? D has absolutely no notion of "databases", but I think it's fa

Re: ddoc latex/formulas?

2016-09-15 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 15 September 2016 at 13:12:05 UTC, Manu wrote: What does that mean? What's your process to produce this output? ./adrdox test.d The program internally runs pipeProcess over to latex to make the image when it sees the $(MATH ) syntax. Problem is, phobos uses vanilla ddoc...

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 09:46 AM, Andrei Alexandrescu wrote: and then just write $( ... \LaTeX math syntax here ...), or use \( \) directly. I meant: $(M ... \LaTeX math syntax here ...) Andrei

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 09:12 AM, Manu via Digitalmars-d wrote: On 15 September 2016 at 22:40, Adam D. Ruppe via Digitalmars-d wrote: On Wednesday, 14 September 2016 at 15:49:27 UTC, bachmeier wrote: I agree. That's why I quickly gave up on ddoc. My doc generator just pipes special input text throug

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 08:42 AM, Manu via Digitalmars-d wrote: On 15 September 2016 at 21:39, Andrei Alexandrescu via Digitalmars-d wrote: TL;DR, doxygen has: /** * /f[ ...latex syntax here... /f] */ And like magic, your documentation has maths. I expect to write an equivalent line in my d code, and it

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/15/2016 08:40 AM, Adam D. Ruppe wrote: On Wednesday, 14 September 2016 at 15:49:27 UTC, bachmeier wrote: I agree. That's why I quickly gave up on ddoc. My doc generator just pipes special input text through the latex program to generate an image, which is then inlined in the html: http:

Re: ddoc latex/formulas?

2016-09-15 Thread Manu via Digitalmars-d
On 15 September 2016 at 22:40, Adam D. Ruppe via Digitalmars-d wrote: > On Wednesday, 14 September 2016 at 15:49:27 UTC, bachmeier wrote: >> >> I agree. That's why I quickly gave up on ddoc. > > > My doc generator just pipes special input text through the latex program to > generate an image, whic

Re: ddoc latex/formulas?

2016-09-15 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 14 September 2016 at 15:49:27 UTC, bachmeier wrote: I agree. That's why I quickly gave up on ddoc. My doc generator just pipes special input text through the latex program to generate an image, which is then inlined in the html: http://dpldocs.info/experimental-docs/test.html

Re: ddoc latex/formulas?

2016-09-15 Thread Manu via Digitalmars-d
On 15 September 2016 at 21:39, Andrei Alexandrescu via Digitalmars-d wrote: > On 9/15/16 5:50 AM, Johan Engelen wrote: >> >> On Wednesday, 14 September 2016 at 11:36:11 UTC, Andrei Alexandrescu >> wrote: >>> >>> On 9/14/16 1:50 AM, Manu via Digitalmars-d wrote: Can we produce formulas, o

Re: ddoc latex/formulas?

2016-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 9/15/16 5:50 AM, Johan Engelen wrote: On Wednesday, 14 September 2016 at 11:36:11 UTC, Andrei Alexandrescu wrote: On 9/14/16 1:50 AM, Manu via Digitalmars-d wrote: Can we produce formulas, or latex in ddoc? Are there any examples in phobos I can refer to? https://github.com/dlang/dlang.org

Re: ddoc latex/formulas?

2016-09-15 Thread Manu via Digitalmars-d
On 15 September 2016 at 19:50, Johan Engelen via Digitalmars-d wrote: > On Wednesday, 14 September 2016 at 11:36:11 UTC, Andrei Alexandrescu wrote: >> >> On 9/14/16 1:50 AM, Manu via Digitalmars-d wrote: >>> >>> Can we produce formulas, or latex in ddoc? Are there any examples in >>> phobos I can

Re: ddoc latex/formulas?

2016-09-15 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 14 September 2016 at 13:56:26 UTC, jmh530 wrote: I learned Latex by playing with LyX. You can get things looking how you want pretty easily. When you copy some code from LyX and paste it somewhere else, the output is the Latex code you need. I do this somewhat frequently because

Re: ddoc latex/formulas?

2016-09-15 Thread Johan Engelen via Digitalmars-d
On Wednesday, 14 September 2016 at 11:36:11 UTC, Andrei Alexandrescu wrote: On 9/14/16 1:50 AM, Manu via Digitalmars-d wrote: Can we produce formulas, or latex in ddoc? Are there any examples in phobos I can refer to? https://github.com/dlang/dlang.org/blob/master/latex.ddoc That's the macro

Re: ddoc latex/formulas?

2016-09-15 Thread Jacob Carlborg via Digitalmars-d
On 2016-09-14 15:38, Manu via Digitalmars-d wrote: I'm kinda feeling ddoc is fairy serious problem. Doxygen is like... a lot better :/ I'm struggling to produce docs I'm happy with. Formatting is hard, macros for everything really sucks! For reference: http://forum.dlang.org/post/nrdgl0$2p21$1

Re: ddoc latex/formulas?

2016-09-14 Thread Andrei Alexandrescu via Digitalmars-d
On 09/14/2016 09:38 AM, Manu via Digitalmars-d wrote: On 14 September 2016 at 21:36, Andrei Alexandrescu via Digitalmars-d wrote: On 9/14/16 1:50 AM, Manu via Digitalmars-d wrote: Can we produce formulas, or latex in ddoc? Are there any examples in phobos I can refer to? https://github.com

Re: ddoc latex/formulas?

2016-09-14 Thread bachmeier via Digitalmars-d
On Wednesday, 14 September 2016 at 13:38:21 UTC, Manu wrote: On 14 September 2016 at 21:36, Andrei Alexandrescu via Digitalmars-d wrote: On 9/14/16 1:50 AM, Manu via Digitalmars-d wrote: Can we produce formulas, or latex in ddoc? Are there any examples in phobos I can refer to? https://gi

Re: ddoc latex/formulas?

2016-09-14 Thread jmh530 via Digitalmars-d
On Wednesday, 14 September 2016 at 13:38:21 UTC, Manu wrote: I'm just gonna come out and say that I really don't feel like taking the few hours it might take me to try and understand what's going on here. I really have better things to do... Considering I don't really know latex either, I jus

Re: ddoc latex/formulas?

2016-09-14 Thread Manu via Digitalmars-d
On 14 September 2016 at 21:36, Andrei Alexandrescu via Digitalmars-d wrote: > On 9/14/16 1:50 AM, Manu via Digitalmars-d wrote: >> >> Can we produce formulas, or latex in ddoc? Are there any examples in >> phobos I can refer to? > > > https://github.com/dlang/dlang.org/blob/master/latex.ddoc > > T

Re: ddoc latex/formulas?

2016-09-14 Thread Andrei Alexandrescu via Digitalmars-d
On 9/14/16 1:50 AM, Manu via Digitalmars-d wrote: Can we produce formulas, or latex in ddoc? Are there any examples in phobos I can refer to? https://github.com/dlang/dlang.org/blob/master/latex.ddoc That's the macros file for generating the language spec in LaTeX format. Andrei