3
votes
1answer
52 views

Check if a number is in a comma separated list (print or display selected sections from a specific list)

I'm trying to check if a section number belongs to a specified list: \ifnum\value{section}=\mylist % check if section number in mylist --- WRONG \dosomething \fi The conditional is ...
18
votes
7answers
599 views

How to define a command to feed the contents of a list into an \ifcase construct?

It's common to use an \ifcase construct to redefine a command depending on the value of a counter. The following example illustrates this: \documentclass{article} \usepackage{xcolor} ...