On Wednesday, March 18, 2015 at 6:48:44 PM UTC-7, Lex Trotman wrote:
>
> On 19 March 2015 at 10:08, Ken McGlothlen <[email protected] 
> <javascript:>> wrote: 
> > On Wednesday, March 18, 2015 at 4:28:07 PM UTC-7, Lex Trotman wrote: 
> >> On 19 March 2015 at 08:59, Ken McGlothlen <[email protected]> 
> wrote: 
> > {prologue,tex-prologue? --prologue="{prologue=tex-prologue}"} 
> > 
> > (if prologue or tex-prologue, write out a --prologue option with the 
> > appropriate value. 
> > 
> > Correct me if I'm wrong, of course; that would solve several issues. 
>
> The docs I linked suggest thats right, just try it (I can't test ATM). 
>

Interestingly, sections 30.1 and 30.2 of the userguide state that the value 
on the right side of those conditionals must be a "simple attribute 
reference". It appears that that's not true, because the following is legal 
and works as intended:

{prologue,tex-prologue? --prologue="{prologue={tex-prologue}}"}


and then I can define a default value with

:tex-prologue: prologue.tex


at the top of the file. Zounds.

> Hm. So how can I create the appropriate HTML output here? Where do the 
> > {width} and {height} attributes get read, for example? How can I insert 
> an 
> > optional imagemap? 
>
> In your attributes list, but that only applies to the embedded data-uri 
> IIUC. 
>
> Looking back at your OP, it looks like you copied the [tex-block] from 
> the [image-blockmacro] not from the graphviz filter.  The filter does 
> not have an embedded version.  To embed the image you need to have the 
> output of the encoder base64 encoded, probably best if your filter 
> program took an extra option to do that and print the result to its 
> stdout so you can delete lots of the crap from [image-blockmacro]. 
>
> I'm not sure what HTML tags imagemaps use (I use ASCIIDOC to *avoid* 
> using HTML :) so I'm not sure what you actually want to do, but if it 
> includes extra tags then you need to define your configuration to 
> provide them. 
>

Here's an example of what I'd like to have appear in these cases:

<div class="imageblock tex">
<div class="content">
<map name="tex-meta-example">
  <area shape="rect" coords="0,34,23,42" 
href="msd-2015-v0-20150205-mcglk.html#def-name" alt="definition of ‘name’" 
/>
  <area shape="rect" coords="54,40,76,48" 
href="msd-2015-v0-20150205-mcglk.html#def-ident" alt="definition of 
‘ident’" />
  <area shape="rect" coords="94,28,112,36" 
href="msd-2015-v0-20150205-mcglk.html#def-digit" alt="definition of 
‘digit’" />
  <area shape="rect" coords="92,40,114,48" 
href="msd-2015-v0-20150205-mcglk.html#def-ident" alt="definition of 
‘ident’" />
</map>
<img id="tex-meta-example" src="meta-example.png" 
usemap="#tex-meta-example" style="width: 280px; height: 50px;" />
</div>
<div class="title">Figure 3. Metalanguage example</div>
</div>


The stuff with the red background is what's currently emitted on stdout 
from tex2img, derived from the original TeX file. I'd love to know how to 
put that into a configuration. Note that most images don't have any 
imagemaps at all, but when they do, there are a variable number of links at 
different locations.

(Attached is the image that goes with the above <map> and <img> tags:)

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.

Reply via email to