Implement a similar patch like in this post https://sourceforge.net/p/ctags/patches/76/ so that LaTeX beamer presentations are sorted by slides instead of sections
Thank you for making this issue.
Do you have an example input?
I would like to include it as a test case into our repository.
is a good example but it doesn't use \frametitle
.
It uses \begin{frame}{AN ITEM WE WOULD LIKE TO TAG}
.
I have already implemented functions for captruing \frametitle
.
However, \begin{frame}{...}
is not yet.
I think this one can be used, I changed the titles to use \frametitle
keyword
https://github.com/jagjordi/IL2239-presentation
Still struggling.
Is there any way I can help with this?
Could you try #2424?
Hello @masatake
I have a suggestion to modify the behaviour of the parser in a beamer presentation.
If a arrangement of slides as this is written
Frame 1
|-- Subframe 1.1
|-- Subframe 1.2
|-- Subframe 1.3
Frame 2
|-- Subframe 2.1
|-- Subframe 2.2
Normally I would have the same title repeated as many times as "sub-slides" exist. For example
\frametitle{Frame1}
\framesubtitle{Subframe1.1}
\frametitle{Frame1}
\framesubtitle{Subframe1.2}
\frametitle{Frame1}
\framesubtitle{Subframe1.3}
\frametitle{Frame2}
\framesubtitle{Subframe2.1}
\frametitle{Frame2}
\framesubtitle{Subframe2.2}
With the current behaviour of the parser it will generate a tag entry for every time the command frametitle
is used. I would argue that generally the behaviour sould be that it only generates a tag entry the first tame that the command is used, and subsequent uses of the command (with the same title name) will "point" to the first usage.
Let me know what you think?
Regards,
I will work on this item after merging https://github.com/universal-ctags/ctags/pull/2450.
It will take a longer time than you assume.
In #2450, I will introduce a symbol table.
With that we can write the following code:
tagEntryInfo *tag = lookupTag ("Frame1");
if (! (tag && kinfOf(tag) == "frametitle"))
skip();
else /* a frame title we have never seen. */
makeTag ();
Sounds great. Let me know if you need something to be tested 👍
It works partially.
A bit more work is needed.
[yamato@slave]~/var/ctags-github% cat /tmp/input.tex
cat /tmp/input.tex
\frametitle{Frame1}
\framesubtitle{Subframe1.1}
\frametitle{Frame1}
\framesubtitle{Subframe1.2}
\frametitle{Frame1}
\framesubtitle{Subframe1.3}
\frametitle{Frame2}
\framesubtitle{Subframe2.1}
\frametitle{Frame2}
\framesubtitle{Subframe2.2}
[yamato@slave]~/var/ctags-github% ./ctags --sort=no -o - /tmp/input.tex
./ctags --sort=no -o - /tmp/input.tex
Frame1 /tmp/input.tex /^\\frametitle{Frame1}$/;" f language:TeXBeamer
Subframe1.1 /tmp/input.tex /^\\framesubtitle{Subframe1.1}$/;" g language:TeXBeamer frametitle:Frame1
Subframe1.2 /tmp/input.tex /^\\framesubtitle{Subframe1.2}$/;" g language:TeXBeamer frametitle:Frame1
Subframe1.3 /tmp/input.tex /^\\framesubtitle{Subframe1.3}$/;" g language:TeXBeamer frametitle:Frame1
Frame2 /tmp/input.tex /^\\frametitle{Frame2}$/;" f language:TeXBeamer
Subframe2.1 /tmp/input.tex /^\\framesubtitle{Subframe2.1}$/;" g language:TeXBeamer frametitle:Frame2
Subframe2.2 /tmp/input.tex /^\\framesubtitle{Subframe2.2}$/;" g language:TeXBeamer frametitle:Frame2