All Questions
136
questions
3
votes
2
answers
67
views
Add "identifiers" to questions for printing
So, I have this code that lets me number questions/ exercises according to chapters ("Exercise 1.1", etc). I have one count to "identify" the question and one count to display the ...
0
votes
1
answer
44
views
Numbering exercises by chapter and printing solutions by chapter in appendix
So, I have a basic tcolorbox that I want to write my exercises in. I want the exercises to be numbered by chapter, i.e. Exercise 1.1 is exercise 1 in chapter 1 (and still be able to print the answers ...
0
votes
1
answer
58
views
Stepslist: "Step k of n"
I am trying to come up with a new enumerated list environment "stepslist" such that the items are marked with "Step k of n", where n is the total number of items in one stepslist ...
2
votes
0
answers
51
views
Missing \endcsname inserted while increasing a counter in a command
Given the following WE
\documentclass[12pt]{article}
\usepackage{unicode-math}
\usepackage{mathtools}
\usepackage[most]{tcolorbox}
\newtcolorbox{mybox}{
sharp corners
}
\newcounter{mycounter}
\...
0
votes
1
answer
49
views
Number rows of table in decimal and hexadecimal with multiple counters
TL;DR My code to automatically number a table with two running counters in decimal and zero-padded hexadecimal (using the fmtcount and array packages) is not working.
I'm trying to automatically ...
0
votes
0
answers
29
views
Custom object that increments when inserted and can be referenced with labels
I would like to create abbreviation such as CE1, CE2, etc. that as I introduce them through the document they automatically increase the counter. I would also be able to later reference them in the ...
0
votes
1
answer
118
views
Displaying Answers Using the Exam Class (too many lines in vbox - make two columns)
I use the exam class to write multiple choice tests in a couple of my classes. I use the following code to collect and then display the correct answers at the end of the test using the command \...
1
vote
1
answer
246
views
When LaTeX expand or not expand the macro in various auxiliary files and how to include a user-defined counter in the chapter name?
Some examples to show how LaTeX deals with macro inside the chapter/section title
Example 1
A very basic LaTeX chapter and reference process goes like this
\documentclass{book}
\usepackage{hyperref}
\...
1
vote
3
answers
78
views
How to define \newcommand as number from file using \input
I'm trying to pull a number from an external text file that contains nothing but that number and use it to define a command which I can then use to set a counter, but it doesn't seem to work.
Here is ...
1
vote
0
answers
94
views
How to make two existing counters truly synchronized?
In my document, there is an object that should share the same counter (value) with section, that is, when the counter section gets changed, it should change accordingly, and vice versa. I did this by ...
0
votes
1
answer
313
views
How to reduce one counter
In the MWE below, the excoutP is added to store the value of excout.
How can we only use the counter excout?
\documentclass{article}
\usepackage{etoolbox}
\usepackage{xcolor}
\...
0
votes
1
answer
170
views
Count total marks and questions
I'm trying to calculate the total number of questions and total marks based on an exam paper I'm currently writing.
My MEW:
\documentclass[10pt]{exam}
\begin{document}
\section*{Section 1}
This ...
1
vote
1
answer
97
views
Problems with newcommand and counter for filling a longtable
I am trying to create a form for orders. The heart of this document is a srclttr2 with a longtable to even get a nice document for long orders. To make this template more flexible/easy I would like to ...
3
votes
4
answers
688
views
How to iterate through macro parameters in a for loop? or how to expand a macro parameter with a counter?
I'm trying to expand a macro argument with a counter inside a for loop with the next code:
\documentclass{article}
\usepackage{xparse}
\usepackage{forloop}
\NewDocumentCommand\test{m O{II} O{III} O{...
1
vote
1
answer
144
views
Quiz with answer (please recommend me a format of TeX document)
I want to make a quiz using TeX that "looks like"
Problem 1) Let $f(x)=x^2$. Evaluate $f'(1)$.
Problem 2) Let $A$ be a matrix such that
$$A=\begin{bmatrix}3&1\0&1\end{bmatrix}$$ ...