On Friday 10 December 2010 12:06:59 Rob Oakes wrote: > Dear LyX-Users, > > Does anyone know if it is possible to create new types of breaks in LyX? > I've just discovered the \clearoddpage and \cleareven page commands in the > lhelp package. As I'm currently working on a project which uses > illustrations on the even pages opposite chapter heads (e.g. Illustration > Here | Chapter Heading), this command is something of a godsend. It would > be awesome if I could create an "Even Page" break, in much the same way > that the "Clear Double Page" break works now. > > Anyone have ideas? I didn't see anything on it in the advanced manual. > > Cheers, > > Rob
Hi Rob, I don't completely understand your situation, and whether EVERY even page is opposite a chapter head. If so, you needn't do anything. If not, why not just ERT a \newpage after the illustration, or perhaps redefine the float caption environment so it \newpage after the paragraph? Like I say, I don't completely envision your situation. Just in case it might be helpful to you, here's the LaTeX and LyX code I use to put dates, defined in special LyX character styles, on the page header of each page. Pay particular attention to the \afterpage command and not the use of \xdef instead of \def. Preamble \usepackage{afterpage}% Used for break logic on header dates \newcommand{\plotdateondeck}[0]{init} % ############################################ % ### LATEX CODE FOR PLOT DATES IN HEADER % ############################################ \newcommand{\plotdatehdr}[0]{init} \newcommand{\plotdateondeck}[0]{init} % ### Character style -- plot date in LyX, change var in PDF % ### Set hdr var directly, used at chapter beginnings \newcommand{\plotdatechapterL}[1]{\renewcommand\plotdatehdr[0]{#1}} % ### Character style -- plot date in LyX, change var in PDF % ### Set ondeck for afterpage copy to hdr var, used within chapters % ### Notice the afterpage does the after page copy \newcommand{\plotdatebodyL}[1]{% \renewcommand\plotdateondeck[0]{#1}% \afterpage{\xdef\plotdatehdr{\plotdateondeck}}% } % ############################################ % ### END OF LATEX CODE FOR PLOT DATES IN HEADER % ############################################ \fancyhf[OLH,ELH]{\scriptsize{\plotdatehdr}} EndPreamble # %%% Plotdate charstyle for beginning of chapter. # Directly sets variable for header, should not show up in PDF # Text should not show up in body of PDF, only in header CharStyle PlotDateChapter LatexName plotdatechapterL LatexType Command Font Size Tiny Color Blue Font End # %%% Plotdate charstyle for insertion in body of chapter. # Sets variable that gets fed into var for header # Text should not show up in body of PDF, only in header CharStyle PlotDateBody LatexName plotdatebodyL LatexType Command Font Size Tiny Color Red Font End SteveT Steve Litt Recession Relief Package http://www.recession-relief.US Twitter: http://www.twitter.com/stevelitt