Mitch's suggestion will work well, especially if you want to bring that file in
to actually also be part of your source and do what it is meant to do. I think
it is a "parse" attribute on "xi:include". Try the search function in the
Guide, it is documented.
"<" and "&" are special, no avoiding it. Gotta escape them. Search Guide on
"special characters", "xml characters", "dangerous characters".
But you won't want to escape them all! Pssst: this is a place where "CDATA" is
appropriate. I didn't just say that on the support list. Search on CDATA.
Sketchy, and reliant on our new search function. ;-) I'll trust that is enough
of a nudge. Follow-up on logistics or on overarching principles of markup
languages and the necessity of escape sequences.
Rob
On 3/4/23 15:21, Mitch Keller wrote:
> Look in the basics reference of the Guide. The easiest thing to do is to put the
> code into a separate file and then xi:include it using mode (?) text. I think we
> use listing in the basics reference.
>
>> On Mar 4, 2023, at 5:20 PM, David Austin <
david.a...@gmail.com> wrote:
>>
>> I'd like to include some verbatim XML code samples in a PTX document I'm
>> working on. I've tried various combinations of <listing>, <program>, <pre>,
>> <cd>, and others. Can someone give me a nudge in the right direction?
>>
>> Thanks,
>> David
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "PreTeXt support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to
pretext-suppo...@googlegroups.com
>> <mailto:
pretext-suppo...@googlegroups.com>.
>> To view this discussion on the web visit
>>
https://groups.google.com/d/msgid/pretext-support/CANXmVMAN9WpzuUR1D5q6kNFohVUzNw2-XfKNboWVvhUkJeDXiw%40mail.gmail.com <
https://groups.google.com/d/msgid/pretext-support/CANXmVMAN9WpzuUR1D5q6kNFohVUzNw2-XfKNboWVvhUkJeDXiw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to
pretext-suppo...@googlegroups.com
> <mailto:
pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/pretext-support/4FD86769-B895-4FA4-9BEB-CD464CA5D8B1%40rellek.net <
https://groups.google.com/d/msgid/pretext-support/4FD86769-B895-4FA4-9BEB-CD464CA5D8B1%40rellek.net?utm_medium=email&utm_source=footer>.