Re: changing margins in article class when using Beamer
Paul I'm using 1.6.2, on Ubuntu 9.04 and none of the margin/page controls are greyed out, so I can already adjust paper type/size and margins in article (beamer) as in any article. It was just that these then needed set back to "default" when switching back t Beamer. Strange isn't it. Strange indeed. Did you by any chance hack the article-beamer.layout file? Or might you have an old version of the layout files in your ~/.lyx folder that maybe are superseding the current versions? This is fresh install of Ubuntu 9.04, on an HD that did have Windows on it, but I installed Ubuntu to use the entire disc. Lyx was installed with synaptic and I haven't hacked/edited/changed any aspect of Lyx, so I have no idea why it isn't working as it should, especially as your other post says that its greyed out on you copy of Ubuntu. Graham
Re: changing margins in article class when using Beamer
Paul A. Rubin wrote: Graham M Smith wrote: Paul Well, I have something to propose. I still have no idea how you managed to change margins before (it should have been grayed out), unless maybe you're on an older version of LyX. Since I could not change margins, I could not reproduce your results. If you are using 1.6.x, though, I may have an answer. The attached file is a replacement for the article-beamer layout file. Drop it in your local layouts directory and reconfigure/restart LyX. It should enable you to adjust paper type/size and margins in "article (beamer)" the same as in any article. I've tested it both by converting existing presentations to articles and by using the embedding method in the link that Jürgen provided. I'm using 1.6.2, on Ubuntu 9.04 and none of the margin/page controls are greyed out, so I can already adjust paper type/size and margins in article (beamer) as in any article. It was just that these then needed set back to "default" when switching back t Beamer. Strange isn't it. Strange indeed. Did you by any chance hack the article-beamer.layout file? Or might you have an old version of the layout files in your ~/.lyx folder that maybe are superseding the current versions? That's the only explanation I can come up with. FWIW, with my modified layout file, if I switch from "presentation (beamer)" (where page size and margins are locked) to "article (beamer)", page size and margins are unlocked and I can change them. If I then switch back to "presentation (beamer)", the page size and margin revert to Beamer defaults and are locked, as you would wish. So I don't know why they did not revert for you, but then again I don't know why you were able to change them in the first place. I've tested this on Win XP with LyX 1.6.3 but not yet on Ubuntu. Since it's a layout file issue, I doubt that it will behave differently on Ubuntu, but then it's one of those "should not be possible" things in the first place. Just checked Ubuntu 9.04 -- same thing as Windows. No control over page size/margins with the old "article (beamer)" layout, and the new layout switches (and switches back) correctly.
Re: changing margins in article class when using Beamer
Graham M Smith wrote: Paul Well, I have something to propose. I still have no idea how you managed to change margins before (it should have been grayed out), unless maybe you're on an older version of LyX. Since I could not change margins, I could not reproduce your results. If you are using 1.6.x, though, I may have an answer. The attached file is a replacement for the article-beamer layout file. Drop it in your local layouts directory and reconfigure/restart LyX. It should enable you to adjust paper type/size and margins in "article (beamer)" the same as in any article. I've tested it both by converting existing presentations to articles and by using the embedding method in the link that Jürgen provided. I'm using 1.6.2, on Ubuntu 9.04 and none of the margin/page controls are greyed out, so I can already adjust paper type/size and margins in article (beamer) as in any article. It was just that these then needed set back to "default" when switching back t Beamer. Strange isn't it. Strange indeed. Did you by any chance hack the article-beamer.layout file? Or might you have an old version of the layout files in your ~/.lyx folder that maybe are superseding the current versions? That's the only explanation I can come up with. FWIW, with my modified layout file, if I switch from "presentation (beamer)" (where page size and margins are locked) to "article (beamer)", page size and margins are unlocked and I can change them. If I then switch back to "presentation (beamer)", the page size and margin revert to Beamer defaults and are locked, as you would wish. So I don't know why they did not revert for you, but then again I don't know why you were able to change them in the first place. I've tested this on Win XP with LyX 1.6.3 but not yet on Ubuntu. Since it's a layout file issue, I doubt that it will behave differently on Ubuntu, but then it's one of those "should not be possible" things in the first place.
Re: changing margins in article class when using Beamer
Jürgen Graham M Smith wrote: After changing to Beamer(article) class. I used the Document Settings|Page Margins tab I unticked the default and changed the margin sizes. I was hoping that Lyx would "magically" remember this was just the default for the Beamer (article) bit, but it also took this as the default for the Beamer class and refused to compile I didn't follow this discussion in all detail, but wouldn't the use of a portmanteau beamer-article master solve this? See: http://wiki.lyx.org/LyX/Presentations#toc7 Indeed this does seem to be a solution :-) Many thanks, Graham
Re: changing margins in article class when using Beamer
Paul Well, I have something to propose. I still have no idea how you managed to change margins before (it should have been grayed out), unless maybe you're on an older version of LyX. Since I could not change margins, I could not reproduce your results. If you are using 1.6.x, though, I may have an answer. The attached file is a replacement for the article-beamer layout file. Drop it in your local layouts directory and reconfigure/restart LyX. It should enable you to adjust paper type/size and margins in "article (beamer)" the same as in any article. I've tested it both by converting existing presentations to articles and by using the embedding method in the link that Jürgen provided. I'm using 1.6.2, on Ubuntu 9.04 and none of the margin/page controls are greyed out, so I can already adjust paper type/size and margins in article (beamer) as in any article. It was just that these then needed set back to "default" when switching back t Beamer. Strange isn't it. Thanks for your help. Graham
Re: changing margins in article class when using Beamer
Graham M Smith wrote: Paul That's ok, I understood what you meant -- just not why you did it. I don't use article (Beamer), but my impression is that it's purpose is to facilitate turning a slideshow into a paper (either after the fact or in parallel development). I don't think it's really intended to reproduce slides in slide-like form (although I could be wrong), and in any case it seems to be overkill for handouts (unless maybe you mean to annotate the handouts a fair bit). Ah, but we have a fundamental misunderstanding. The reason I started using Beamer was the very fact that I could prepare slides and lecture notes (article) in parallel. I don't want a print out of the slides in a slide-like form. I use the slide content as an outline for my lecture, but expand on this (with more text than you would want to put on the slides), and additional diagrams, examples, reference list etc as a class hand out. So students get properly written (and illustrated) hand outs, for my lectures. In fact it was this capability that brought me to latex/beamer in the first place after a plea on various forums for any ideas on how I could keep my handouts and presentations in sync so I didn't have to try and keep two documents (Powerpoint and Word) up to date and in sync. But Beamer became available in Lyx before I managed to develop any real expertise in Latex, even though I had started to rewrite all my lecture material in Latex I have put up with the wide margins up to now, but it seems a waste of paper, and it would be useful to allow diagrams and graphs to expand across the full page width. Am I in the wrong place? A simple handout option would be nice. This is 1.6.2 on Ubuntu 9.04 In this case, just type the word 'handout' (no quotes) in the "Custom" field and then View->PDF (pdflatex). What you get is a bunch of slides, one per page, same margins as the original. Ahh, now that is still useful, as I still produce a single copy like this for myself (as a guide for my lecture), but do it by commenting in and out the following lines in the preamble (lifted from one of my original Latex presentations) %\usepackage{pgfpages} %\pgfpagesuselayout{4 on 1}[a4paper,border shrink=2mm] %\setbeamercolor{background canvas}{bg=black!1} %\setbeamertemplate{footline}[page number] Now that we aren't talking at cross purposes :-), have you any suggestions on my original question. I could of course add a line for the margins in the preamble that I comment out and in depending on the output, but I was hoping for something a bit more automated than that. Well, I have something to propose. I still have no idea how you managed to change margins before (it should have been grayed out), unless maybe you're on an older version of LyX. Since I could not change margins, I could not reproduce your results. If you are using 1.6.x, though, I may have an answer. The attached file is a replacement for the article-beamer layout file. Drop it in your local layouts directory and reconfigure/restart LyX. It should enable you to adjust paper type/size and margins in "article (beamer)" the same as in any article. I've tested it both by converting existing presentations to articles and by using the embedding method in the link that Jürgen provided. /Paul #% Do not delete the line below; configure depends on this # \DeclareLaTeXClass[article]{article (beamer)} # Author: Jürgen Spitzmüller Format 11 # Includes Input beamer.layout Provides geometry 0 Provides hyperref 0 Preamble \usepackage{beamerarticle,pgf} % this default might be overridden by plain title style \newcommand\makebeamertitle{\frame{\maketitle}}% \AtBeginDocument{ \let\origtableofcontents=\tableofcontents \def\tableofcontent...@ifnextchar[{\origtableofcontents}{\gobbletableofcontents}} \def\gobbletableofcontents#1{\origtableofcontents} } EndPreamble # Frame control definition Style BeginFrame # This redefinition is needed to make beamerarticle work Preamble \makeatletter \long\def\lyxframe#...@lyxframe#1\@lyxframestop}% \d...@lyxframe{\@ifnextchar<{\@@lyxframe}{\@@lyxframe<*>}}% \def\@@lyxframe<#1>{...@ifnextchar[{\@@@lyxframe<#1>}{\@@@lyxframe<#1>[]}} \def\@@@lyxframe<#1>[...@ifnextchar<{\@lyxframe<#1>[}{\lyxframe<#1>[<*>][}} \def\@lyxframe<#1>[#2...@ifnextchar[{\lyxframe<#1>[#2]}{\lyxframe<#1>[#2][]}} \long\def\lyxframe<#1>[#2][#3]...@lyxframestop#5\lyxframeend{% \frame<#1>[#3]{\frametitle{#4}#5}} \makeatother EndPreamble End
Re: changing margins in article class when using Beamer
Graham M Smith wrote: To answer your margin question, I wonder how you changed the margins? In all of the beamer examples I find, the margin options are grayed out and I can't change them. After changing to Beamer(article) class. I used the Document Settings|Page Margins tab I unticked the default and changed the margin sizes. I was hoping that Lyx would "magically" remember this was just the default for the Beamer (article) bit, but it also took this as the default for the Beamer class and refused to compile I'm with my namesake on this one. In LyX 1.6.3, if I start a document and make it article (beamer), or switch an existing file to article (beamer), both page size and margins are grayed out and I'm stuck with class defaults. The article (beamer) layout file loads the presentation (beamer) layout, so it's possible something in the latter blocks changes to paper size and margin (sensible since Beamer is designed specifically to produce 128mm x 96mm slides), and that something may also be blocking margin/size changes in article (beamer) mode. I can't see anything in the layout file that would be the culprit, though. I'll see if I can track this down as time permits. I'm not sure that helps Graham, though, since he seems to be able to change the margins (?? -- I didn't understand what was going on there, since I cannot reproduce it here). /Paul
Re: changing margins in article class when using Beamer
Graham M Smith wrote: > After changing to Beamer(article) class. I used the Document > Settings|Page Margins tab I unticked the default and changed the margin > sizes. I was hoping that Lyx would "magically" remember this was just > the default for the Beamer (article) bit, but it also took this as the > default for the Beamer class and refused to compile I didn't follow this discussion in all detail, but wouldn't the use of a portmanteau beamer-article master solve this? See: http://wiki.lyx.org/LyX/Presentations#toc7 Jürgen
Re: changing margins in article class when using Beamer
Pau lI thank you for bringing the beamer(article) to my attention. That is very handy for me as well. I can see that if I insert some branches, then I can really customize which material is included in the article output. Nice! Yes, its a superb capability, I was also hoping to use the branches feature as I give similar lectures to different courses and the branches feature would allow me to quickly customise the content. To answer your margin question, I wonder how you changed the margins? In all of the beamer examples I find, the margin options are grayed out and I can't change them. After changing to Beamer(article) class. I used the Document Settings|Page Margins tab I unticked the default and changed the margin sizes. I was hoping that Lyx would "magically" remember this was just the default for the Beamer (article) bit, but it also took this as the default for the Beamer class and refused to compile That means we need to make the change either in the preamble or in the lyx layout or latex style file. Blech. I started to think "there has to be a better way" and this way seems to do it. \oddsidemargin 0.0in \textwidth 6.0in %%testing: does following have any effect? %%\evensidemargin 0.0in Yes, this was my next step, but was hoping to avoid commenting code in and out in the preamble, but its not really a problem. I continue to be amazed at how brilliantly useful Lyx/Latex is :-) Graham
Re: changing margins in article class when using Beamer
On Wed, Aug 12, 2009 at 5:13 PM, Graham M Smith wrote: > Paul >> > > I could of course add a line for the margins in the preamble that I comment > out and in depending on the output, but I was hoping for something a bit > more automated than that. > I thank you for bringing the beamer(article) to my attention. That is very handy for me as well. I can see that if I insert some branches, then I can really customize which material is included in the article output. Nice! To answer your margin question, I wonder how you changed the margins? In all of the beamer examples I find, the margin options are grayed out and I can't change them. That means we need to make the change either in the preamble or in the lyx layout or latex style file. Blech. I started to think "there has to be a better way" and this way seems to do it. \oddsidemargin 0.0in \textwidth 6.0in %%testing: does following have any effect? %%\evensidemargin 0.0in In the example beamer file with the lyx distribution, this does work for me to make the margins smaller. I got the idea from this document: http://www.image.ufl.edu/help/latex/margins.shtml In case you want to set more parameters. This works in LyX because lyx invokes the geometry package early in the startup, so if you put these in your preamble, it all ends up good. HTH! pj -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas
Re: changing margins in article class when using Beamer
Paul That's ok, I understood what you meant -- just not why you did it. I don't use article (Beamer), but my impression is that it's purpose is to facilitate turning a slideshow into a paper (either after the fact or in parallel development). I don't think it's really intended to reproduce slides in slide-like form (although I could be wrong), and in any case it seems to be overkill for handouts (unless maybe you mean to annotate the handouts a fair bit). Ah, but we have a fundamental misunderstanding. The reason I started using Beamer was the very fact that I could prepare slides and lecture notes (article) in parallel. I don't want a print out of the slides in a slide-like form. I use the slide content as an outline for my lecture, but expand on this (with more text than you would want to put on the slides), and additional diagrams, examples, reference list etc as a class hand out. So students get properly written (and illustrated) hand outs, for my lectures. In fact it was this capability that brought me to latex/beamer in the first place after a plea on various forums for any ideas on how I could keep my handouts and presentations in sync so I didn't have to try and keep two documents (Powerpoint and Word) up to date and in sync. But Beamer became available in Lyx before I managed to develop any real expertise in Latex, even though I had started to rewrite all my lecture material in Latex I have put up with the wide margins up to now, but it seems a waste of paper, and it would be useful to allow diagrams and graphs to expand across the full page width. Am I in the wrong place? A simple handout option would be nice. This is 1.6.2 on Ubuntu 9.04 In this case, just type the word 'handout' (no quotes) in the "Custom" field and then View->PDF (pdflatex). What you get is a bunch of slides, one per page, same margins as the original. Ahh, now that is still useful, as I still produce a single copy like this for myself (as a guide for my lecture), but do it by commenting in and out the following lines in the preamble (lifted from one of my original Latex presentations) %\usepackage{pgfpages} %\pgfpagesuselayout{4 on 1}[a4paper,border shrink=2mm] %\setbeamercolor{background canvas}{bg=black!1} %\setbeamertemplate{footline}[page number] Now that we aren't talking at cross purposes :-), have you any suggestions on my original question. I could of course add a line for the margins in the preamble that I comment out and in depending on the output, but I was hoping for something a bit more automated than that. Graham
Re: changing margins in article class when using Beamer
Graham M Smith wrote: Paul Any particular reason you are switching to the article class for handouts, as opposed to using the handout option in the class options field? Mmmm, I'm not switching to the article class, I'm switching to the "article (Beamer)" class. I realise now that I described this as "beamer article" class in my original post. That's ok, I understood what you meant -- just not why you did it. I don't use article (Beamer), but my impression is that it's purpose is to facilitate turning a slideshow into a paper (either after the fact or in parallel development). I don't think it's really intended to reproduce slides in slide-like form (although I could be wrong), and in any case it seems to be overkill for handouts (unless maybe you mean to annotate the handouts a fair bit). However, I can't see a handout option under class options assuming this is meant to be under Document settings|document class. You have to fill it in. The document class options predefined is ticked but greyed out with [No options predefined] in the field. This is when Document Class "presentation(Beamer)" is selected. Am I in the wrong place? A simple handout option would be nice. This is 1.6.2 on Ubuntu 9.04 You're in the right place but perhaps misunderstanding the dialog a bit. The grayed-out box is for options that were preselected (which I suspect means forced on you) by the layout file. Grayed out is a good thing IMHO -- it means all the options are up to you. The "Custom" box beneath it is where you specify class options of your choosing, by typing them in (the same way you would if you were using straight LaTeX). It presumes that you know what options work with the class you chose. In this case, just type the word 'handout' (no quotes) in the "Custom" field and then View->PDF (pdflatex). What you get is a bunch of slides, one per page, same margins as the original. The main differences are that overlays and sequential alerting are eliminated. So, for instance, if you have a slide with five bullets, each in a separate overlay, that was five pages in the original PDF but one page (all bullets showing) in the handout version. It's common to want to print multiple slides on one page for handouts. That's usually best accomplished in the printer settings or in the viewer. For instance, if you use Acrobat Reader, File > Print has a 'Page scaling' entry that lets yo specify multiple pages per sheet. Pretty much the same story if you use Evince (aka 'Document Viewer') -- look at the 'Page Setup tab' in the print dialog, 'Pages per side'. I'm not sure, but I think Beamer even includes some macros that can add annotations/notes to slides that will display in handout mode (if that's important to you). Personally, I usually just pass out the slides themselves, one or two slides per sheet (four per sheet works if your audience has good eyesight and no intention of taking notes on the slides). /Paul
Re: changing margins in article class when using Beamer
Paul Any particular reason you are switching to the article class for handouts, as opposed to using the handout option in the class options field? Mmmm, I'm not switching to the article class, I'm switching to the "article (Beamer)" class. I realise now that I described this as "beamer article" class in my original post. However, I can't see a handout option under class options assuming this is meant to be under Document settings|document class. The document class options predefined is ticked but greyed out with [No options predefined] in the field. This is when Document Class "presentation(Beamer)" is selected. Am I in the wrong place? A simple handout option would be nice. This is 1.6.2 on Ubuntu 9.04 Thanks, Graham
Re: changing margins in article class when using Beamer
Graham M Smith wrote: rh If you can find some macro that is defined in this case, but not in the other case, then all you need is: \ifx\thatmacro\undefined\relax\else your stuff here \fi I don't know what \thatmacro might be, though. Thanks, but unfortunately, this doesn't mean very much to me, I confess I was hoping for a single options line in the preamble :-( Graham Any particular reason you are switching to the article class for handouts, as opposed to using the handout option in the class options field? /Paul
Re: changing margins in article class when using Beamer
rh If you can find some macro that is defined in this case, but not in the other case, then all you need is: \ifx\thatmacro\undefined\relax\else your stuff here \fi I don't know what \thatmacro might be, though. Thanks, but unfortunately, this doesn't mean very much to me, I confess I was hoping for a single options line in the preamble :-( Graham
Re: changing margins in article class when using Beamer
On 08/11/2009 03:27 PM, Graham M Smith wrote: I'm using Beamer, and producing a presentation handout by switching to the beamer article class, which defaults to wide margins. If I change the margins in documents settings, this then prevents the beamer slides being produced (I get a compile error). I assume I can put something in the preamble that will switch the margins for beamer article only, but don't know what this might be. If you can find some macro that is defined in this case, but not in the other case, then all you need is: \ifx\thatmacro\undefined\relax\else your stuff here \fi I don't know what \thatmacro might be, though. rh
changing margins in article class when using Beamer
I'm using Beamer, and producing a presentation handout by switching to the beamer article class, which defaults to wide margins. If I change the margins in documents settings, this then prevents the beamer slides being produced (I get a compile error). I assume I can put something in the preamble that will switch the margins for beamer article only, but don't know what this might be. Can anyone help with this? Many thanks, Graham