6

Recently i work on presentation prepared with Beamer. every time when i made some error in document typing X in editor (WinEdt,) open me file .vrb with frame, where i made error.

That is fine, but not much useful to me. correction done there are not transferred to my document. so i wondering, what is purpose of this file? only to more easy find this frame in document?

edit:

i research again when .vrb file is open. its not caused with some error but when i use "back search" facility of pdf previewer (Sumatra in my case) and click on the shoved slide. if it contain verbatim text, than this open .vrb file and nod return to .tex file, where is code for this frame. otherwise this doesn't happen.

anyway, i'm still curious about how this file displayed in editor can be useful for someone. let me noted, that in .verbis only part of frame code.

Zarko
  • 296,517
  • 1
    Isn't this the verbatim file created when you use the fragile option? – daleif Oct 24 '18 at 19:22
  • @daleif, hm, so far didn't notice this. in open file i see the frame, which may contain some verbatim text (which is not in error). hm, i must check this again ... – Zarko Oct 24 '18 at 19:36
  • 1
    I'm quite sure this is exactly how fragile works – daleif Oct 24 '18 at 19:37
  • @daleif is totally right. You can also see that the content of a fragile frame is outsourced to the .vrb file by using synxtex: Try to jump from the pdf to the code of a fragile frame and you will end up in the .vbr file instead of the .tex file. – samcarter_is_at_topanswers.xyz Oct 24 '18 at 20:04
  • 2
    The .vrb file is created by a macro \beamer@doexternalframe which, in turn, is called by beamer's frame parser when the switch \ifbeamer@isfragile is true. – Phelype Oleinik Oct 24 '18 at 20:06
  • 1
    @PhelypeOleinik So sad. I always thought vrb would stand for very reasonable bug, but now you've taken my illusion... ;-) –  Oct 24 '18 at 20:30
  • 1
    @marmot Perhaps the \ifbeamer@isfragile isn't referring to the contents of the frame, but to the code. Then your hypothesis might be true :) – Phelype Oleinik Oct 24 '18 at 20:34
  • Vaguely related (certainly no duplicate) question: https://tex.stackexchange.com/questions/340292/synctex-and-fragile-beamers-frame – samcarter_is_at_topanswers.xyz Oct 24 '18 at 21:48

1 Answers1

5

The content of the body text of fragile frames gets a special treatment. Instead of processing it multiple times, like normal beamer frames, it is written to a special file, the .vrb (I assume this is short for verbatim?) and read directly from there. This allows you to have code in the frame, which would normally not work with beamer.

Synctex will always link to the file from where the problematic code was read in. For example if there is an error within a package, it will link to the .sty file. This also means that if there is an error within the fragile frame it will link to the .vrb file.

In theory you could use some sed replacement to replace the name of the vrb file with the original tex file in the syntex file (similar what to what ltx2any does to deal with build folders), but this would need some magic to get the line numbers right.

  • thank you for explanation. it convinced me even more, that .vrb file rather distract me than help in preparation of slides. i case of observed error you can't return from slide to real file in editor using back search mechanism of sumatra for example. – Zarko Nov 05 '18 at 16:07
  • After six year I return to beamer again ... Many frames are in fragile mode, and appearing vrb. frame in editor is unfortunately (at least to me) only disturbing in writing of presentations. Is there a way to block it to show in editor or that "magic" mentioned in your answer will be available soon? – Zarko Feb 26 '24 at 15:28
  • @Zarko Whether or not your editor will open the .vrb files is completely up to your editor. – samcarter_is_at_topanswers.xyz Feb 26 '24 at 15:35