On 19 March 2015 at 12:31, Ken McGlothlen <[email protected]> wrote:
> 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]> 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.
Erm, 30.2 uses <names> throughout (note the plural) and then says:
"The attribute <names> parameter normally consists of a single
attribute name but it can be any one of the following:
A single attribute name which evaluates to the attributes value.
Multiple , separated attribute names which evaluates to an empty
string if one or more of the attributes is defined, otherwise it’s
value is undefined.
Multiple + separated attribute names which evaluates to an empty
string if all of the attributes are defined, otherwise it’s value is
undefined.
Conditional attributes with single attribute names are evaluated first
so they can be used inside the multi-attribute conditional<value>."
So I'm not sure where you are quoting :)
>
>> > 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.
My quick googling says the img tag has to refer to the map with a
usemap=#name attribute. Thats something that a normal img block
doesn't do.
You need to define your own image block that does that and is set as
the template of the filter style, then you can use the | to locate the
output of the program where you want it.
I suggest you start with a minimal example and build up, rather than
trying to copy the standard image-block which does stuff like embedded
URIs and so on as well. And the standard graphviz filter which does
svg stuff and so has a variable template value is again more than you
initially need. Look at the code filter example, than add your own
template block so you can position the filter output and can add the
extra attribute you need.
Cheers
Lex
>
> (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.
--
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.