1

I need to give a reference to a list item in plain TeX. I have a numbered list with a custom style.

\begitems \sdef{item:F}{\bf FP\the\itemnum\kern.25em} \style F
    * List item 1
    * List item 2
    * List item 3
\enditems

The list gives out the following result:

FP1 List item 1
FP2 List item 2
FP3 List item 3

where FPx is the bullet.

I want to reference the indidividual list items so that the FPx shows up in the referencing text, such as:

As seen in the bullet FPx.

How would I go on with that? I've seen something similar is possible to do in Latex, but I have no clue how to approach it in plain TeX.

I have tried to add a \label to the bullet, but \ref will render only as a reference to the \secc above it.

  • Are you using OPmac? – User Dec 12 '15 at 8:33
  • Yes, i am using OPmac. – jiroch Dec 12 '15 at 8:34
  • Then read last sentence of part 3 of the user manual for OPmac, you should find the answer there – User Dec 12 '15 at 8:38
  • Thank you very much. I see what I'm missing. I have edited the question to better express what I need and cannot find even in the OPmac manual. – jiroch Dec 12 '15 at 8:47
2

You can do something like this:

\input opmac

\begitems \sdef{item:F}{\bf FP\the\itemnum\kern.25em \wlabel{\bf FP\the\itemnum\kern.25em}} \style F

  * List item 1
\label[item]
  * List item 2
  * List item 3

\enditems


I'm referring to \ref[item].

\bye
  • You're the best, this works perfectly. And I learned a little bit more of TeX in the process. Thank you! – jiroch Dec 12 '15 at 9:06
  • I'm happy you find this useful :) – User Dec 12 '15 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.