Hi all,

I am trying to produce some documentation with asciidoc and really enjoying 
the fact that I can take the exact same file and compile it to pdf and/or 
html. However, I am having a problem formatting some code. In particular, I 
cannot get a dollar-sign to show up in the html5 version of a code block. I 
have text like this:

--> Begin my example...
Create a shell script to run your simple job, +do_a_cccoh_run.sh+:

ifdef::basebackend-docbook[[source,bash]]
ifdef::basebackend-html[[source,bash]]
---------------------------
#!/bin/sh
gevgen -n 5 -p 14 -t 1000060120 -e 0,10 --run 100 \
  -f 'x*exp(-x)' \
  --seed 2989819 --cross-sections $XSECSPLINEDIR/coh_carbon_splines.xml \
  --event-generator-list CCCOH
---------------------------
<-- End of my example.

And I compile with this script:

--> My script.
#!/bin/sh
DOCNAME=DeveloperManual_v0.1.adoc
asciidoc $1 -b html5 -a latexmath -a data-uri -a toc2 ${DOCNAME}
# a2x $1 -a latexmath -f xhtml ${DOCNAME}
a2x $1 -a latexmath -f pdf ${DOCNAME}
<-- My script.

You can see from the comment I tried xhtml also. The $1 arg is for cases 
when I want to pass in "-v".

The html version comes out very nicely colored, but with no dollar sign 
before XSECSPLINEDIR. The pdf version is fine. 

I also tried a snippet like this:

--> Begin my example
Compare

[source,perl]
--------------
my @tripled = map { $_ * 3 } @numbers;

my @tripled;
for my $num (@numbers) {
  push @tripled, $num * 3;
}

my @tripled;
for (my $i = 0; $i < scalar @numbers; $i++) { 
  $tripled[$i] = $numbers[$i] * 3;
}
--------------
<--- end my example

with just: asciidoc -b html5 -a latexmath -a data-uri -a toc2 mperl.adoc

The colors are beautiful and all the symbols are rendered except the dollar 
sign. If I compile for pdf:

a2x -f pdf mperl.adoc

everything looks great.

Can anyone offer any hints? 

Thanks!

pax
Gabe

-- 
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/groups/opt_out.

Reply via email to