How to keep numbering consistent across enums?

#set page(
  paper: "a4",
  numbering: "1 of 1"
)

#let marks(mk, qs) = [
  #mk × #qs = #(mk * qs)
]


#let blanks = "_______________"

#align(center)[#text(size: 14pt)[*KERALA VETERINARY AND ANIMAL SCIENCES UNIVERSITY*] \
#v(0.2em)
*B.TECH FOOD TECHNOLOGY* #text(fill: red)[*2023 Admission \
#v(0.2em)
4#super[th] Semester Final Examination - August 2025*]]

#v(1em)


#grid(
  columns: (1fr, 1fr),
  align(left)[
    *Course Catalogue:* \
    *Title:*
  ],
  align(right)[
    *Max. Marks: 50* \
    *Time: 2 Hours*
  ],
)

#line(length: 100%)
*Instructions:*
#v(0.1em)
- Attempt all Part-A questions Q. Paper itself.
- Do not write your name or admission number anywhere in the Q. paper.
- This Q. paper has to be attached securely with the main answer book

#line(length: 100%)
#v(0.5em)
#align(center)[#text(size: 13pt)[*Part - A*]]

#set enum(numbering: "I",spacing: 1.2em)
#grid(
  columns: (80%,20%),
  align(left)[
    + *Fill in the Blanks:* 
    #v(0.8em) 
      #set enum(numbering: "1.")
      + #blanks involves setting objectives and deciding in advance the actions to achieve them.
      + The #blanks function of management involves getting work done through others.
      + #blanks refers to authority flowing from top to bottom.
      + 9.	GDP at market prices includes #blanks and excludes subsidies.
      + In economics, #blanks is a sustained increase in general price levels.
      + As income increases, the demand for inferior goods #blanks.
      + #blanks is known as the father of scientific management. 
      + According to companies act, a company should spend at least #blanks of its average net profit on CSR activities.
      + The change in total product per unit change in the quantity used of one input is #blanks.
      + GDP - Depreciation is #blanks.
      +  The AVC and AC curves are #blanks -shaped
  
  
  ],
  align(right)[
    *#marks(0.5,10) Marks* 
  ],
)
#v(0.5em)

#set enum(numbering: "I",start:2,spacing: 1.2em)
#grid(
  columns: (80%,20%),
  align(left)[
    + *Write True or False:* 
    #v(0.8em) 
      #set enum(numbering: "1.",start: 1)
      + Indifference curves intersect each other. 
      + The law of demand states that as the price of a commodity increases, the quantity demanded decreases.
      + The law of diminishing returns applies only in the short run.
      + The actual expenditures of the firm to purchase or hire the inputs it needs is called explicit costs.
      + Line authority defines the established path for communication and direction within an organization, from top to bottom. 
      +  The perfectly competitive firm is a “price taker”
      +  In the long run, all factors of production and all costs are variable. 
      +  Economic cost is generally lower than accounting cost.
      +  Campus Interviews are source of recruitmnent of fresh talents.
      +  Two goods are complements if their cross price elasticity is positive.
      
  
  
  ],
  align(right)[
    *#marks(0.5,10) Marks* 
  ],
)

#v(0.5em)

#set enum(numbering: "I",start: 3)

#grid(
  columns: (80%, 20%),
  align(left)[
    + *Choose the Correct Answer :* 
    #v(0.8em) 
      #set enum(numbering: "1.",start: 1,spacing: 1.2em)
      + Which of the following is NOT a common area of focus for CSR initiatives? 
        
       #set enum(numbering: "a)") 
        + Environmental Sustainability   
        + Employee Welfare
        + Profit Maximization 
        + Community Development 
   
      +  Indifference curve analysis was developed by 

       
        #set enum(numbering: "a)") 
        + Hicks
        + Mankiw
        + Samuelson
        + Friedman
       
      + Macroeconomics as a branch was introduced in
       #set enum(numbering: "a)") 

        +  1936
        +  1945
        +  1956
        +  1890  
  
      + The assets that can be easily converted into cash within a short period, i.e., 1 year or less are known as
        #set enum(numbering: "a)") 

        + Fixed Assets
        + Current Assets 
        + Liquid Assets
        + Intangible Assets

      + Which of the following is not a 'need' according to Maslow's hierarchy of needs?
        #set enum(numbering: "a)") 
        
        + Physiological needs 
        + Safety needs
        + Social needs
        + Technological needs
 
        #v(2em)
  
      + In a free-enterprise economy, the problems of what, how, and for whom are solved by 
       #set enum(numbering: "a)") 
        
        + The government
        + The consumers
        + The producers
        + The market mechanism 
      
      + When the price of a substitute of commodity X falls, the demand for X 
       #set enum(numbering: "a)") 
         
        +  Increases
        +  Decreases 
        +  Remains unchanged
        +  Any of the above
      
      + When the law of diminishing returns begins to operate, the TVC curve begins to 
       #set enum(numbering: "a)") 
        
        +  Rise at a decreasing rate
        +  Rise at an increasing rate
        +  Fall at a decreasing rate
        +  Fall at an increasing rate  
      
      + At Break-even point, the total revenue is equal to #set enum(numbering: "a)") 
        
        +  Total cost
        +  Average cost
        +  Marginal cost
        +  Average variable cost  
      
      + Which of the following is not a part of job description?
       #set enum(numbering: "a)") 
        
        + Job Title
        + Job Purpose 
        + Job Specification
        +  Induction Programme   

      
      
  ],
  align(right)[
    *#marks(0.5,10) Marks* 
  ],
)

