Re: Latex error: Environment subequations undefined
HL2050 wrote > > Hello, I used "\begin{subequations}" and "\end{subequations}" to have > equations in between. It worked on my two earlier research papers using > LyX 1.6 mac os snow leopard. But suddenly the same way stopped working in > a new LyX file. I just can't figure it out. No clue at all. Can anyone > help. Thanks. > You just have to *uncheck* the box "Use AMS math package automatically" and then check "Use AMS math package" in Document -> Settings... -> Math Options. Then Apply. Worked for me in LyX 2.0.3 with "article (SPIE Proceedings)" Document Class. -- View this message in context: http://lyx.475766.n2.nabble.com/Latex-error-Environment-subequations-undefined-tp4421640p7580152.html Sent from the LyX - Users mailing list archive at Nabble.com.
Re: Using sweave/knitr in master and child documents
If that is the case, yes, you can use child documents. 2.0.x has significant improvements over 1.6.x in terms of Sweave/knitr support, so I strongly recommend you to upgrade. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, Jul 20, 2012 at 8:10 AM, wrote: > Thanks Yihui, for testing this on 2.0.4. You comment would mean that I would > have to set my libraries and opts() in each child doc; this is manageable, as > each chapter (child doc) has its own data sets. > > Perhaps its time to move my lyx docs to 2.0.4 (from 1.6.10). > > Cheers. > > Mateo. >
Re: Problem with ps2pdf & pdflatex
On 07/20/2012 10:39 AM, John Ashmead wrote: I've downloaded a package called classicthesis (http://code.google.com/p/classicthesis/) & am trying to print their sample document. I'm getting the error: *Package hyperref Error: Wrong driver option `pdftex'* *Tex capacity exceeded, sorry [main memory size=300]* I don't know about this particular package, but "Tex capacity exceeded" errors, in my experience, often come from a missed end to a header environment. That is, because of some error, TeX doesn't read correctly the end of the header, and includes some of the following document. If that includes environments that shouldn't be in a header (for me, usually a multiline displayed equation), it will choke in this manner. Why it only does that with export to ps2pdf is not clear. Some graphics, perhaps, being included into a header? I find ps2pdf to be more forgiving, in general, of graphics formats than pdlatex (I often include postscript and eps graphics, which sometimes pdflatex does not like). -- David L. Johnson Let's be straight here. If we find something we can't understand we like to call it something you can't understand, or indeed even pronounce. -- Douglas Adams
Problem with ps2pdf & pdflatex
I've downloaded a package called classicthesis (http://code.google.com/p/classicthesis/ ) & am trying to print their sample document. I'm getting the error: Package hyperref Error: Wrong driver option `pdftex' Tex capacity exceeded, sorry [main memory size=300] Curiously enough I can export to a pdf file using Lyx's Export- >PDF(pdflatex). But when I try Export->PDF(ps2pdf) I get the above error. I've pinged the classic thesis folks about this but am not sure if it is a Lyx configuration problem on my end or a problem with the package so I am posting to this group as well. Their config file calls hyperref using: \PassOptionsToPackage{pdftex,hyperfootnotes=false,pdfpagelabels} {hyperref} \usepackage{hyperref} % backref linktocpage pagebackref which I have no idea what this means or if it is ok. Basically: 1) what does this error mean? 2) how do I set the print option to pdflatex rather than ps2pdf, perhaps only for some documents? TIA! John Ashmead john.ashm...@timeandquantummechanics.com PS. I'm relatively new to Lyx, only started with it last month, and have only worked with short articles (no problems printing them).
Re: Graphics Tools
On 16/07/12 16:44, William R. Buckley wrote: > Working with TeX is a bit of a challenge, since it seems not to > include much support for abstract drawing. I have need for figures > to appear in a paper, and am not familiar with the toolset usually > employed for use to make drawn images suitable for use with TeX. > > Can you please make a few suggestions. > > wrb > There are things like pstricks which is a package that can be integrated with latex, that then allows items to be drawn, Paul -- -- http://drupal.zleap.net http://www.ubuntu.com skype : psutton111 http://www.linkedin.com/pub/paul-sutton/36/595/911
Re: Using sweave/knitr in master and child documents
Thanks Yihui, for testing this on 2.0.4. You comment would mean that I would have to set my libraries and opts() in each child doc; this is manageable, as each chapter (child doc) has its own data sets. Perhaps its time to move my lyx docs to 2.0.4 (from 1.6.10). Cheers. Mateo. On Monday 16 Jul 2012, Yihui Xie wrote: > Yes it can (I just verified knitr under 2.0.4). You do not need the > old hack of branches any more. > > However, I should warn you about one problem: at the moment, the main > document and the child document are compiled *independently* by two R > sessions, which means the R objects in two documents cannot be shared > between them because they are in different workspaces. > > Regards, > Yihui > -- > Yihui Xie > Phone: 515-294-2465 Web: http://yihui.name > Department of Statistics, Iowa State University > 2215 Snedecor Hall, Ames, IA > > > On Mon, Jul 16, 2012 at 7:43 AM, wrote: > > Hi all- > > > > Can Lyx (v.2) manage sweave or knitr code in a child document? I know that > > it could not in v.1.x and my document is made up of branches for each > > chapter. > > > > Mateo. >
Re: math macros via LaTex preamble
On 2012-07-19, ralston wrote: > I've got 10 years experience and 200 documents using LaTex with heavy > math. Like everyone else I paste a clot of \newcommands into my Latex > preamble without looking at it. > My student has recommended Lyx, which I appreciate has many great > features. I really want to like LyX. What a great concept. And > yet... I find LyX math macros an absolutely horror. Why construct LyX > to ignore macros in an imported LaTex preamble? Why defeat the most > popular usage, and why not write something to properly automate the > import? Because (La)TeX is a macro language that is miles more difficult to machine-parse than, say, XML. This is why the focus is on *generating* (writing/editing) documents that can be typeset with LaTeX (and/or HTML, Docbook, ...). LyX is *not* a "LaTeX editor". Depending on your needs, existing documents and willingness to change habits, LyX may boost your productivity or be not the tool of your choice. > It's a fact that exchanging LaTex with collaborators and opening old > files needs to be automated. Yet Lyx wants me to paste macros by hand > into every document, or else create subsidiary file systems I don't > understand with no examples of what to do. I don't understand where LyX wants you to paste macros by hand... > Why not automate that? This is a task too difficult to be done completely automatically. LyX did improve and specific suggestions for further improvement are welcome. > Once I create a macro it won't update (for me!) in an imported LaTeX > document, and the error messages are too non-specific to debug. The math-macros are really just for math-mode commands. This is why LyX does not convert preamble definitions to "math-macros" - is just does not know whether they are math-mode or text-mode (or both). (See your list below for a mix of math-mode and text-mode commands.) Also, math-macros are document specific - defining a math-macro in one document does not make it available in other ones. This is why my documents include a file of commonly used math macros -- just like I \input a file with commonly used preamble definitions in my LaTeX documents. > Import also seems to forget a lot of small things like "^{}, _{} " and > matrix formats that are real work to fix. Yes, there are many non-supported ways to write things in LaTeX. > I've only got about 10 macros to get running, but LyX has fought me all > the way. I hope I'm in the wrong and working with basic concept errors > someone could straighten out... and why doesn't LyX post at least one > completely running imported mathy FILE example, rather than abstract > principleswhile my excuse is a definite lack of interest in working > with things that create more work than they save. Frustrated by hours > or wasted time, I probably seem cranky. I do understand your frustration. Please keep in mind that LyX is not an enterprise solution promising "easy LaTeX for all" but a volunteer effort to create a document processor that matches the expectations and ideals of its developers with much input from the users. As such, it may be not the right tool for you - at least it needs more patience for things that might seem easy to you but are very complex from the point of a programmer... > In case I've not been too rude, here's some macros, which LyX gurus > will not find profound; I will surely either convert with enthusiasm to > LyX, or forbid all my students and contacts to ever touch it, depending > on how the importing and exporting of latex with macros can be > automated. I hope you will come to a more tempered evaluation of the program. Even if it is not the tool for you, it might be valuable for your students. > \newcommand{\ab}{\allowbreak} \newcommand{\bit}{\begin{itemize}} > \newcommand{\eit}{\end{itemize}} \newcommand{\im}{\item} > \newcommand{\be}{\begin{equation}} \newcommand{\ee}{\end{equation}} > \newcommand{\ba}{\begin{eqnarray}} \newcommand{\ea}{\end{eqnarray}} > \newcommand{\nn}{\nonumber} \renewcommand{\bf}{\textbf} All of these are rather shortcut aliases for text mode. "math-macro" is not the right thing to emulate them. I would try to find out whether tex2lyx already can be configured to do a back-replacement (e.g. \bf -> \textbf) before converting to LyX format or write a simple search-and replace script to do this in a preprocessing step. As you are not going to use these commands directly when writing in LyX, there is no need for supporting the aliases. > \newcommand{\ra}{\rightarrow} \newcommand{\NN}{\vec \nabla} > \def\slasha#1{\setbox0=\hbox{$#1$}#1\hskip-\wd0\hbox > to\wd0{\hss\sl/\/\hss}} > \def\slashb#1{\setbox0=\hbox{$#1$}#1\hskip-\wd0\dimen0=5pt\advance > \dimen0 by-\ht0\advance\dimen0 by\dp0\lower0.5\dimen0\hbox > to\wd0{\hss\sl/\/\hss}} These are (as far as I can see) real math macros, hence it may be sensible to define math-macros for them (if you want a "nice" look in LyX). However, it is possible to use them "as is" in math i