[tex-live] Boxes and synctex

Lars Madsen daleif at imf.au.dk
Fri Mar 22 10:19:14 CET 2013


A further observation

the frame is added by memoir via \framepictextfoot using \framebox

So I though, hmm, lets draw that box manually

Synctex works correctly as long as we don't draw the right edge of the box!?!?


\makeatletter
\usepackage{picture,calc}
\renewcommand*{\framepictextfoot}{%
  \begin{picture}(0,0)
    \unitlength 1pt
    \ifshowheadfootloc
      \put(0,0){\color{white!85!black}\line(1,0){\strip at pt\textwidth}}
    \fi
    \ifshowtextblockloc
      % \put(0,\strip at pt\footskip)%
      %   {\color{white!85!black}\framebox(\strip at pt\textwidth,\strip at pt\textheight){}}
    % this is problematic
    \put(\strip at pt\textwidth,\strip at pt\footskip){\color{white!85!black}%
      \rule{\fboxrule}{\textheight}}
    \put(0,\strip at pt\footskip){\color{white!85!black}%
      \kern-\fboxrule\rule{\fboxrule}{\textheight}}
    \put(0,\strip at pt\footskip){\color{white!85!black}%
      \kern-\fboxrule\rule[-\fboxrule]{\textwidth+2\fboxrule}{\fboxrule}}
    \put(0,\footskip+\textheight){\color{white!85!black}%
      \kern-\fboxrule\rule{\textwidth+2\fboxrule}{\fboxrule}}
    \fi
  \end{picture}}

\makeatother


/Lars Madsen
Institut for Matematik / Department of Mathematics
Aarhus Universitet / Aarhus University
Mere info: http://au.dk/daleif@imf / More information: http://au.dk/en/daleif@imf


________________________________________
From: tex-live [tex-live-bounces at tug.org] on behalf of Lars Madsen [daleif at imf.au.dk]
Sent: 22 March 2013 10:01
To: tex-live at tug.org tug
Subject: [tex-live] Boxes and synctex

Hi

This many not be the proper place to ask.

Who should one ask about synctex and TeX features that affects synctex?

Here is an example

\documentclass[a4paper]{memoir}
\usepackage{kantlipsum}
\pagestyle{showlocs}
\begin{document}
\kant[1-2]

test

\kant

\end{document}


the showlocs style is basically just adding a frame drawn using the picture env from within the footer.

Typeset using pdflatex with synctex enabled.

Then in my Emacs setup with Evince, reverse search on the word 'test' in the PDF sends me below the last \kant command. If I recompile without the showlocs, then I end just below 'test'.

I'm trying to understand why this happens.

In real life text the effect is even worse than the example above. Reverse search maybe offf some 20-30 lines in the source code.

ideas?

/Lars Madsen
Institut for Matematik / Department of Mathematics
Aarhus Universitet / Aarhus University
Mere info: http://au.dk/daleif@imf / More information: http://au.dk/en/daleif@imf





More information about the tex-live mailing list