Bug in converting to latex with \noindent?

15 views
Skip to first unread message

phario

unread,
Oct 7, 2025, 4:02:45 PMOct 7
to PreTeXt support
I'm trying to understand what has happened here: 
Screenshot 2025-10-07 at 21.00.55.png

On the right hand side, you can see I get a render of "\noindentWe" (no space between \noindent and "We"), which obviously results in an error. 

I compiled the right document using the pretext compile to latex option. 

Could it be an issue with lists? 


phario

unread,
Oct 7, 2025, 4:26:26 PMOct 7
to PreTeXt support
In checking the above, I realised that pretext is not doing a good conversion of <answer>...</answer> environments. Such environments seem to be discarded in the latex source?

Oscar Levin

unread,
Oct 7, 2025, 5:31:50 PMOct 7
to pretext...@googlegroups.com
An <answer> is not a valid element in a list.  To use <answer>, you need to be inside an exercise-like or example-like element. 

If you are trying to have a multi-part question like that, you can use <task>.  So a valid structure can look like:

<exercise>
  <introduction>
     <p>....</p>
  </introduction>
  <task>
    <statement>
      <p>....</p>
    </statement>
    <answer>
      <p>...</p>
    </answer>
  </task>
  <task>....</task>
</exercise>


--
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.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/f74fca18-e7ac-424f-858c-11f7b743ffd5n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages