syntax error with autonumber

0 votes
asked Jun 14, 2021 in Question / help by darshakthakore (120 points)
Hi all,

Recently I seem to be always getting an error when I add "autonumber" at the beginning of the plantuml file. I have the following as my template

@startuml
!pragma teoz true

hide footbox
autonumber
title put title

@enduml

and it always gives me error at where ever i have the "autonumber" command. What am I doing wrong ?

1 Answer

0 votes
answered Jun 14, 2021 by The-Lu (64,340 points)

Hello D.,

  • What are your PlantUML version?

FYI, here is the result (OK) with the last online version:

@startuml
!pragma teoz true

hide footbox
autonumber
title put title

a -> b 
a <- b
@enduml

If that can help,
Regards,
Th.

commented Jun 16, 2021 by Martin (8,360 points)
edited Jun 16, 2021 by Martin
I think the issue is that "autonumber" gives a syntax error if you haven't specified any participants (either explicitly or implicitly).
Maybe the "autonumber" prompts the parser that this is a sequence diagram; but then an empty sequence diagram isn't supported.  (Without the "autonumber" it might be being processed as a different diagram type that does support an empty diagram).

The OP refers to "my template"; so I wonder if they are using it as an include file in some way.
...