#v(0.5em)
#set enum(numbering: "I",start: 4)

#grid(
  columns: (1fr, 1fr),
  align(left)[
    + *Match the Following :* 
  #v(0.8em)
  ],
  align(right)[
    *#marks(0.5,10) Marks* 
  ],
)

#table(
  columns: (5%,30%,5%,30%,30%),
  rows: (4em,2.5em),
  align: (x,y) =>{if y == 0{
    center+top
  } else{
    center

  }
  },
  
  table.header(
    repeat: false,
    [], [*Column A*], [],[*Column B*],[*Answer* \
    (Write the alphabet of Column B)]
  ),
  [1],[GNP],[A],[The Wealth of Nations],[#h(0.8em)1 --],
  [2],[Alfred Marshall],[B],[MR = MC],[#h(0.8em)2 --],
  [3],[Profit maximising condition],[C],[Positive Income Elasticity],[#h(0.8em)3 --],
  [4],[Adam Smith],[D],[GDP - taxes + subsidies],[#h(0.8em)4 --],
  [5],[Giffen Goods],[E],[Principles of Economics],[#h(0.8em)5 --],
  [6],[GVA],[F],[GDP - Depreciation],[#h(0.8em)6 --],
  [7],[Shut Down Point],[G],[$ P < min("AVC") $],[#h(0.8em)7 --],
  [8],[Normal Goods],[H],[Negative Income Elasticity],[#h(0.8em)8 --],
  [9],[A.H Maslow],[I],[Expectancy Theory],[#h(0.8em)9 --],
  [10],[Victor Vroom],[J],[Hierarchy of Needs],[#h(0.8em)10 --],
)


#v(0.5em)
#align(center)[#text(size: 13pt)[*Part - B*]]

#set enum(numbering: "I",start: 5)
#grid(
  columns: (80%, 20%),
  align(left)[
    + *Define the following terminologies in one or two sentences:* 
      #set enum(numbering: "1",start: 1) 

      + Monopoly
      + Indifference Curve
      + Recruitmnent
      + Planning
      + Short run costs
  ],
  align(right)[
    *#marks(1,5) Marks* 
  ],
)

#set enum(numbering: "I",start: 6)
#grid(
  columns: (80%, 20%),
  align(left)[
    + *Write short notes on any FOUR of the following:* 
      #set enum(numbering: "1",start: 1)
      
      + Price Effect
      + CSR
      + Cobb-Douglas Production Function
      + Hierarchy of needs theory
      + Break even point 
  ],
  align(right)[
    *#marks(2.5,4) Marks* 
  ],
)

#set enum(numbering: "I",start: 7)
#grid(
  columns: (80%, 20%),
  align(left)[
    + *Describe with necessary details any THREE:* 
      #set enum(numbering: "1",start: 1)

      + Elasticity of Demand 
      + Cournot Oligopoly
      + Economic Cost, Opportunity Cost and Accounting Cost
      + Scientific Principles of Management
  ],
  align(right)[
    *#marks(5,3) Marks* 
  ],
)

#line(stroke: (thickness: 2pt, dash: "dash-dotted"),
start: (40%,12%),length: 22%)



Here i try to set a question paper. Is there an efficient method to do this? i mean at each change of type of question, i want numbering to change, but sublist items are always arabic

I’m not sure why you use emun for the exercise headings. But you can use a custom function with a counter to get the desired result.

Here you can found a rework of your first question
https://typst.app/project/r4sAkKpW52Z7QWF3fydAqD

This is the relevant part

#show heading.where(level: 1): set text(13pt, weight: "bold")
#show heading.where(level: 1): set align(center)

#set enum(numbering: "1.")

#counter("question").update(0)

#let question(title, mks, body) = [
#counter("question").step()
#context counter("question").display("I")
#h(0.25em)
#text(weight: "bold", [
  #title
  #h(1fr)
  #mks
])
#box(width: 80%, inset:(top: 0.8em), body)
]

Then you can use

= Part - A

#question("Fill in the Blanks", marks(0.5, 10))[
  + #blanks involves setting objectives and deciding in advance the actions to achieve them.
  + …
]
1 Like

For numbers, you can use e.g. 1. and 2. to pin the enum numbers to specific values:

1. abc
def

2. ghi (this is 2 and was not reset)

For the numbering format, you don’t have to set enum(numbering: ...) each time. See here how to define numbering that changes for each enum level:

Thanks. This is wonderful. Making my way into learning typst!!

1 Like

just one clarification, what if i want to have that grid only for mentioning type of question and marks,but questions can take full width? can i save this formatting rule as a variable?

Then you should just remove the box around the body. :slight_smile:
The question type and marks are layouted without any grid in my example.

#let question(title, mks, body) = [
#counter("question").step()
#context counter("question").display("I")
#h(0.25em)
#text(weight: "bold", [
  #title
  #h(1fr)
  #mks
])
#body
]