josephwright / josephwright/beamer
\includeonlylecture does not account for earlier section structures
@josephwright is already working on this.
Since Nov 27, 2016.
- Dominant language
- TeX
- Stars
- 1.7k
- Forks
- 164
- PR merge metrics
- No merged PRs in 30d
Description
Originally reported by: torsten_wagner (Bitbucket: torsten_wagner, GitHub: Unknown)
\includeonlylecture{ effectively truncates the section mechanism at the start of a new document (lecture) and makes it fail. It does not take care that a higher level section might be placed in an earlier, but not included lecture. In my opinion this is a bug, as otherwise it renders \includeonlylecture rather useless.
E.g. take a two different lectures
#!
lecture1: contains \section{FOO}
lecture2: contains \subection{FOO over BAR}
#!
Compiling the entire document: -> ok
using \includeonlylecture{lecture1}: -> ok
using \includeonlylecture{lecture2}: -> fails
in the last case, the section number is wrong, since the final document never saw the definition of \section{FOO}. As I understood it, we would need to parse all possible lectures first and extract section headers and number them (first run?), after that, we would need to check which lectures are requested and add all necessary higher sections just in front of the first starting lecture as well as set the section counter to the correct values to get numbering and sections finally right.
Thus for the first example the final tex document would need to look like
#!latex
\section{FOO}
\include{lecture2}
In my case several lectures can share a single section and subsections, sometimes a single lecture is only a subsection of a much larger parent section. A section number to lecture relation might look like this
lecture 1
1.1. lecture 2
1.2. lecture 3
1.3-1.5 lecture 4
1.6 lecture 5
1.7-1.8 and 2 lecture 6
....
Would be glad if this could be fixed in some way, since it really troubles me.
Thanks a lot for looking into it
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.