Re: DDOC adds emphasis on symbols, so how to use $(LINK a) properly?

2015-12-02 Thread kraybit via Digitalmars-d-learn

Just wanna follow up.


Thanks for the replies everyone. Helped a lot!


***


Hmm, this might be out of line, but I can't help myself. I got an 
idea. I guess a nice feature would be something like a built-in 
clean representation of macro arguments, so that you could define 
LINK as



LINK = $0


Or perhaps an immutable built-in macro?


LINK = $0


And then it would always work? I mean it seems most macros 
generate HTML, and then anything is fine really. But there are 
those special cases when you're generating something other than 
HTML, such as an URL, or even JavaScript-code, and you really 
need to get rid of all "cleverness".


I've understood you always end posts like this with:
Destroy!

So there, I did it :)
Cheers!


DDOC adds emphasis on symbols, so how to use $(LINK a) properly?

2015-12-01 Thread kraybit via Digitalmars-d-learn

Hello!


Just trying out the built-in ddoc, and it's great!

But is there any way to link to other packages/modules, without 
adding "_" everywhere? Consider:



// mylib/package.d

/**
*  Also see $(LINK mylib.image.pixel.html)
*/
module mylib;
...


This will generate a link, but the href will be 
"mylib.image.pixel.html", which won't work in my browser 
at least (Chromium). This can be fixed with:



$(LINK _mylib.image.pixel.html)


Ok, great. But wait a minute. How do I know that 'image' and 
'pixel' won't be emphasized symbols in the future? It seems, to 
be sure, I must write:



$(LINK2 _mylib._image._pixel.html)


And then follows, if I link to any page, I must follow the same 
pattern?



$(LINK _blog._site._com/_id/3532.html)


I'm not even sure that works. But you see my worry?
How do I use $(LINK)s properly?



Cheers!
Kind regards
/kbit


Re: DDOC adds emphasis on symbols, so how to use $(LINK a) properly?

2015-12-01 Thread kraybit via Digitalmars-d-learn

On Tuesday, 1 December 2015 at 15:32:56 UTC, Adam D. Ruppe wrote:

On Tuesday, 1 December 2015 at 15:15:50 UTC, kraybit wrote:
But is there any way to link to other packages/modules, 
without adding "_" everywhere? Consider:


sort of. You could define a custom macro

DDOC_PSYMBOL=$0

I think anyway... to make it just emit the original text 
without the  tag.




I think the automatic emphasis is a mistake anyway because it 
often highlights homonyms which is just silly looking. Do 
perhaps disabling it with the above macro is a good idea, then 
you can manually $(B it) when you want it to be bolded instead 
of _ing it when you don't want it bolded.



Thanks, that worked!
I'm happy :)


Cheers!





Re: DDOC adds emphasis on symbols, so how to use $(LINK a) properly?

2015-12-01 Thread kraybit via Digitalmars-d-learn

On Tuesday, 1 December 2015 at 15:33:59 UTC, anonymous wrote:

On 01.12.2015 16:15, kraybit wrote:

 /**
 *  Also see $(LINK mylib.image.pixel.html)
 */
 module mylib;
 ...


This will generate a link, but the href will be
"mylib.image.pixel.html", which won't work in my 
browser at least

(Chromium). This can be fixed with:


 $(LINK _mylib.image.pixel.html)


Ok, great. But wait a minute. How do I know that 'image' and 
'pixel'

won't be emphasized symbols in the future?


'mylib' is emphasized because it's the module name and you're 
documenting the module declaration there. That is, identifiers 
are only emphasized automatically when they're used in the 
declaration that is being documented. 'image' or 'pixel' would 
only be emphasized if you changed the module name to 'image' or 
'pixel'.


Hm, I see, so it's contextual? Would 'pixel' then be emphasized 
if I'm in the documentation of void pixel()?


I just get the feeling I need to think before using LINK. I'd 
like to not think, too  much. It doesn't also seem clear when 
this happens. Will $(LINK forum.com/pixel/98) work? Or does it 
need a "_"?


Anyway, turning it off is good enough for me.

Thanks for the reply!



rdmd --makedepend requires -of; how to just print to stdout?

2014-09-07 Thread kraybit via Digitalmars-d-learn
In 2.065 rdmd would just print the stuff from --makedepend to 
stdout, now it seems to require -of. How to print to stdout like 
before? (On Windows)


cheers!
/k