Proper installation of cm-super
Hi, I want to use cm-super fonts in my pdf output. The system I use us Win XP SP3, LyX 2.0.0, MiKTeX 2.9 and Adobe Acrobat Professional 8. I installed the cm-super package from MiKTeX 2.9Maintenance(Admin)Package Manager(Admin). In LyX I open new document and write something in english with default font settings. How to use the cm-super fonts in my document? The \usepackage{cm-super} command in preamble gives Latex Error: File 'cm-super.sty' not found. Please write detailed instructions how to properly install cm-super and use it in LyX 2.0.0. Thank, Sergey
Re: Proper installation of cm-super
On Thu, Oct 6, 2011 at 9:28 AM, Sergey Churilov curi...@gf.ukim.edu.mk wrote: Hi, I want to use cm-super fonts in my pdf output. The system I use us Win XP SP3, LyX 2.0.0, MiKTeX 2.9 and Adobe Acrobat Professional 8. I installed the cm-super package from MiKTeX 2.9Maintenance(Admin)Package Manager(Admin). In LyX I open new document and write something in english with default font settings. After installing the font, have you run Tools Reconfigure in LyX? Liviu How to use the cm-super fonts in my document? The \usepackage{cm-super} command in preamble gives Latex Error: File 'cm-super.sty' not found. Please write detailed instructions how to properly install cm-super and use it in LyX 2.0.0. Thank, Sergey -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Re: biblatex showing neither bibliography nor cites in PDF
Enrico Forestieri wrote: Yes, that does the trick and biber is run. Thanks. Could you check if the attached also does the trick? This test is more reliable. Please also check if biber is run after the bib file has been modified (works here on Unix). JürgenIndex: src/LaTeX.cpp === --- src/LaTeX.cpp (Revision 39799) +++ src/LaTeX.cpp (Arbeitskopie) @@ -279,7 +279,7 @@ // biber writes no info to the aux file, so we just check // if a bcf file exists (and if it was updated) FileName const bcffile(changeExtension(file.absFileName(), .bcf)); - bool const biber = head.exist(bcffile); + biber |= head.exist(bcffile); // run bibtex // if (scanres UNDEF_CIT || scanres RERUN || run_bibtex) @@ -290,8 +290,8 @@ // no checks for now LYXERR(Debug::LATEX, Running BibTeX.); message(_(Running BibTeX.)); - updateBibtexDependencies(head, bibtex_info, biber); - rerun |= runBibTeX(bibtex_info, runparams, biber); + updateBibtexDependencies(head, bibtex_info); + rerun |= runBibTeX(bibtex_info, runparams); if (biber) { // since biber writes no info to the aux file, we have // to parse the blg file (which only exists after biber @@ -304,7 +304,7 @@ /// If we run pdflatex on the file after running latex on it, /// then we do not need to run bibtex, but we do need to /// insert the .bib and .bst files into the .dep-pdf file. - updateBibtexDependencies(head, bibtex_info, biber); + updateBibtexDependencies(head, bibtex_info); } // 2 @@ -350,8 +350,8 @@ // no checks for now LYXERR(Debug::LATEX, Running BibTeX.); message(_(Running BibTeX.)); - updateBibtexDependencies(head, bibtex_info, biber); - rerun |= runBibTeX(bibtex_info, runparams, biber); + updateBibtexDependencies(head, bibtex_info); + rerun |= runBibTeX(bibtex_info, runparams); } // 4 @@ -550,8 +550,7 @@ void LaTeX::updateBibtexDependencies(DepTable dep, - vectorAuxInfo const bibtex_info, - bool biber) + vectorAuxInfo const bibtex_info) { // Since a run of Bibtex mandates more latex runs it is ok to // remove all .bib and .bst files. @@ -585,7 +584,7 @@ bool LaTeX::runBibTeX(vectorAuxInfo const bibtex_info, - OutputParams const runparams, bool biber) + OutputParams const runparams) { bool result = false; for (vectorAuxInfo::const_iterator it = bibtex_info.begin(); @@ -708,6 +707,9 @@ } } else if (contains(token, run BibTeX)) { retval |= UNDEF_CIT; + } else if (contains(token, run Biber)) { +retval |= UNDEF_CIT; +biber = true; } else if (contains(token, Rerun LaTeX) || contains(token, Please rerun LaTeX) || contains(token, Rerun to get)) { Index: src/LaTeX.h === --- src/LaTeX.h (Revision 39799) +++ src/LaTeX.h (Arbeitskopie) @@ -192,15 +192,14 @@ /// void updateBibtexDependencies(DepTable , - std::vectorAuxInfo const , - bool biber); + std::vectorAuxInfo const ); /// void scanBlgFile(DepTable head); /// bool runBibTeX(std::vectorAuxInfo const , - OutputParams const , bool biber); + OutputParams const ); /// void deleteFilesOnError() const; @@ -222,6 +221,9 @@ /// OutputParams runparams; + + /// Do we use biber? + bool biber; };
Re: Sans-serif math font
On 2011-10-06, Diego Queiroz wrote: [-- Type: text/plain, Encoding: --] Hi folks. I want to change the font in Math environment to Sans-serif, but when I change the Font Default Family in a document (thru Document Settings... Fonts) the font used in Math environment is not changed. This is a feature of TeX: text fonts and math fonts are separate entities. This is, because in math the letter shape conveys *meaning* (and, of course also becauso of historic reasons. Currently, is there a way to change the Math font to Sans-serif in LyX? Only via the LaTeX preamble. I know that I can do that including \usepackage{sfmath} to the preamble, but I want to know if something similiar can be done using LyX User Interface, without ERT. No need for ERT - font selection is done in the preamble. No support via the GUI. The current selection of GUI-supported fonts is *very* limited. This is a long-standing enhancement request. There are more options than the sfmath package. The LaTeX font catalogue lists font packages with math support http://www.tug.dk/FontCatalogue/mathfonts.html some of them sans-serif. A (German) overwiew with math test pages is available at http://milde.users.sourceforge.net/Matheschriften/matheschriften.html There is a table listing sans-serif math options at http://milde.users.sourceforge.net/Matheschriften/matheschriften.html#sans-serif-grotesk I recommend Arev: in the LaTeX preamble: \usepackage{arev} If you want a different text font, put the font-selecting commands below to overwrite the selection of Arev Sans in the arev package. Günter
Re: numbering of an equation
On 2011-10-05, Wolfgang Engelmann wrote: For Bearbeiten-Mathe-Nummerierung an/aus (Tastenkürzel Alt+M N) I get: command deactivated but the list of shortcuts shows Alt+M N I am using Lyx 2.0.1 and Debian squeeze Whats wrong? Maybe you tried in text mode? It works only if the cursor is inside the equation. Günter
Re: Proper installation of cm-super
Hi, I did that, but the problem remains. Here is my Latex code: % Preview source code %% LyX 2.0.0 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \synctex=-1 \makeatletter %% User specified LaTeX commands. \usepackage{cm-super} \makeatother \usepackage{babel} \begin{document} testtesttest \end{document}
Re: Cyrillic T1 font
On 2011-10-04, Sergey Churilov wrote: I am using LyX 2.0.0 on WinXP SP3 and MiKTeX 2.9. I use Bulgarian language and write cyrillic letters, but the pdf output from Adobe Acrobat renders letters with grey colour instead of pure black. The output from the printer looks just fine. It is the problem of the font which is used and Adobe doesn't render it well since it is Type 3 font. Which font to use in order to have Type 1 font in Adobe (as read in FileProperties). This depends on the engine. If you can use XeTeX or LuaTeX, just tick DocumentSettingsFonts [ ] use non-TeX fonts and select from any of the systemwide installed fonts. With traditional (8-bit) tex engines, you need to install special fonts in one of the T2A, T2B, or T2C font encodings and select them in the LaTeX preamble. (BTW: In TeX, T1 is a font encoding for Latin, so you cannot have a Cyrillic T1 font.) For Debian, I know of the scalable-cyrfonts-tex package that provides Times/Helvetica/Courier lookalikes that used to be part of the TeX Gyre fonts until they were removed because of license reasons. The page http://milde.users.sourceforge.net/substitutefont/ shows an example how to re-combine these fonts. Günter
Re: XeTeX - Load packages before fontspec
On 2011-10-04, Spyros Stathopoulos wrote: I'm using the first option already since I need to pass options to the font definitions. Still the problem lies with fontspec not the font definition. The problem lies with mathdesign:: %% %% Encoding is automatically set to T1 %% \RequirePackage[T1]{fontenc} The workaround is to re-set the TeX font encoding to EU1 (or U, if you use LuaTeX). The following example: \documentclass[english]{article} \usepackage{fontspec} \usepackage{xunicode} \usepackage{polyglossia} \setdefaultlanguage{english} \usepackage[mdugm]{mathdesign} %% Mathdesign sets font encoding to T1, reset with one of: % \RequirePackage[EU1]{fontenc} \renewcommand{\encodingdefault}{EU1} \setmainfont[Mapping=tex-text]{Comic Sans MS} \begin{document} Was ist das? \[ 2^{2}=4 \] \end{document} results in mathdesign math and comic text fonts. Günter
Re: numbering of an equation
On Thursday 06 October 2011 09:39:50 Guenter Milde wrote: On 2011-10-05, Wolfgang Engelmann wrote: For Bearbeiten-Mathe-Nummerierung an/aus (Tastenkürzel Alt+M N) I get: command deactivated but the list of shortcuts shows Alt+M N I am using Lyx 2.0.1 and Debian squeeze Whats wrong? Maybe you tried in text mode? It works only if the cursor is inside the equation. Günter Thanks, Günther, but doing this does not help, and I tried it before. Do I have to include something in the preamble? Wolfgang
Re: XeTeX - Load packages before fontspec
On 2011-10-04, Spyros Stathopoulos wrote: I've been trying to create a custom module but unfortunately is seems that fontspec is not handled by a module at all, instead it is placed into the preamble automatically when XeTeX mode is triggered. I believe the idea was to load mathdesign in a module. However, I did not test whether it is possible to load it before fontenc to reset the TeX font encoding to EU1 or U. In the end the only thing that did the job was modifying a local copy of the .cls, which is not too bad actually. However, given the peculiarity of fontspec with a lot of font-affecting packages there should be a way to override or customize this kind of behavior (along with passing options to \setXfont) without resorting to modifying classes and/or packages. Other than that I'm quite happy with the way LyX handles XeTeX. Actually, the use non-TeX fonts option is a use fontspec option, combining this with 8-bit font packages is always tricky. Supporting these combinations in the GUI would make things too complicated. I could rather imagine to add polyglossia to the selection in DocumentSettingsLanguagesLanguage package. This way, it would be possible to have XeTeX + polyglossia also without selecting fontspec per GUI. Günter
Re: biblatex showing neither bibliography nor cites in PDF
Jürgen Spitzmüller spitz at lyx.org writes: Thomas Strausz wrote: Sorry. I restarted LyX and now the output looks like this: Thanks. It seems like the bcf file is not mentioned in your LaTeX log file. The log file is supposed to have a line such as \openout3 = `Minimalbeispiel.bcf'. Can you check if such a line is there? If not, the bcf file is not added to LyX's dependency tracker and thus biber is not issued. No such line is to be found in the log file, I'm afraid. Thomas
Re: Proper installation of cm-super
2011/10/6 Sergey Churilov curi...@gf.ukim.edu.mk: Hi, I did that, but the problem remains. Here is my Latex code: % Preview source code %% LyX 2.0.0 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage{lmodern} It seems that you've selected LM fonts in Doc Settings. You should stick to defaults if you're later... \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \synctex=-1 \makeatletter %% User specified LaTeX commands. \usepackage{cm-super} ... loading a different font package. Does this work? Liviu \makeatother \usepackage{babel} \begin{document} testtesttest \end{document} -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Re: Proper installation of cm-super
Yes, you are right. I put default fonts in DocumentSettings. Loading of the package in the preamble did not work. I delete it, and know I got Type 1 fonts: SFRM1000 (Embedded Subset) Type: Type 1 Encoding: Custom Am I using cm-super fonts now? Sergey - Original Message - From: Liviu Andronic To: Sergey Churilov Cc: lyx-users@lists.lyx.org Sent: Thursday, October 06, 2011 11:29 Subject: Re: Proper installation of cm-super 2011/10/6 Sergey Churilov curi...@gf.ukim.edu.mk: Hi, I did that, but the problem remains. Here is my Latex code: % Preview source code %% LyX 2.0.0 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage{lmodern} It seems that you've selected LM fonts in Doc Settings. You should stick to defaults if you're later... \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \synctex=-1 \makeatletter %% User specified LaTeX commands. \usepackage{cm-super} ... loading a different font package. Does this work? Liviu \makeatother \usepackage{babel} \begin{document} testtesttest \end{document} -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Headlines starting new pages
I'm writing my diploma thesis in Lyx, using the class koma(book). Especially in the Materials Methods part, I often have sections ans subsections that go: *headline *shortish paragraph *table In this cases, Lyx often puts the headline and paragraph on one page and the table on the next (sometimes it even only puts the headline on the old page). (Screenshot: http://i2.photobucket.com/albums/y8/lastalda/LyxProblems/pagebreak.png) I would much rather have the headline start a new page in such cases. Is there a way I can define this behaviour in the latex header, or do I have to use manual pagebreaks whenever this irks me? Thank you in advance for any help! Lastalda
Re: biblatex showing neither bibliography nor cites in PDF
Jürgen Spitzmüller spitz at lyx.org writes: Mukhtar Ullah wrote: Thanks Jürgen for your reply. I have got biber 0.9.5 and it works if I run it from the commandline. It is LyX that is unable to run it. Does the workaround Thomas mentioned help in your case? I.e., adding \typeout{File: \jobname.bcf} to the preamble? Jürgen Unfortunately, adding \typeout{File: \jobname.bcf} did not help in my case. Since it has helped others, I am now checking if the option natbib=true could be the reason. Mukhtar
Re: Proper installation of cm-super
On 10/06/2011 12:03 PM, Sergey Churilov wrote: Yes, you are right. I put default fonts in DocumentSettings. Loading of the package in the preamble did not work. I delete it, and know I got Type 1 fonts: SFRM1000 (Embedded Subset) Type: Type 1 Encoding: Custom Am I using cm-super fonts now? It seems so! :) What's the rendering like, now, in Acrobat Reader? I think you'll get the same now if you use Default family: Roman LaTeX font encoding T2A Roman: Computer Modern Roman without calling \usepackage{cm-super} Could you please confirm this.
Re: biblatex showing neither bibliography nor cites in PDF
Mukhtar Ullah wrote: Unfortunately, adding \typeout{File: \jobname.bcf} did not help in my case. Since it has helped others, I am now checking if the option natbib=true could be the reason. Mukhtar, could you set up a small test case (including a bib file)? Jürgen
Re: biblatex showing neither bibliography nor cites in PDF
Thomas Strausz wrote: Can you check if such a line is there? If not, the bcf file is not added to LyX's dependency tracker and thus biber is not issued. No such line is to be found in the log file, I'm afraid. OK, we know the reason then. Please use the preamble workaround for the time being (it is harmless). We will fix this problem for LyX 2.0.2 in one way or the other. Thanks for your investigation. Jürgen
Re: Proper installation of cm-super
On 2011-10-06, PhilipPirrip wrote: On 10/06/2011 12:03 PM, Sergey Churilov wrote: I think you'll get the same now if you use Default family: Roman LaTeX font encoding T2A Roman: Computer Modern Roman without calling \usepackage{cm-super} Could you please confirm this. In most TeX distributions, the CM-Super fonts are set up as a transparent drop-in replacement for CM via the font substitution mechanism, i.e. there is no need to load the cm-super package - just leave the font settings in LyX at [Default]. Günter
Re: BibTeX Parser: Unexpected end of file.
On 10/06/2011 12:54 AM, Tom Francart wrote: Hi all, I'm using Lyx 2.0.0 (Ubuntu package). When trying to insert a citation in my document, I get the error message BibTeX Parser: Unexpected end of file. And indeed, part of my bibtex file is not available in Lyx. How can I get more info about what the problem is (e.g., a line number)? It's a 2.2MB .bib file which works fine with Bibtex and Pybliographer, so it's quite hard to find out what the problem is. I tried enabling debug output, but did not get more useful information. This is almost always due to a bad character in the file., e.g., a Unicode dash. LyX tries to read the file with the encoding of the main document. The bad character is probably in the first entry in the file that you do not see in LyX. rh
Re: Headlines starting new pages
On 10/06/2011 06:08 AM, Lastalda Felina wrote: I'm writing my diploma thesis in Lyx, using the class koma(book). Especially in the Materials Methods part, I often have sections ans subsections that go: *headline *shortish paragraph *table In this cases, Lyx often puts the headline and paragraph on one page and the table on the next (sometimes it even only puts the headline on the old page). (Screenshot: http://i2.photobucket.com/albums/y8/lastalda/LyxProblems/pagebreak.png) I would much rather have the headline start a new page in such cases. Is there a way I can define this behaviour in the latex header, or do I have to use manual pagebreaks whenever this irks me? This is due to how floats behave, and due to the very short section. LaTeX doesn't think of the table as part of the section. You'll have to do manual breaks (when all else is done!) to fix this. rh
Strange indentation with multiline footnotes
I guess this might be more of a Latex question but maybe someone here can help me with that. So always when I insert a footnote that has more text than fits on one line, all subsequent lines are shifted somewhat to the right, which looks weird to me. So I'd rather have either the first line shifted as well, or all other lines not shifted. Is there a way not to do this manually for each footnote? Regards, Tao
Re: biblatex showing neither bibliography nor cites in PDF
Jürgen Spitzmüller spitz at lyx.org writes: Thomas Strausz wrote: Can you check if such a line is there? If not, the bcf file is not added to LyX's dependency tracker and thus biber is not issued. No such line is to be found in the log file, I'm afraid. OK, we know the reason then. Please use the preamble workaround for the time being (it is harmless). We will fix this problem for LyX 2.0.2 in one way or the other. Thanks for your investigation. Jürgen Thank you for your work to improve LyX. And thank everyone who posted on that thread for helping me. Thomas
Re: Strange indentation with multiline footnotes
Hello, Tao Cumplido taocumplido at gmx.net writes: I guess this might be more of a Latex question but maybe someone here can help me with that. So always when I insert a footnote that has more text than fits on one line, all subsequent lines are shifted somewhat to the right, which looks weird to me. So I'd rather have either the first line shifted as well, or all other lines not shifted. Is there a way not to do this manually for each footnote? Regards, Tao Do you use a KOMA package for your writing? If yes, typing \deffootnote{1.5em}{1em}{\textsuperscript{\thefootnotemark}} should change that. That way, you eliminate the separate indention for the first line. Regards Thomas
Re: Headlines starting new pages
Ah, ok. Thank you for clarifying! 2011/10/6 Richard Heck rgh...@comcast.net: On 10/06/2011 06:08 AM, Lastalda Felina wrote: I'm writing my diploma thesis in Lyx, using the class koma(book). Especially in the Materials Methods part, I often have sections ans subsections that go: *headline *shortish paragraph *table In this cases, Lyx often puts the headline and paragraph on one page and the table on the next (sometimes it even only puts the headline on the old page). (Screenshot: http://i2.photobucket.com/albums/y8/lastalda/LyxProblems/pagebreak.png) I would much rather have the headline start a new page in such cases. Is there a way I can define this behaviour in the latex header, or do I have to use manual pagebreaks whenever this irks me? This is due to how floats behave, and due to the very short section. LaTeX doesn't think of the table as part of the section. You'll have to do manual breaks (when all else is done!) to fix this. rh -- Zu sagen Hier herrscht Freiheit ist immer ein Irrtum oder eine Lüge. Freiheit herrscht nicht. - Ehrich Fried, Herrschaftsfreiheit -
Re: Problem Outputting Particular TIFF File
Jane Shevtsov jane.eco at gmail.com writes: I just inserted a new TIFF file, generated by R, and am getting the same error for it. The PNG workaround should work, but can anyone help me figure out what's going on?Thanks,Jane Neither of these _should_ make a difference, but ... 1. Do any of the TIFF files that work contain spaces in their names (or, alternatively, does removing the space in the EMS... file's name get it to work)? 2. Are the file extensions of the non-working and working images the same case (.tiff or .TIFF)? Also, and this may sound a bit weird, if you open a DOS window (Start Run cmd) in the directory where the EMS thingy lives, and run convert EMS flowchart.tiff new.tiff does LyX like new.tiff? (Note: I'm assuming that the ImageMagick bin directory is on your path; otherwise you'll need to change 'convert' to 'C:\Program Files\WhereverTheHeckImageMagickIsInstalled\bin\convert'.) Paul
Re: LyX2.0 and Sweave - No Output
Yes, Yihui! Thank you, that was the missing step! I added C:\Program Files\R\R-2.13.0\share/texmf to MikTeXMaintenanceSettingsRoots and now my (very simple) example compiles. Liviu, thanks for being willing to help...fortunately Yihui's tip hit it right on the head. Shane On Wed, Oct 5, 2011 at 7:25 PM, Yihui Xie x...@yihui.name wrote: I believe Environment Schunk undefined means LaTeX cannot find Sweave.sty, which is part of R. Since you are using MikTeX, you can easily add the texmf tree (find it using R code R.home('share')) to MikTeX (using the menu Setting in the start menu or something -- I do not remember exactly). We have solved this headache that tons of users have run into in LyX 2.0.1, but currently there is no official release for Windows yet. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Oct 5, 2011 at 8:01 PM, Liviu Andronic landronim...@gmail.com wrote: On Thu, Oct 6, 2011 at 2:05 AM, Shane Siers shanesi...@gmail.com wrote: Hi, User's List... I'm a new-ish LyX user, otherwise naive to LaTeX. After about 10 hours of frustration, I got LyX to successfully open the Sweave module, and allow me Would have been a breeze on Linux.. to format text as a Sweave chunk. However, when I ViewView [PDF(pdflatex)], I get a list of errors: Can you compile examples/sweave.lyx? Else, can you provide a minimal example of the LyX file that gives you errors? Liviu Missing \endcsname inserted. LaTeX Error: Missing \begin{document}. Extra \endcsname. Missing \endcsname inserted. Missing \endcsname inserted. LaTeX Error: Environment Schunk undefined. LaTeX Error: Environment Sinput undefined. ...et. cetera... I'm using LyX 2.0.0, R 2.13.0 (64-bit), MikTeX 2.9, Windows 7 (64-bit). The text in my Sweave-LaTeX (pdflatex) converter is: Rscript --verbose --no-save --no-restore $$s/scripts/lyxsweave.R $$p$$i $$p$$o $$e $$r The text in my PATH Prefix box is: $LyXDir\bin;$LyXDir\python;$LyXDir\imagemagick;$LyXDir\ghostscript;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin;C:\Program Files (x86)\LyX20\bin;C:\Program Files\R\R-2.13.0\bin; C:\Program Files\R\R-2.13.0\bin\x86 Are the spaces in the path a problem? Can anyone help to get me Sweave-ing? -- Shane Siers Graduate Student Colorado State University -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail -- Shane
Re: numbering of an equation
Wolfgang Engelmann engelmann at uni-tuebingen.de writes: Maybe you tried in text mode? It works only if the cursor is inside the equation. Günter Thanks, Günther, but doing this does not help, and I tried it before. Do I have to include something in the preamble? No, nothing special is needed; it should work out of the box. Does this occur in a new document (article class, no modules)? In Tools Preferences Editing Shortcuts, if you put alt+m n in the Show ... search box, is math-number-toggle the only result you get? Also, are you perhaps using a customized UI file that might be remapping Alt+M+N? The only other thing that I can think of is to type Alt+M+N in different parts of a document (text area, heading, title, ...) until you find out what LyX thinks it maps to (assuming LyX thinks it maps to a different command). Paul
Re: Cross-reference in equation in lyx 2
David B daavidb at gmail.com writes: Hello,In LyX pre-2.0 I was able to put a cross-reference to an equation inside a formula, so that it would look something like in this image: http://www.latex-community.org/forum/download/file.php?id=4130If I try to do this in LyX 2.0 the reference ends up immediately above the formula, but outside of it. Does anyone know how to put cross-references in formulas in 2.0?Best Regards,David Is the following what you want? Paul #LyX 2.0 created this file. For more info see http://www.lyx.org/ \lyxformat 413 \begin_document \begin_header \textclass article \use_default_options true \maintain_unincluded_children false \language english \language_package default \inputencoding auto \fontencoding global \font_roman default \font_sans default \font_typewriter default \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize default \spacing single \use_hyperref false \papersize letterpaper \use_geometry true \use_amsmath 1 \use_esint 1 \use_mhchem 1 \use_mathdots 1 \cite_engine basic \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \use_refstyle 1 \index Index \shortcut idx \color #008000 \end_index \leftmargin 1in \topmargin 1in \rightmargin 1in \bottommargin 1in \secnumdepth 3 \tocdepth 3 \paragraph_separation skip \defskip smallskip \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \end_header \begin_body \begin_layout Standard First equation: \begin_inset Formula \begin{equation} y=mx+b\label{eq:eq1} \end{equation} \end_inset followed by second equation: \begin_inset Formula \begin{eqnarray} (\ref{eq:eq1})\nonumber \\ b = y-mx \end{eqnarray} \end_inset \end_layout \end_body \end_document
[OT] Fonts in TeXLive/DVI/Evince
Hi all, Not sure where the culprit is, but if I use \neq in a math formula in LyX with TeXLive 2010 and Evince as the document viewer, it shows up as an equal sign. Viewing in PDF is fine, and a random sampling of other math symbols all worked with View DVI. Anybody seen this before? Cheers, Paul
Index not printed
Dear all! I have a long text on classical mechanics on the Dutch Wikibooks site (http://nl.wikibooks.org/wiki/Klassieke_Mechanica). I made a pdf version of this text with Lyx, which is actually some 280 pages in total. I recently added some text and now there is one chapter where the index is not printed, which also blocs the printing of the index on the whole document. I use a smaller header file for testing the chapters separately and all give correct results except the chapter on 'Voorwerpendynamica' (Dynamics of objects). When testing it separately, all index entries are collected in the .idx file. Some space seems also reserved at the end of the document because there are 2 empty pages at the end, but even without the title 'Index'. Since the last generated pdf version, I changed from OpenSuSE 11.3 to 11.4, which means that a lot of routines have changed. But it is very strange that only one chapter fails. Removing the added text does not solve the problem. There is no indication of some error or warning in the log file. Sincerely, Hubert -- Hubert Christiaen Bloesemlaan 17 3360 Korbeek-Lo Belgium
[patch] add document-wide bibliography style setting
First step of moving the bibliography settings to the document settings (needed, e.g., for biblatex support). We define a default there. A BibTeX inset takes the default style from the buffer if it doesn't specify a style of its own. No UI yet, but it's coming. OK? -- Julien From cb7225e511ea0ae8714a7bccc6e0bb94ae0698f6 Mon Sep 17 00:00:00 2001 From: Julien Rioux jri...@lyx.org Date: Thu, 6 Oct 2011 17:38:05 +0200 Subject: [PATCH] Add a document-wide default bibliography style \biblio_style. This holds the name of a BibTeX style file for now. Any BibTeX inset can set the style to default to use the document-wide style. LyX format incremented to 417. --- development/FORMAT |5 lib/lyx2lyx/lyx_2_1.py | 52 --- src/Buffer.cpp |2 +- src/BufferParams.cpp | 17 ++ src/BufferParams.h |7 ++ src/insets/InsetBibtex.cpp |3 ++ 6 files changed, 81 insertions(+), 5 deletions(-) diff --git a/development/FORMAT b/development/FORMAT index 10c1d88..577c07c 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -11,6 +11,11 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx. --- +2011-10-06 Julien Rioux jri...@lyx.org + * Format incremented to 417 (rX) + New buffer param \biblio_style to specify a document-wide + default bibliography style (BibTeX style for the moment). + 2011-08-29 Uwe Stöhr uwesto...@web.de * Format incremented to 416 (r39557) support for \negmedspace and \negthinspace outside of math diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py index 6c6c6fe..ead33f2 100644 --- a/lib/lyx2lyx/lyx_2_1.py +++ b/lib/lyx2lyx/lyx_2_1.py @@ -25,7 +25,8 @@ import sys, os # Uncomment only what you need to import, please. -from parser_tools import find_token, find_end_of_inset, get_value +from parser_tools import find_token, find_end_of_inset, get_value, \ +get_quoted_value #from parser_tools import find_token, find_end_of, find_tokens, \ #find_token_exact, find_end_of_inset, find_end_of_layout, \ @@ -162,17 +163,60 @@ def revert_math_spaces(document): i = i + 1 +def convert_biblio_style(document): +Add a sensible default for \\biblio_style based on the citation engine. +i = find_token(document.header, \\cite_engine, 0) +if i != -1: +engine = get_value(document.header, \\cite_engine, i).split(_)[0] +style = {basic: plain, natbib: plainnat, jurabib: jurabib} +document.header.insert(i + 1, \\biblio_style + style[engine]) + + +def revert_biblio_style(document): +BibTeX insets with default option use the style defined by \\biblio_style. +i = find_token(document.header, \\biblio_style , 0) +if i == -1: +document.warning(No \\biblio_style line. Nothing to do.) +return + +default_style = get_value(document.header, \\biblio_style, i) +del document.header[i] + +# We are looking for bibtex insets having the default option +i = 0 +while True: +i = find_token(document.body, \\begin_inset CommandInset bibtex, i) +if i == -1: +return +j = find_end_of_inset(document.body, i) +if j == -1: +document.warning(Malformed LyX document: Can't find end of bibtex inset at line + str(i)) +i += 1 +return +k = find_token(document.body, options, i, j) +if k != -1: +options = get_quoted_value(document.body, options, k) +if options.split(,)[0] == default: +document.body[k] = 'options %s' \ +% options.replace(default, default_style) + '' +i = j + + ## # Conversion hub # supported_versions = [2.1.0,2.1] -convert = [[414, []], +convert = [ + [414, []], [415, [convert_undertilde]], - [416, []] + [416, []], + [417, [convert_biblio_style]], ] -revert = [[415, [revert_negative_space,revert_math_spaces]], +revert = [ + [416, [revert_biblio_style]], + [415, [revert_negative_space,revert_math_spaces]], [414, [revert_undertilde]], [413, [revert_visible_space]] ] diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 6aedab2..1b892e5 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -128,7 +128,7 @@ namespace { // Do not remove the comment below, so we get merge conflict in // independent branches. Instead add your own. -int const LYX_FORMAT = 416; //uwestoehr : support for horizontal spaces (bug 7728) +int const LYX_FORMAT = 417; //jrioux : document-wide BibTeX style via \biblio_style typedef mapstring, bool DepClean; typedef mapdocstring, pairInsetLabel const *, Buffer::References RefCache; diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 4f1edc1..e0f66a0 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -367,6 +367,7 @@
Re: [patch] add document-wide bibliography style setting
On 06/10/2011 6:01 PM, Julien Rioux wrote: First step of moving the bibliography settings to the document settings (needed, e.g., for biblatex support). We define a default there. A BibTeX inset takes the default style from the buffer if it doesn't specify a style of its own. No UI yet, but it's coming. OK? Sorry, wrong list.. -- Julien
Re: XeTeX - Load packages before fontspec
Thank you Günter, the encoding trick indeed solved the problem. In my opinion, however, it would be ideal if there was a way to configure when preamble statements are loaded (before or after lyx ones), but given the complexity that such a change would imply the current design is understandable. Again, thanks for the tip! :) Spyros On 10/06/2011 11:12 AM, Guenter Milde wrote: On 2011-10-04, Spyros Stathopoulos wrote: I'm using the first option already since I need to pass options to the font definitions. Still the problem lies with fontspec not the font definition. The problem lies with mathdesign:: %% %% Encoding is automatically set to T1 %% \RequirePackage[T1]{fontenc} The workaround is to re-set the TeX font encoding to EU1 (or U, if you use LuaTeX). The following example: \documentclass[english]{article} \usepackage{fontspec} \usepackage{xunicode} \usepackage{polyglossia} \setdefaultlanguage{english} \usepackage[mdugm]{mathdesign} %% Mathdesign sets font encoding to T1, reset with one of: % \RequirePackage[EU1]{fontenc} \renewcommand{\encodingdefault}{EU1} \setmainfont[Mapping=tex-text]{Comic Sans MS} \begin{document} Was ist das? \[ 2^{2}=4 \] \end{document} results in mathdesign math and comic text fonts. Günter
Re: Headlines starting new pages
On Thu, Oct 6, 2011 at 3:07 PM, Richard Heck rgh...@comcast.net wrote: On 10/06/2011 06:08 AM, Lastalda Felina wrote: I'm writing my diploma thesis in Lyx, using the class koma(book). Especially in the Materials Methods part, I often have sections ans subsections that go: *headline *shortish paragraph *table In this cases, Lyx often puts the headline and paragraph on one page and the table on the next (sometimes it even only puts the headline on the old page). (Screenshot: http://i2.photobucket.com/albums/y8/lastalda/LyxProblems/pagebreak.png) I would much rather have the headline start a new page in such cases. Is there a way I can define this behaviour in the latex header, or do I have to use manual pagebreaks whenever this irks me? This is due to how floats behave, and due to the very short section. LaTeX doesn't think of the table as part of the section. You'll have to do manual breaks (when all else is done!) to fix this. .. or use longtables, which break automatically and support captions. Liviu rh -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Re: [OT] Fonts in TeXLive/DVI/Evince
On Thu, Oct 6, 2011 at 5:46 PM, Paul A. Rubin ru...@msu.edu wrote: Hi all, Not sure where the culprit is, but if I use \neq in a math formula in LyX with TeXLive 2010 and Evince as the document viewer, it shows up as an equal sign. Viewing in PDF is fine, and a random sampling of other math symbols all worked with View DVI. Anybody seen this before? Sometimes PDF viewers fail on some characters, and in such cases the problem would be with the viewer, and not the file. Have you tried acroread? Liviu Cheers, Paul -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Re: Proper installation of cm-super
Re: Proper installation of cm-super PhilipPirrip Thu, 06 Oct 2011 04:35:47 -0700It seems so! :) What's the rendering like, now, in Acrobat Reader? It is perfect. Font type: type 1. I think you'll get the same now if you use Default family: Roman LaTeX font encoding T2A Roman: Computer Modern Roman without calling \usepackage{cm-super} Could you please confirm this. Calling \usepackage{cm-super} doesn't work at all.
Re: biblatex showing neither bibliography nor cites in PDF
Jürgen Spitzmüller writes: Thanks. Could you check if the attached also does the trick? This test is more reliable. Please also check if biber is run after the bib file has been modified (works here on Unix). Yes, this also works and biber is also run after modifying the bib file. -- Enrico
Re: [OT] Fonts in TeXLive/DVI/Evince
PDF output shows the correct symbol. It's only DVI that mucks it up. Paul -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Liviu Andronic landronim...@gmail.com wrote: On Thu, Oct 6, 2011 at 5:46 PM, Paul A. Rubin ru...@msu.edu wrote: Hi all, Not sure where the culprit is, but if I use \neq in a math formula in LyX with TeXLive 2010 and Evince as the document viewer, it shows up as an equal sign. Viewing in PDF is fine, and a random sampling of other math symbols all worked with View DVI. Anybody seen this before? Sometimes PDF viewers fail on some characters, and in such cases the problem would be with the viewer, and not the file. Have you tried acroread? Liviu Cheers, Paul -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Re: BibTeX Parser: Unexpected end of file.
Hi Richard, That was indeed the case, I found the culprit using isutf8. Thanks for your response. best regards, Tom On Fri, Oct 7, 2011 at 12:05 AM, Richard Heck rgh...@comcast.net wrote: On 10/06/2011 12:54 AM, Tom Francart wrote: Hi all, I'm using Lyx 2.0.0 (Ubuntu package). When trying to insert a citation in my document, I get the error message BibTeX Parser: Unexpected end of file. And indeed, part of my bibtex file is not available in Lyx. How can I get more info about what the problem is (e.g., a line number)? It's a 2.2MB .bib file which works fine with Bibtex and Pybliographer, so it's quite hard to find out what the problem is. I tried enabling debug output, but did not get more useful information. This is almost always due to a bad character in the file., e.g., a Unicode dash. LyX tries to read the file with the encoding of the main document. The bad character is probably in the first entry in the file that you do not see in LyX. rh
Specify an input path in the global preferences?
Hi, My default preamble is \include{standardpreamble}. This works well in the top level of my documents directory, where I keep standardpreamble.tex. However, if I save a file to a subdirectory, then standardpreamble cannot be found. Is it possible, in the preferences (not document settings), to specify an absolute search path so that standardpreamble.tex is always found? Specifying an absolute path in the document settings is out of the question, since I use LyX on several different computers / operating systems, all synchronized with version control. For silly compatibility reasons, I'm still using LyX 1.6. Thanks! -Ben
Re: Specify an input path in the global preferences?
On Fri, Oct 7, 2011 at 1:18 AM, Ben M. maresr12t...@gmail.com wrote: Hi, My default preamble is \include{standardpreamble}. This works well in the top level of my documents directory, where I keep standardpreamble.tex. However, if I save a file to a subdirectory, then standardpreamble cannot be found. Is it possible, in the preferences (not document settings), to specify an absolute search path so that standardpreamble.tex is always found? Hae you tried Prefs Paths PATH? Liviu Specifying an absolute path in the document settings is out of the question, since I use LyX on several different computers / operating systems, all synchronized with version control. For silly compatibility reasons, I'm still using LyX 1.6. Thanks! -Ben -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Re: Problem Outputting Particular TIFF File
Hi Paul, On Thu, Oct 6, 2011 at 8:01 AM, Paul A. Rubin ru...@msu.edu wrote: 1. Do any of the TIFF files that work contain spaces in their names (or, alternatively, does removing the space in the EMS... file's name get it to work)? No, getting rid of the space makes no difference. 2. Are the file extensions of the non-working and working images the same case (.tiff or .TIFF)? The file extensions are all lowercase. Also, and this may sound a bit weird, if you open a DOS window (Start Run cmd) in the directory where the EMS thingy lives, and run convert EMS flowchart.tiff new.tiff does LyX like new.tiff? (Note: I'm assuming that the ImageMagick bin directory is on your path; otherwise you'll need to change 'convert' to 'C:\Program Files\WhereverTheHeckImageMagickIsInstalled\bin\convert'.) This results in an error: Invalid parameter - new.tiff. I found ImageMagick, or at least the convert.exe file in my LyX folder, but should there be any other executables there? Thanks, Jane -- - Jane Shevtsov Ecology Ph.D. candidate, University of Georgia co-founder, www.worldbeyondborders.org All wars are civil wars, because all men are brothers... Each one owes infinitely more to the human race than to the particular country in which he was born. --Francois Fenelon, theologian and writer (1651-1715)
Re: Specify an input path in the global preferences?
On 2011-10-06, Ben M. wrote: My default preamble is \include{standardpreamble}. This works well in the top level of my documents directory, where I keep standardpreamble.tex. However, if I save a file to a subdirectory, then standardpreamble cannot be found. Is it possible, in the preferences (not document settings), to specify an absolute search path so that standardpreamble.tex is always found? How about placing the file in the system standard texmf path? On my Debian Linux with texlive2010, this would be somewhere under ~/texmf/. Günter
Proper installation of cm-super
Hi, I want to use cm-super fonts in my pdf output. The system I use us Win XP SP3, LyX 2.0.0, MiKTeX 2.9 and Adobe Acrobat Professional 8. I installed the cm-super package from MiKTeX 2.9Maintenance(Admin)Package Manager(Admin). In LyX I open new document and write something in english with default font settings. How to use the cm-super fonts in my document? The \usepackage{cm-super} command in preamble gives Latex Error: File 'cm-super.sty' not found. Please write detailed instructions how to properly install cm-super and use it in LyX 2.0.0. Thank, Sergey
Re: Proper installation of cm-super
On Thu, Oct 6, 2011 at 9:28 AM, Sergey Churilov curi...@gf.ukim.edu.mk wrote: Hi, I want to use cm-super fonts in my pdf output. The system I use us Win XP SP3, LyX 2.0.0, MiKTeX 2.9 and Adobe Acrobat Professional 8. I installed the cm-super package from MiKTeX 2.9Maintenance(Admin)Package Manager(Admin). In LyX I open new document and write something in english with default font settings. After installing the font, have you run Tools Reconfigure in LyX? Liviu How to use the cm-super fonts in my document? The \usepackage{cm-super} command in preamble gives Latex Error: File 'cm-super.sty' not found. Please write detailed instructions how to properly install cm-super and use it in LyX 2.0.0. Thank, Sergey -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Re: biblatex showing neither bibliography nor cites in PDF
Enrico Forestieri wrote: Yes, that does the trick and biber is run. Thanks. Could you check if the attached also does the trick? This test is more reliable. Please also check if biber is run after the bib file has been modified (works here on Unix). JürgenIndex: src/LaTeX.cpp === --- src/LaTeX.cpp (Revision 39799) +++ src/LaTeX.cpp (Arbeitskopie) @@ -279,7 +279,7 @@ // biber writes no info to the aux file, so we just check // if a bcf file exists (and if it was updated) FileName const bcffile(changeExtension(file.absFileName(), .bcf)); - bool const biber = head.exist(bcffile); + biber |= head.exist(bcffile); // run bibtex // if (scanres UNDEF_CIT || scanres RERUN || run_bibtex) @@ -290,8 +290,8 @@ // no checks for now LYXERR(Debug::LATEX, Running BibTeX.); message(_(Running BibTeX.)); - updateBibtexDependencies(head, bibtex_info, biber); - rerun |= runBibTeX(bibtex_info, runparams, biber); + updateBibtexDependencies(head, bibtex_info); + rerun |= runBibTeX(bibtex_info, runparams); if (biber) { // since biber writes no info to the aux file, we have // to parse the blg file (which only exists after biber @@ -304,7 +304,7 @@ /// If we run pdflatex on the file after running latex on it, /// then we do not need to run bibtex, but we do need to /// insert the .bib and .bst files into the .dep-pdf file. - updateBibtexDependencies(head, bibtex_info, biber); + updateBibtexDependencies(head, bibtex_info); } // 2 @@ -350,8 +350,8 @@ // no checks for now LYXERR(Debug::LATEX, Running BibTeX.); message(_(Running BibTeX.)); - updateBibtexDependencies(head, bibtex_info, biber); - rerun |= runBibTeX(bibtex_info, runparams, biber); + updateBibtexDependencies(head, bibtex_info); + rerun |= runBibTeX(bibtex_info, runparams); } // 4 @@ -550,8 +550,7 @@ void LaTeX::updateBibtexDependencies(DepTable dep, - vectorAuxInfo const bibtex_info, - bool biber) + vectorAuxInfo const bibtex_info) { // Since a run of Bibtex mandates more latex runs it is ok to // remove all .bib and .bst files. @@ -585,7 +584,7 @@ bool LaTeX::runBibTeX(vectorAuxInfo const bibtex_info, - OutputParams const runparams, bool biber) + OutputParams const runparams) { bool result = false; for (vectorAuxInfo::const_iterator it = bibtex_info.begin(); @@ -708,6 +707,9 @@ } } else if (contains(token, run BibTeX)) { retval |= UNDEF_CIT; + } else if (contains(token, run Biber)) { +retval |= UNDEF_CIT; +biber = true; } else if (contains(token, Rerun LaTeX) || contains(token, Please rerun LaTeX) || contains(token, Rerun to get)) { Index: src/LaTeX.h === --- src/LaTeX.h (Revision 39799) +++ src/LaTeX.h (Arbeitskopie) @@ -192,15 +192,14 @@ /// void updateBibtexDependencies(DepTable , - std::vectorAuxInfo const , - bool biber); + std::vectorAuxInfo const ); /// void scanBlgFile(DepTable head); /// bool runBibTeX(std::vectorAuxInfo const , - OutputParams const , bool biber); + OutputParams const ); /// void deleteFilesOnError() const; @@ -222,6 +221,9 @@ /// OutputParams runparams; + + /// Do we use biber? + bool biber; };
Re: Sans-serif math font
On 2011-10-06, Diego Queiroz wrote: [-- Type: text/plain, Encoding: --] Hi folks. I want to change the font in Math environment to Sans-serif, but when I change the Font Default Family in a document (thru Document Settings... Fonts) the font used in Math environment is not changed. This is a feature of TeX: text fonts and math fonts are separate entities. This is, because in math the letter shape conveys *meaning* (and, of course also becauso of historic reasons. Currently, is there a way to change the Math font to Sans-serif in LyX? Only via the LaTeX preamble. I know that I can do that including \usepackage{sfmath} to the preamble, but I want to know if something similiar can be done using LyX User Interface, without ERT. No need for ERT - font selection is done in the preamble. No support via the GUI. The current selection of GUI-supported fonts is *very* limited. This is a long-standing enhancement request. There are more options than the sfmath package. The LaTeX font catalogue lists font packages with math support http://www.tug.dk/FontCatalogue/mathfonts.html some of them sans-serif. A (German) overwiew with math test pages is available at http://milde.users.sourceforge.net/Matheschriften/matheschriften.html There is a table listing sans-serif math options at http://milde.users.sourceforge.net/Matheschriften/matheschriften.html#sans-serif-grotesk I recommend Arev: in the LaTeX preamble: \usepackage{arev} If you want a different text font, put the font-selecting commands below to overwrite the selection of Arev Sans in the arev package. Günter
Re: numbering of an equation
On 2011-10-05, Wolfgang Engelmann wrote: For Bearbeiten-Mathe-Nummerierung an/aus (Tastenkürzel Alt+M N) I get: command deactivated but the list of shortcuts shows Alt+M N I am using Lyx 2.0.1 and Debian squeeze Whats wrong? Maybe you tried in text mode? It works only if the cursor is inside the equation. Günter
Re: Proper installation of cm-super
Hi, I did that, but the problem remains. Here is my Latex code: % Preview source code %% LyX 2.0.0 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \synctex=-1 \makeatletter %% User specified LaTeX commands. \usepackage{cm-super} \makeatother \usepackage{babel} \begin{document} testtesttest \end{document}
Re: Cyrillic T1 font
On 2011-10-04, Sergey Churilov wrote: I am using LyX 2.0.0 on WinXP SP3 and MiKTeX 2.9. I use Bulgarian language and write cyrillic letters, but the pdf output from Adobe Acrobat renders letters with grey colour instead of pure black. The output from the printer looks just fine. It is the problem of the font which is used and Adobe doesn't render it well since it is Type 3 font. Which font to use in order to have Type 1 font in Adobe (as read in FileProperties). This depends on the engine. If you can use XeTeX or LuaTeX, just tick DocumentSettingsFonts [ ] use non-TeX fonts and select from any of the systemwide installed fonts. With traditional (8-bit) tex engines, you need to install special fonts in one of the T2A, T2B, or T2C font encodings and select them in the LaTeX preamble. (BTW: In TeX, T1 is a font encoding for Latin, so you cannot have a Cyrillic T1 font.) For Debian, I know of the scalable-cyrfonts-tex package that provides Times/Helvetica/Courier lookalikes that used to be part of the TeX Gyre fonts until they were removed because of license reasons. The page http://milde.users.sourceforge.net/substitutefont/ shows an example how to re-combine these fonts. Günter
Re: XeTeX - Load packages before fontspec
On 2011-10-04, Spyros Stathopoulos wrote: I'm using the first option already since I need to pass options to the font definitions. Still the problem lies with fontspec not the font definition. The problem lies with mathdesign:: %% %% Encoding is automatically set to T1 %% \RequirePackage[T1]{fontenc} The workaround is to re-set the TeX font encoding to EU1 (or U, if you use LuaTeX). The following example: \documentclass[english]{article} \usepackage{fontspec} \usepackage{xunicode} \usepackage{polyglossia} \setdefaultlanguage{english} \usepackage[mdugm]{mathdesign} %% Mathdesign sets font encoding to T1, reset with one of: % \RequirePackage[EU1]{fontenc} \renewcommand{\encodingdefault}{EU1} \setmainfont[Mapping=tex-text]{Comic Sans MS} \begin{document} Was ist das? \[ 2^{2}=4 \] \end{document} results in mathdesign math and comic text fonts. Günter
Re: numbering of an equation
On Thursday 06 October 2011 09:39:50 Guenter Milde wrote: On 2011-10-05, Wolfgang Engelmann wrote: For Bearbeiten-Mathe-Nummerierung an/aus (Tastenkürzel Alt+M N) I get: command deactivated but the list of shortcuts shows Alt+M N I am using Lyx 2.0.1 and Debian squeeze Whats wrong? Maybe you tried in text mode? It works only if the cursor is inside the equation. Günter Thanks, Günther, but doing this does not help, and I tried it before. Do I have to include something in the preamble? Wolfgang
Re: XeTeX - Load packages before fontspec
On 2011-10-04, Spyros Stathopoulos wrote: I've been trying to create a custom module but unfortunately is seems that fontspec is not handled by a module at all, instead it is placed into the preamble automatically when XeTeX mode is triggered. I believe the idea was to load mathdesign in a module. However, I did not test whether it is possible to load it before fontenc to reset the TeX font encoding to EU1 or U. In the end the only thing that did the job was modifying a local copy of the .cls, which is not too bad actually. However, given the peculiarity of fontspec with a lot of font-affecting packages there should be a way to override or customize this kind of behavior (along with passing options to \setXfont) without resorting to modifying classes and/or packages. Other than that I'm quite happy with the way LyX handles XeTeX. Actually, the use non-TeX fonts option is a use fontspec option, combining this with 8-bit font packages is always tricky. Supporting these combinations in the GUI would make things too complicated. I could rather imagine to add polyglossia to the selection in DocumentSettingsLanguagesLanguage package. This way, it would be possible to have XeTeX + polyglossia also without selecting fontspec per GUI. Günter
Re: biblatex showing neither bibliography nor cites in PDF
Jürgen Spitzmüller spitz at lyx.org writes: Thomas Strausz wrote: Sorry. I restarted LyX and now the output looks like this: Thanks. It seems like the bcf file is not mentioned in your LaTeX log file. The log file is supposed to have a line such as \openout3 = `Minimalbeispiel.bcf'. Can you check if such a line is there? If not, the bcf file is not added to LyX's dependency tracker and thus biber is not issued. No such line is to be found in the log file, I'm afraid. Thomas
Re: Proper installation of cm-super
2011/10/6 Sergey Churilov curi...@gf.ukim.edu.mk: Hi, I did that, but the problem remains. Here is my Latex code: % Preview source code %% LyX 2.0.0 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage{lmodern} It seems that you've selected LM fonts in Doc Settings. You should stick to defaults if you're later... \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \synctex=-1 \makeatletter %% User specified LaTeX commands. \usepackage{cm-super} ... loading a different font package. Does this work? Liviu \makeatother \usepackage{babel} \begin{document} testtesttest \end{document} -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Re: Proper installation of cm-super
Yes, you are right. I put default fonts in DocumentSettings. Loading of the package in the preamble did not work. I delete it, and know I got Type 1 fonts: SFRM1000 (Embedded Subset) Type: Type 1 Encoding: Custom Am I using cm-super fonts now? Sergey - Original Message - From: Liviu Andronic To: Sergey Churilov Cc: lyx-users@lists.lyx.org Sent: Thursday, October 06, 2011 11:29 Subject: Re: Proper installation of cm-super 2011/10/6 Sergey Churilov curi...@gf.ukim.edu.mk: Hi, I did that, but the problem remains. Here is my Latex code: % Preview source code %% LyX 2.0.0 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage{lmodern} It seems that you've selected LM fonts in Doc Settings. You should stick to defaults if you're later... \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \synctex=-1 \makeatletter %% User specified LaTeX commands. \usepackage{cm-super} ... loading a different font package. Does this work? Liviu \makeatother \usepackage{babel} \begin{document} testtesttest \end{document} -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Headlines starting new pages
I'm writing my diploma thesis in Lyx, using the class koma(book). Especially in the Materials Methods part, I often have sections ans subsections that go: *headline *shortish paragraph *table In this cases, Lyx often puts the headline and paragraph on one page and the table on the next (sometimes it even only puts the headline on the old page). (Screenshot: http://i2.photobucket.com/albums/y8/lastalda/LyxProblems/pagebreak.png) I would much rather have the headline start a new page in such cases. Is there a way I can define this behaviour in the latex header, or do I have to use manual pagebreaks whenever this irks me? Thank you in advance for any help! Lastalda
Re: biblatex showing neither bibliography nor cites in PDF
Jürgen Spitzmüller spitz at lyx.org writes: Mukhtar Ullah wrote: Thanks Jürgen for your reply. I have got biber 0.9.5 and it works if I run it from the commandline. It is LyX that is unable to run it. Does the workaround Thomas mentioned help in your case? I.e., adding \typeout{File: \jobname.bcf} to the preamble? Jürgen Unfortunately, adding \typeout{File: \jobname.bcf} did not help in my case. Since it has helped others, I am now checking if the option natbib=true could be the reason. Mukhtar
Re: Proper installation of cm-super
On 10/06/2011 12:03 PM, Sergey Churilov wrote: Yes, you are right. I put default fonts in DocumentSettings. Loading of the package in the preamble did not work. I delete it, and know I got Type 1 fonts: SFRM1000 (Embedded Subset) Type: Type 1 Encoding: Custom Am I using cm-super fonts now? It seems so! :) What's the rendering like, now, in Acrobat Reader? I think you'll get the same now if you use Default family: Roman LaTeX font encoding T2A Roman: Computer Modern Roman without calling \usepackage{cm-super} Could you please confirm this.
Re: biblatex showing neither bibliography nor cites in PDF
Mukhtar Ullah wrote: Unfortunately, adding \typeout{File: \jobname.bcf} did not help in my case. Since it has helped others, I am now checking if the option natbib=true could be the reason. Mukhtar, could you set up a small test case (including a bib file)? Jürgen
Re: biblatex showing neither bibliography nor cites in PDF
Thomas Strausz wrote: Can you check if such a line is there? If not, the bcf file is not added to LyX's dependency tracker and thus biber is not issued. No such line is to be found in the log file, I'm afraid. OK, we know the reason then. Please use the preamble workaround for the time being (it is harmless). We will fix this problem for LyX 2.0.2 in one way or the other. Thanks for your investigation. Jürgen
Re: Proper installation of cm-super
On 2011-10-06, PhilipPirrip wrote: On 10/06/2011 12:03 PM, Sergey Churilov wrote: I think you'll get the same now if you use Default family: Roman LaTeX font encoding T2A Roman: Computer Modern Roman without calling \usepackage{cm-super} Could you please confirm this. In most TeX distributions, the CM-Super fonts are set up as a transparent drop-in replacement for CM via the font substitution mechanism, i.e. there is no need to load the cm-super package - just leave the font settings in LyX at [Default]. Günter
Re: BibTeX Parser: Unexpected end of file.
On 10/06/2011 12:54 AM, Tom Francart wrote: Hi all, I'm using Lyx 2.0.0 (Ubuntu package). When trying to insert a citation in my document, I get the error message BibTeX Parser: Unexpected end of file. And indeed, part of my bibtex file is not available in Lyx. How can I get more info about what the problem is (e.g., a line number)? It's a 2.2MB .bib file which works fine with Bibtex and Pybliographer, so it's quite hard to find out what the problem is. I tried enabling debug output, but did not get more useful information. This is almost always due to a bad character in the file., e.g., a Unicode dash. LyX tries to read the file with the encoding of the main document. The bad character is probably in the first entry in the file that you do not see in LyX. rh
Re: Headlines starting new pages
On 10/06/2011 06:08 AM, Lastalda Felina wrote: I'm writing my diploma thesis in Lyx, using the class koma(book). Especially in the Materials Methods part, I often have sections ans subsections that go: *headline *shortish paragraph *table In this cases, Lyx often puts the headline and paragraph on one page and the table on the next (sometimes it even only puts the headline on the old page). (Screenshot: http://i2.photobucket.com/albums/y8/lastalda/LyxProblems/pagebreak.png) I would much rather have the headline start a new page in such cases. Is there a way I can define this behaviour in the latex header, or do I have to use manual pagebreaks whenever this irks me? This is due to how floats behave, and due to the very short section. LaTeX doesn't think of the table as part of the section. You'll have to do manual breaks (when all else is done!) to fix this. rh
Strange indentation with multiline footnotes
I guess this might be more of a Latex question but maybe someone here can help me with that. So always when I insert a footnote that has more text than fits on one line, all subsequent lines are shifted somewhat to the right, which looks weird to me. So I'd rather have either the first line shifted as well, or all other lines not shifted. Is there a way not to do this manually for each footnote? Regards, Tao
Re: biblatex showing neither bibliography nor cites in PDF
Jürgen Spitzmüller spitz at lyx.org writes: Thomas Strausz wrote: Can you check if such a line is there? If not, the bcf file is not added to LyX's dependency tracker and thus biber is not issued. No such line is to be found in the log file, I'm afraid. OK, we know the reason then. Please use the preamble workaround for the time being (it is harmless). We will fix this problem for LyX 2.0.2 in one way or the other. Thanks for your investigation. Jürgen Thank you for your work to improve LyX. And thank everyone who posted on that thread for helping me. Thomas
Re: Strange indentation with multiline footnotes
Hello, Tao Cumplido taocumplido at gmx.net writes: I guess this might be more of a Latex question but maybe someone here can help me with that. So always when I insert a footnote that has more text than fits on one line, all subsequent lines are shifted somewhat to the right, which looks weird to me. So I'd rather have either the first line shifted as well, or all other lines not shifted. Is there a way not to do this manually for each footnote? Regards, Tao Do you use a KOMA package for your writing? If yes, typing \deffootnote{1.5em}{1em}{\textsuperscript{\thefootnotemark}} should change that. That way, you eliminate the separate indention for the first line. Regards Thomas
Re: Headlines starting new pages
Ah, ok. Thank you for clarifying! 2011/10/6 Richard Heck rgh...@comcast.net: On 10/06/2011 06:08 AM, Lastalda Felina wrote: I'm writing my diploma thesis in Lyx, using the class koma(book). Especially in the Materials Methods part, I often have sections ans subsections that go: *headline *shortish paragraph *table In this cases, Lyx often puts the headline and paragraph on one page and the table on the next (sometimes it even only puts the headline on the old page). (Screenshot: http://i2.photobucket.com/albums/y8/lastalda/LyxProblems/pagebreak.png) I would much rather have the headline start a new page in such cases. Is there a way I can define this behaviour in the latex header, or do I have to use manual pagebreaks whenever this irks me? This is due to how floats behave, and due to the very short section. LaTeX doesn't think of the table as part of the section. You'll have to do manual breaks (when all else is done!) to fix this. rh -- Zu sagen Hier herrscht Freiheit ist immer ein Irrtum oder eine Lüge. Freiheit herrscht nicht. - Ehrich Fried, Herrschaftsfreiheit -
Re: Problem Outputting Particular TIFF File
Jane Shevtsov jane.eco at gmail.com writes: I just inserted a new TIFF file, generated by R, and am getting the same error for it. The PNG workaround should work, but can anyone help me figure out what's going on?Thanks,Jane Neither of these _should_ make a difference, but ... 1. Do any of the TIFF files that work contain spaces in their names (or, alternatively, does removing the space in the EMS... file's name get it to work)? 2. Are the file extensions of the non-working and working images the same case (.tiff or .TIFF)? Also, and this may sound a bit weird, if you open a DOS window (Start Run cmd) in the directory where the EMS thingy lives, and run convert EMS flowchart.tiff new.tiff does LyX like new.tiff? (Note: I'm assuming that the ImageMagick bin directory is on your path; otherwise you'll need to change 'convert' to 'C:\Program Files\WhereverTheHeckImageMagickIsInstalled\bin\convert'.) Paul
Re: LyX2.0 and Sweave - No Output
Yes, Yihui! Thank you, that was the missing step! I added C:\Program Files\R\R-2.13.0\share/texmf to MikTeXMaintenanceSettingsRoots and now my (very simple) example compiles. Liviu, thanks for being willing to help...fortunately Yihui's tip hit it right on the head. Shane On Wed, Oct 5, 2011 at 7:25 PM, Yihui Xie x...@yihui.name wrote: I believe Environment Schunk undefined means LaTeX cannot find Sweave.sty, which is part of R. Since you are using MikTeX, you can easily add the texmf tree (find it using R code R.home('share')) to MikTeX (using the menu Setting in the start menu or something -- I do not remember exactly). We have solved this headache that tons of users have run into in LyX 2.0.1, but currently there is no official release for Windows yet. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Wed, Oct 5, 2011 at 8:01 PM, Liviu Andronic landronim...@gmail.com wrote: On Thu, Oct 6, 2011 at 2:05 AM, Shane Siers shanesi...@gmail.com wrote: Hi, User's List... I'm a new-ish LyX user, otherwise naive to LaTeX. After about 10 hours of frustration, I got LyX to successfully open the Sweave module, and allow me Would have been a breeze on Linux.. to format text as a Sweave chunk. However, when I ViewView [PDF(pdflatex)], I get a list of errors: Can you compile examples/sweave.lyx? Else, can you provide a minimal example of the LyX file that gives you errors? Liviu Missing \endcsname inserted. LaTeX Error: Missing \begin{document}. Extra \endcsname. Missing \endcsname inserted. Missing \endcsname inserted. LaTeX Error: Environment Schunk undefined. LaTeX Error: Environment Sinput undefined. ...et. cetera... I'm using LyX 2.0.0, R 2.13.0 (64-bit), MikTeX 2.9, Windows 7 (64-bit). The text in my Sweave-LaTeX (pdflatex) converter is: Rscript --verbose --no-save --no-restore $$s/scripts/lyxsweave.R $$p$$i $$p$$o $$e $$r The text in my PATH Prefix box is: $LyXDir\bin;$LyXDir\python;$LyXDir\imagemagick;$LyXDir\ghostscript;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin;C:\Program Files (x86)\LyX20\bin;C:\Program Files\R\R-2.13.0\bin; C:\Program Files\R\R-2.13.0\bin\x86 Are the spaces in the path a problem? Can anyone help to get me Sweave-ing? -- Shane Siers Graduate Student Colorado State University -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail -- Shane
Re: numbering of an equation
Wolfgang Engelmann engelmann at uni-tuebingen.de writes: Maybe you tried in text mode? It works only if the cursor is inside the equation. Günter Thanks, Günther, but doing this does not help, and I tried it before. Do I have to include something in the preamble? No, nothing special is needed; it should work out of the box. Does this occur in a new document (article class, no modules)? In Tools Preferences Editing Shortcuts, if you put alt+m n in the Show ... search box, is math-number-toggle the only result you get? Also, are you perhaps using a customized UI file that might be remapping Alt+M+N? The only other thing that I can think of is to type Alt+M+N in different parts of a document (text area, heading, title, ...) until you find out what LyX thinks it maps to (assuming LyX thinks it maps to a different command). Paul
Re: Cross-reference in equation in lyx 2
David B daavidb at gmail.com writes: Hello,In LyX pre-2.0 I was able to put a cross-reference to an equation inside a formula, so that it would look something like in this image: http://www.latex-community.org/forum/download/file.php?id=4130If I try to do this in LyX 2.0 the reference ends up immediately above the formula, but outside of it. Does anyone know how to put cross-references in formulas in 2.0?Best Regards,David Is the following what you want? Paul #LyX 2.0 created this file. For more info see http://www.lyx.org/ \lyxformat 413 \begin_document \begin_header \textclass article \use_default_options true \maintain_unincluded_children false \language english \language_package default \inputencoding auto \fontencoding global \font_roman default \font_sans default \font_typewriter default \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize default \spacing single \use_hyperref false \papersize letterpaper \use_geometry true \use_amsmath 1 \use_esint 1 \use_mhchem 1 \use_mathdots 1 \cite_engine basic \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \use_refstyle 1 \index Index \shortcut idx \color #008000 \end_index \leftmargin 1in \topmargin 1in \rightmargin 1in \bottommargin 1in \secnumdepth 3 \tocdepth 3 \paragraph_separation skip \defskip smallskip \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \end_header \begin_body \begin_layout Standard First equation: \begin_inset Formula \begin{equation} y=mx+b\label{eq:eq1} \end{equation} \end_inset followed by second equation: \begin_inset Formula \begin{eqnarray} (\ref{eq:eq1})\nonumber \\ b = y-mx \end{eqnarray} \end_inset \end_layout \end_body \end_document
[OT] Fonts in TeXLive/DVI/Evince
Hi all, Not sure where the culprit is, but if I use \neq in a math formula in LyX with TeXLive 2010 and Evince as the document viewer, it shows up as an equal sign. Viewing in PDF is fine, and a random sampling of other math symbols all worked with View DVI. Anybody seen this before? Cheers, Paul
Index not printed
Dear all! I have a long text on classical mechanics on the Dutch Wikibooks site (http://nl.wikibooks.org/wiki/Klassieke_Mechanica). I made a pdf version of this text with Lyx, which is actually some 280 pages in total. I recently added some text and now there is one chapter where the index is not printed, which also blocs the printing of the index on the whole document. I use a smaller header file for testing the chapters separately and all give correct results except the chapter on 'Voorwerpendynamica' (Dynamics of objects). When testing it separately, all index entries are collected in the .idx file. Some space seems also reserved at the end of the document because there are 2 empty pages at the end, but even without the title 'Index'. Since the last generated pdf version, I changed from OpenSuSE 11.3 to 11.4, which means that a lot of routines have changed. But it is very strange that only one chapter fails. Removing the added text does not solve the problem. There is no indication of some error or warning in the log file. Sincerely, Hubert -- Hubert Christiaen Bloesemlaan 17 3360 Korbeek-Lo Belgium
[patch] add document-wide bibliography style setting
First step of moving the bibliography settings to the document settings (needed, e.g., for biblatex support). We define a default there. A BibTeX inset takes the default style from the buffer if it doesn't specify a style of its own. No UI yet, but it's coming. OK? -- Julien From cb7225e511ea0ae8714a7bccc6e0bb94ae0698f6 Mon Sep 17 00:00:00 2001 From: Julien Rioux jri...@lyx.org Date: Thu, 6 Oct 2011 17:38:05 +0200 Subject: [PATCH] Add a document-wide default bibliography style \biblio_style. This holds the name of a BibTeX style file for now. Any BibTeX inset can set the style to default to use the document-wide style. LyX format incremented to 417. --- development/FORMAT |5 lib/lyx2lyx/lyx_2_1.py | 52 --- src/Buffer.cpp |2 +- src/BufferParams.cpp | 17 ++ src/BufferParams.h |7 ++ src/insets/InsetBibtex.cpp |3 ++ 6 files changed, 81 insertions(+), 5 deletions(-) diff --git a/development/FORMAT b/development/FORMAT index 10c1d88..577c07c 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -11,6 +11,11 @@ adjustments are made to tex2lyx and bugs are fixed in lyx2lyx. --- +2011-10-06 Julien Rioux jri...@lyx.org + * Format incremented to 417 (rX) + New buffer param \biblio_style to specify a document-wide + default bibliography style (BibTeX style for the moment). + 2011-08-29 Uwe Stöhr uwesto...@web.de * Format incremented to 416 (r39557) support for \negmedspace and \negthinspace outside of math diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py index 6c6c6fe..ead33f2 100644 --- a/lib/lyx2lyx/lyx_2_1.py +++ b/lib/lyx2lyx/lyx_2_1.py @@ -25,7 +25,8 @@ import sys, os # Uncomment only what you need to import, please. -from parser_tools import find_token, find_end_of_inset, get_value +from parser_tools import find_token, find_end_of_inset, get_value, \ +get_quoted_value #from parser_tools import find_token, find_end_of, find_tokens, \ #find_token_exact, find_end_of_inset, find_end_of_layout, \ @@ -162,17 +163,60 @@ def revert_math_spaces(document): i = i + 1 +def convert_biblio_style(document): +Add a sensible default for \\biblio_style based on the citation engine. +i = find_token(document.header, \\cite_engine, 0) +if i != -1: +engine = get_value(document.header, \\cite_engine, i).split(_)[0] +style = {basic: plain, natbib: plainnat, jurabib: jurabib} +document.header.insert(i + 1, \\biblio_style + style[engine]) + + +def revert_biblio_style(document): +BibTeX insets with default option use the style defined by \\biblio_style. +i = find_token(document.header, \\biblio_style , 0) +if i == -1: +document.warning(No \\biblio_style line. Nothing to do.) +return + +default_style = get_value(document.header, \\biblio_style, i) +del document.header[i] + +# We are looking for bibtex insets having the default option +i = 0 +while True: +i = find_token(document.body, \\begin_inset CommandInset bibtex, i) +if i == -1: +return +j = find_end_of_inset(document.body, i) +if j == -1: +document.warning(Malformed LyX document: Can't find end of bibtex inset at line + str(i)) +i += 1 +return +k = find_token(document.body, options, i, j) +if k != -1: +options = get_quoted_value(document.body, options, k) +if options.split(,)[0] == default: +document.body[k] = 'options %s' \ +% options.replace(default, default_style) + '' +i = j + + ## # Conversion hub # supported_versions = [2.1.0,2.1] -convert = [[414, []], +convert = [ + [414, []], [415, [convert_undertilde]], - [416, []] + [416, []], + [417, [convert_biblio_style]], ] -revert = [[415, [revert_negative_space,revert_math_spaces]], +revert = [ + [416, [revert_biblio_style]], + [415, [revert_negative_space,revert_math_spaces]], [414, [revert_undertilde]], [413, [revert_visible_space]] ] diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 6aedab2..1b892e5 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -128,7 +128,7 @@ namespace { // Do not remove the comment below, so we get merge conflict in // independent branches. Instead add your own. -int const LYX_FORMAT = 416; //uwestoehr : support for horizontal spaces (bug 7728) +int const LYX_FORMAT = 417; //jrioux : document-wide BibTeX style via \biblio_style typedef mapstring, bool DepClean; typedef mapdocstring, pairInsetLabel const *, Buffer::References RefCache; diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 4f1edc1..e0f66a0 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -367,6 +367,7 @@
Re: [patch] add document-wide bibliography style setting
On 06/10/2011 6:01 PM, Julien Rioux wrote: First step of moving the bibliography settings to the document settings (needed, e.g., for biblatex support). We define a default there. A BibTeX inset takes the default style from the buffer if it doesn't specify a style of its own. No UI yet, but it's coming. OK? Sorry, wrong list.. -- Julien
Re: XeTeX - Load packages before fontspec
Thank you Günter, the encoding trick indeed solved the problem. In my opinion, however, it would be ideal if there was a way to configure when preamble statements are loaded (before or after lyx ones), but given the complexity that such a change would imply the current design is understandable. Again, thanks for the tip! :) Spyros On 10/06/2011 11:12 AM, Guenter Milde wrote: On 2011-10-04, Spyros Stathopoulos wrote: I'm using the first option already since I need to pass options to the font definitions. Still the problem lies with fontspec not the font definition. The problem lies with mathdesign:: %% %% Encoding is automatically set to T1 %% \RequirePackage[T1]{fontenc} The workaround is to re-set the TeX font encoding to EU1 (or U, if you use LuaTeX). The following example: \documentclass[english]{article} \usepackage{fontspec} \usepackage{xunicode} \usepackage{polyglossia} \setdefaultlanguage{english} \usepackage[mdugm]{mathdesign} %% Mathdesign sets font encoding to T1, reset with one of: % \RequirePackage[EU1]{fontenc} \renewcommand{\encodingdefault}{EU1} \setmainfont[Mapping=tex-text]{Comic Sans MS} \begin{document} Was ist das? \[ 2^{2}=4 \] \end{document} results in mathdesign math and comic text fonts. Günter
Re: Headlines starting new pages
On Thu, Oct 6, 2011 at 3:07 PM, Richard Heck rgh...@comcast.net wrote: On 10/06/2011 06:08 AM, Lastalda Felina wrote: I'm writing my diploma thesis in Lyx, using the class koma(book). Especially in the Materials Methods part, I often have sections ans subsections that go: *headline *shortish paragraph *table In this cases, Lyx often puts the headline and paragraph on one page and the table on the next (sometimes it even only puts the headline on the old page). (Screenshot: http://i2.photobucket.com/albums/y8/lastalda/LyxProblems/pagebreak.png) I would much rather have the headline start a new page in such cases. Is there a way I can define this behaviour in the latex header, or do I have to use manual pagebreaks whenever this irks me? This is due to how floats behave, and due to the very short section. LaTeX doesn't think of the table as part of the section. You'll have to do manual breaks (when all else is done!) to fix this. .. or use longtables, which break automatically and support captions. Liviu rh -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Re: [OT] Fonts in TeXLive/DVI/Evince
On Thu, Oct 6, 2011 at 5:46 PM, Paul A. Rubin ru...@msu.edu wrote: Hi all, Not sure where the culprit is, but if I use \neq in a math formula in LyX with TeXLive 2010 and Evince as the document viewer, it shows up as an equal sign. Viewing in PDF is fine, and a random sampling of other math symbols all worked with View DVI. Anybody seen this before? Sometimes PDF viewers fail on some characters, and in such cases the problem would be with the viewer, and not the file. Have you tried acroread? Liviu Cheers, Paul -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Re: Proper installation of cm-super
Re: Proper installation of cm-super PhilipPirrip Thu, 06 Oct 2011 04:35:47 -0700It seems so! :) What's the rendering like, now, in Acrobat Reader? It is perfect. Font type: type 1. I think you'll get the same now if you use Default family: Roman LaTeX font encoding T2A Roman: Computer Modern Roman without calling \usepackage{cm-super} Could you please confirm this. Calling \usepackage{cm-super} doesn't work at all.
Re: biblatex showing neither bibliography nor cites in PDF
Jürgen Spitzmüller writes: Thanks. Could you check if the attached also does the trick? This test is more reliable. Please also check if biber is run after the bib file has been modified (works here on Unix). Yes, this also works and biber is also run after modifying the bib file. -- Enrico
Re: [OT] Fonts in TeXLive/DVI/Evince
PDF output shows the correct symbol. It's only DVI that mucks it up. Paul -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Liviu Andronic landronim...@gmail.com wrote: On Thu, Oct 6, 2011 at 5:46 PM, Paul A. Rubin ru...@msu.edu wrote: Hi all, Not sure where the culprit is, but if I use \neq in a math formula in LyX with TeXLive 2010 and Evince as the document viewer, it shows up as an equal sign. Viewing in PDF is fine, and a random sampling of other math symbols all worked with View DVI. Anybody seen this before? Sometimes PDF viewers fail on some characters, and in such cases the problem would be with the viewer, and not the file. Have you tried acroread? Liviu Cheers, Paul -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Re: BibTeX Parser: Unexpected end of file.
Hi Richard, That was indeed the case, I found the culprit using isutf8. Thanks for your response. best regards, Tom On Fri, Oct 7, 2011 at 12:05 AM, Richard Heck rgh...@comcast.net wrote: On 10/06/2011 12:54 AM, Tom Francart wrote: Hi all, I'm using Lyx 2.0.0 (Ubuntu package). When trying to insert a citation in my document, I get the error message BibTeX Parser: Unexpected end of file. And indeed, part of my bibtex file is not available in Lyx. How can I get more info about what the problem is (e.g., a line number)? It's a 2.2MB .bib file which works fine with Bibtex and Pybliographer, so it's quite hard to find out what the problem is. I tried enabling debug output, but did not get more useful information. This is almost always due to a bad character in the file., e.g., a Unicode dash. LyX tries to read the file with the encoding of the main document. The bad character is probably in the first entry in the file that you do not see in LyX. rh
Specify an input path in the global preferences?
Hi, My default preamble is \include{standardpreamble}. This works well in the top level of my documents directory, where I keep standardpreamble.tex. However, if I save a file to a subdirectory, then standardpreamble cannot be found. Is it possible, in the preferences (not document settings), to specify an absolute search path so that standardpreamble.tex is always found? Specifying an absolute path in the document settings is out of the question, since I use LyX on several different computers / operating systems, all synchronized with version control. For silly compatibility reasons, I'm still using LyX 1.6. Thanks! -Ben
Re: Specify an input path in the global preferences?
On Fri, Oct 7, 2011 at 1:18 AM, Ben M. maresr12t...@gmail.com wrote: Hi, My default preamble is \include{standardpreamble}. This works well in the top level of my documents directory, where I keep standardpreamble.tex. However, if I save a file to a subdirectory, then standardpreamble cannot be found. Is it possible, in the preferences (not document settings), to specify an absolute search path so that standardpreamble.tex is always found? Hae you tried Prefs Paths PATH? Liviu Specifying an absolute path in the document settings is out of the question, since I use LyX on several different computers / operating systems, all synchronized with version control. For silly compatibility reasons, I'm still using LyX 1.6. Thanks! -Ben -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Re: Problem Outputting Particular TIFF File
Hi Paul, On Thu, Oct 6, 2011 at 8:01 AM, Paul A. Rubin ru...@msu.edu wrote: 1. Do any of the TIFF files that work contain spaces in their names (or, alternatively, does removing the space in the EMS... file's name get it to work)? No, getting rid of the space makes no difference. 2. Are the file extensions of the non-working and working images the same case (.tiff or .TIFF)? The file extensions are all lowercase. Also, and this may sound a bit weird, if you open a DOS window (Start Run cmd) in the directory where the EMS thingy lives, and run convert EMS flowchart.tiff new.tiff does LyX like new.tiff? (Note: I'm assuming that the ImageMagick bin directory is on your path; otherwise you'll need to change 'convert' to 'C:\Program Files\WhereverTheHeckImageMagickIsInstalled\bin\convert'.) This results in an error: Invalid parameter - new.tiff. I found ImageMagick, or at least the convert.exe file in my LyX folder, but should there be any other executables there? Thanks, Jane -- - Jane Shevtsov Ecology Ph.D. candidate, University of Georgia co-founder, www.worldbeyondborders.org All wars are civil wars, because all men are brothers... Each one owes infinitely more to the human race than to the particular country in which he was born. --Francois Fenelon, theologian and writer (1651-1715)
Re: Specify an input path in the global preferences?
On 2011-10-06, Ben M. wrote: My default preamble is \include{standardpreamble}. This works well in the top level of my documents directory, where I keep standardpreamble.tex. However, if I save a file to a subdirectory, then standardpreamble cannot be found. Is it possible, in the preferences (not document settings), to specify an absolute search path so that standardpreamble.tex is always found? How about placing the file in the system standard texmf path? On my Debian Linux with texlive2010, this would be somewhere under ~/texmf/. Günter
Proper installation of cm-super
Hi, I want to use cm-super fonts in my pdf output. The system I use us Win XP SP3, LyX 2.0.0, MiKTeX 2.9 and Adobe Acrobat Professional 8. I installed the cm-super package from MiKTeX 2.9>Maintenance(Admin)>Package Manager(Admin). In LyX I open new document and write something in english with default font settings. How to use the cm-super fonts in my document? The \usepackage{cm-super} command in preamble gives Latex Error: File 'cm-super.sty' not found. Please write detailed instructions how to properly install cm-super and use it in LyX 2.0.0. Thank, Sergey
Re: Proper installation of cm-super
On Thu, Oct 6, 2011 at 9:28 AM, Sergey Churilovwrote: > Hi, > > I want to use cm-super fonts in my pdf output. > The system I use us Win XP SP3, LyX 2.0.0, MiKTeX 2.9 and Adobe Acrobat > Professional 8. > I installed the cm-super package from MiKTeX 2.9>Maintenance(Admin)>Package > Manager(Admin). > In LyX I open new document and write something in english with default font > settings. > After installing the font, have you run Tools > Reconfigure in LyX? Liviu > How to use the cm-super fonts in my document? > The \usepackage{cm-super} command in preamble gives Latex Error: File > 'cm-super.sty' not found. > > Please write detailed instructions how to properly install cm-super and use > it in LyX 2.0.0. > > Thank, > Sergey -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
Re: biblatex showing neither bibliography nor cites in PDF
Enrico Forestieri wrote: > Yes, that does the trick and biber is run. Thanks. Could you check if the attached also does the trick? This test is more reliable. Please also check if biber is run after the bib file has been modified (works here on Unix). JürgenIndex: src/LaTeX.cpp === --- src/LaTeX.cpp (Revision 39799) +++ src/LaTeX.cpp (Arbeitskopie) @@ -279,7 +279,7 @@ // biber writes no info to the aux file, so we just check // if a bcf file exists (and if it was updated) FileName const bcffile(changeExtension(file.absFileName(), ".bcf")); - bool const biber = head.exist(bcffile); + biber |= head.exist(bcffile); // run bibtex // if (scanres & UNDEF_CIT || scanres & RERUN || run_bibtex) @@ -290,8 +290,8 @@ // no checks for now LYXERR(Debug::LATEX, "Running BibTeX."); message(_("Running BibTeX.")); - updateBibtexDependencies(head, bibtex_info, biber); - rerun |= runBibTeX(bibtex_info, runparams, biber); + updateBibtexDependencies(head, bibtex_info); + rerun |= runBibTeX(bibtex_info, runparams); if (biber) { // since biber writes no info to the aux file, we have // to parse the blg file (which only exists after biber @@ -304,7 +304,7 @@ /// If we run pdflatex on the file after running latex on it, /// then we do not need to run bibtex, but we do need to /// insert the .bib and .bst files into the .dep-pdf file. - updateBibtexDependencies(head, bibtex_info, biber); + updateBibtexDependencies(head, bibtex_info); } // 2 @@ -350,8 +350,8 @@ // no checks for now LYXERR(Debug::LATEX, "Running BibTeX."); message(_("Running BibTeX.")); - updateBibtexDependencies(head, bibtex_info, biber); - rerun |= runBibTeX(bibtex_info, runparams, biber); + updateBibtexDependencies(head, bibtex_info); + rerun |= runBibTeX(bibtex_info, runparams); } // 4 @@ -550,8 +550,7 @@ void LaTeX::updateBibtexDependencies(DepTable & dep, - vector const & bibtex_info, - bool biber) + vector const & bibtex_info) { // Since a run of Bibtex mandates more latex runs it is ok to // remove all ".bib" and ".bst" files. @@ -585,7 +584,7 @@ bool LaTeX::runBibTeX(vector const & bibtex_info, - OutputParams const & runparams, bool biber) + OutputParams const & runparams) { bool result = false; for (vector::const_iterator it = bibtex_info.begin(); @@ -708,6 +707,9 @@ } } else if (contains(token, "run BibTeX")) { retval |= UNDEF_CIT; + } else if (contains(token, "run Biber")) { +retval |= UNDEF_CIT; +biber = true; } else if (contains(token, "Rerun LaTeX") || contains(token, "Please rerun LaTeX") || contains(token, "Rerun to get")) { Index: src/LaTeX.h === --- src/LaTeX.h (Revision 39799) +++ src/LaTeX.h (Arbeitskopie) @@ -192,15 +192,14 @@ /// void updateBibtexDependencies(DepTable &, - std::vector const &, - bool biber); + std::vector const &); /// void scanBlgFile(DepTable & head); /// bool runBibTeX(std::vector const &, - OutputParams const &, bool biber); + OutputParams const &); /// void deleteFilesOnError() const; @@ -222,6 +221,9 @@ /// OutputParams runparams; + + /// Do we use biber? + bool biber; };
Re: Sans-serif math font
On 2011-10-06, Diego Queiroz wrote: > [-- Type: text/plain, Encoding: --] > Hi folks. > I want to change the font in Math environment to Sans-serif, but when I > change the Font Default Family in a document (thru Document > Settings... > > Fonts) the font used in Math environment is not changed. This is a feature of TeX: text fonts and math fonts are separate entities. This is, because in math the letter shape conveys *meaning* (and, of course also becauso of historic reasons. > Currently, is there a way to change the Math font to Sans-serif in LyX? Only via the LaTeX preamble. > I know that I can do that including \usepackage{sfmath} to the preamble, but > I want to know if something similiar can be done using LyX User Interface, > without ERT. No need for ERT - font selection is done in the preamble. No support via the GUI. The current selection of GUI-supported fonts is *very* limited. This is a long-standing enhancement request. There are more options than the sfmath package. The LaTeX font catalogue lists font packages with math support http://www.tug.dk/FontCatalogue/mathfonts.html some of them sans-serif. A (German) overwiew with math test pages is available at http://milde.users.sourceforge.net/Matheschriften/matheschriften.html There is a table listing sans-serif math options at http://milde.users.sourceforge.net/Matheschriften/matheschriften.html#sans-serif-grotesk I recommend Arev: in the LaTeX preamble: \usepackage{arev} If you want a different text font, put the font-selecting commands below to overwrite the selection of Arev Sans in the arev package. Günter
Re: numbering of an equation
On 2011-10-05, Wolfgang Engelmann wrote: > For > Bearbeiten->Mathe->Nummerierung an/aus > (Tastenkürzel Alt+M N) > I get: > command deactivated > but the list of shortcuts shows Alt+M N > I am using Lyx 2.0.1 and Debian squeeze > Whats wrong? Maybe you tried in text mode? It works only if the cursor is inside the equation. Günter
Re: Proper installation of cm-super
Hi, I did that, but the problem remains. Here is my Latex code: % Preview source code %% LyX 2.0.0 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \synctex=-1 \makeatletter %% User specified LaTeX commands. \usepackage{cm-super} \makeatother \usepackage{babel} \begin{document} testtesttest \end{document}
Re: Cyrillic T1 font
On 2011-10-04, Sergey Churilov wrote: > I am using LyX 2.0.0 on WinXP SP3 and MiKTeX 2.9. I use Bulgarian > language and write cyrillic letters, but the pdf output from Adobe > Acrobat renders letters with grey colour instead of pure black. The > output from the printer looks just fine. It is the problem of the font > which is used and Adobe doesn't render it well since it is Type 3 font. > Which font to use in order to have Type 1 font in Adobe (as read in > File>Properties). This depends on the "engine". If you can use XeTeX or LuaTeX, just tick Document>Settings>Fonts [ ] use non-TeX fonts and select from any of the systemwide installed fonts. With "traditional" (8-bit) tex engines, you need to install special fonts in one of the T2A, T2B, or T2C "font encodings" and select them in the LaTeX preamble. (BTW: In TeX, "T1" is a font encoding for Latin, so you cannot have a "Cyrillic T1 font".) For Debian, I know of the "scalable-cyrfonts-tex" package that provides Times/Helvetica/Courier lookalikes that used to be part of the TeX Gyre fonts until they were removed because of license reasons. The page http://milde.users.sourceforge.net/substitutefont/ shows an example how to re-combine these fonts. Günter
Re: XeTeX - Load packages before fontspec
On 2011-10-04, Spyros Stathopoulos wrote: > I'm using the first option already since I need to pass options to the > font definitions. Still the problem lies with fontspec not the font > definition. The problem lies with mathdesign:: %% %% Encoding is automatically set to T1 %% \RequirePackage[T1]{fontenc} The workaround is to re-set the TeX font encoding to EU1 (or U, if you use LuaTeX). The following example: \documentclass[english]{article} \usepackage{fontspec} \usepackage{xunicode} \usepackage{polyglossia} \setdefaultlanguage{english} \usepackage[mdugm]{mathdesign} %% Mathdesign sets font encoding to T1, reset with one of: % \RequirePackage[EU1]{fontenc} \renewcommand{\encodingdefault}{EU1} \setmainfont[Mapping=tex-text]{Comic Sans MS} \begin{document} Was ist das? \[ 2^{2}=4 \] \end{document} results in mathdesign math and comic text fonts. Günter
Re: numbering of an equation
On Thursday 06 October 2011 09:39:50 Guenter Milde wrote: > On 2011-10-05, Wolfgang Engelmann wrote: > > For > > Bearbeiten->Mathe->Nummerierung an/aus > > (Tastenkürzel Alt+M N) > > > > I get: > > command deactivated > > > > but the list of shortcuts shows Alt+M N > > > > I am using Lyx 2.0.1 and Debian squeeze > > > > Whats wrong? > > Maybe you tried in text mode? > It works only if the cursor is inside the > equation. > > Günter Thanks, Günther, but doing this does not help, and I tried it before. Do I have to include something in the preamble? Wolfgang
Re: XeTeX - Load packages before fontspec
On 2011-10-04, Spyros Stathopoulos wrote: > I've been trying to create a custom module but unfortunately is seems > that fontspec is not handled by a module at all, instead it is placed > into the preamble automatically when XeTeX mode is triggered. I believe the idea was to load mathdesign in a module. However, I did not test whether it is possible to load it before fontenc to reset the TeX font encoding to EU1 or U. > In the end the only thing that did the job was modifying a local copy > of the .cls, which is not too bad actually. However, given the > peculiarity of fontspec with a lot of font-affecting packages there > should be a way to override or customize this kind of behavior (along > with passing options to \setXfont) without resorting to modifying > classes and/or packages. Other than that I'm quite happy with the way > LyX handles XeTeX. Actually, the "use non-TeX fonts" option is a "use fontspec" option, combining this with 8-bit font packages is always tricky. Supporting these combinations in the GUI would make things too complicated. I could rather imagine to add "polyglossia" to the selection in Document>Settings>Languages>Language package. This way, it would be possible to have XeTeX + polyglossia also without selecting fontspec per GUI. Günter
Re: biblatex showing neither bibliography nor cites in PDF
Jürgen Spitzmüller lyx.org> writes: > > Thomas Strausz wrote: > > Sorry. I restarted LyX and now the output looks like this: > > Thanks. It seems like the bcf file is not mentioned in your LaTeX log file. > > The log file is supposed to have a line such as > > \openout3 = `Minimalbeispiel.bcf'. > > Can you check if such a line is there? If not, the bcf file is not added to > LyX's dependency tracker and thus biber is not issued. No such line is to be found in the log file, I'm afraid. Thomas
Re: Proper installation of cm-super
2011/10/6 Sergey Churilov: > Hi, > > I did that, but the problem remains. Here is my Latex code: > > % Preview source code > > %% LyX 2.0.0 created this file. For more info, see http://www.lyx.org/. > > %% Do not edit unless you really know what you are doing. > > \documentclass[english]{article} > > \usepackage{lmodern} > It seems that you've selected LM fonts in Doc Settings. You should stick to defaults if you're later... > \usepackage[T1]{fontenc} > > \usepackage[latin9]{inputenc} > > \synctex=-1 > > \makeatletter > > %% User specified LaTeX commands. > > \usepackage{cm-super} > ... loading a different font package. Does this work? Liviu > \makeatother > > \usepackage{babel} > > \begin{document} > > testtesttest > > \end{document} > > > > -- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail