Re: tex2LyX error
Am 29.09.23 um 19:31 schrieb Hal Kierstead via lyx-users: This took me a while because of working with two apps. Here are a Latex file . The Lyx file is too short. Also it does not compile because of an extra brace related to the equation. The \parbox and the \label are the problem. However, a \parbox inside the eqaution is a bit curious. You should use \text from amsmath or at least \textit: \begin{equation}\label{k5y} k=5 \text{ and there is some } y\in N(v_1)\cap N(v_4) \text{ with } N_{G-C}(y)=\{z\} \text{ and } d_{G-C}(z)\ge 3. \end{equation} The \label will still be the problem for tex2lyx, because it merges the equation number (1) with the label to (1k5y). This looks like a bug in tex2lyx. Herbert -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: tex2LyX error
Scott - This took me a while because of working with two apps. Here are a Latex file MWE.tex Description: Binary data and what LyX imports MWE.lyx Description: Binary data . The Lyx file is too short. Also it does not compile because of an extra brace related to the equation. If you erase the brace everything works. In particular we get the whole LyX file. I can understand that we may get some Latex errors from the importing process, but why do we lose text in the LyX file? Hal > On Sep 29, 2023, at 8:46 AM, Scott Kostyshak wrote: > > On Fri, Sep 29, 2023 at 08:28:31AM -0700, Hal Kierstead via lyx-users wrote: >> All - >> >> I have a 1227 line LaTeX file that compiles fine. I would like to import it >> into LyX 2.3.7. Every time I try the import ends at line 543. This is just >> before an \end{proof}. After adding the missing \end{proof} the shortened >> LyX file works fine. >> >> I have tried importing other LaTeX files without problems. I have also tried >> restarting LyX. What could be happening? > > Could you please make a minimal example .tex file? > > Thanks, > Scott > -- > lyx-users mailing list > lyx-users@lists.lyx.org > http://lists.lyx.org/mailman/listinfo/lyx-users -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: tex2LyX error
On Fri, Sep 29, 2023 at 08:28:31AM -0700, Hal Kierstead via lyx-users wrote: > All - > > I have a 1227 line LaTeX file that compiles fine. I would like to import it > into LyX 2.3.7. Every time I try the import ends at line 543. This is just > before an \end{proof}. After adding the missing \end{proof} the shortened LyX > file works fine. > > I have tried importing other LaTeX files without problems. I have also tried > restarting LyX. What could be happening? Could you please make a minimal example .tex file? Thanks, Scott signature.asc Description: PGP signature -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
tex2LyX error
All - I have a 1227 line LaTeX file that compiles fine. I would like to import it into LyX 2.3.7. Every time I try the import ends at line 543. This is just before an \end{proof}. After adding the missing \end{proof} the shortened LyX file works fine. I have tried importing other LaTeX files without problems. I have also tried restarting LyX. What could be happening? Thanks, Hal -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: tex2lyx Feature Request
Jean-Marc Let's make it --list-textclasses -l that was just an example. The request concerns tex2lyx. I am getting the available textclasses out of it. el n 30/06/2023 11:30, Jean-Marc Lasgouttes wrote: > Le 30/06/2023 à 11:07, Dr Eberhard Lisse a écrit : >> so I wonder if one should not implement a similar switch like >> >> --list-modules > [--list-layouts, right?] >> >> or similar which would do just that and return something like >> >> AEA >> IEEEtran-CompSoc >> IEEEtran-TransMag > [...] > > Note that this information is available in /textclasses.lst. > > Does this request concern tex2lyx or LyX itself. > > I am not totally sure what information you got from it, to be honoest. > > JMarc > > -- To email me replace 'nospam' with 'el' -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: tex2lyx Feature Request
Le 30/06/2023 à 11:07, Dr Eberhard Lisse a écrit : so I wonder if one should not implement a similar switch like --list-modules [--list-layouts, right?] or similar which would do just that and return something like AEA IEEEtran-CompSoc IEEEtran-TransMag [...] Note that this information is available in /textclasses.lst. Does this request concern tex2lyx or LyX itself. I am not totally sure what information you got from it, to be honoest. JMarc -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
tex2lyx Feature Request
Hi, I am doing an exercise of translating OpenOffice formatted files into Lyx via pandoc and tex2lyx. The LyX file is readable but when I use scrlettr it wants Koma Letter V1 which is not installed. I had to do find /Applications/LyX.app/ -name 'scrl*' to find /Applications/LyX.app//Contents/Resources/layouts/scrlettr.layout /Applications/LyX.app//Contents/Resources/layouts/scrlttr2.layout and I found pandoc --list-output-formats so I wonder if one should not implement a similar switch like --list-modules or similar which would do just that and return something like AEA IEEEtran-CompSoc IEEEtran-TransMag IEEEtran RJournal a0poster aa aapaper aastex aastex6 aastex62 achemso acm-sigs-alt acm-sigs acmart acmsiggraph-0-92 acmsiggraph agu-dtd agums agutex amsart amsbook apa apa6 apa7 arab-article article-beamer article beamer beamerposter book broadway bxjsarticle bxjsbook bxjsreport bxjsslide chess cl2emult ctex-article ctex-book ctex-report db_sts.inc dinbrief docbook-book docbook-chapter docbook-section docbook doublecol-new dtk ectaart egs elsart elsarticle entcs europasscv europecv extarticle extbook extletter extreport foils frletter g-brief g-brief2 heb-article heb-letter hollywood ijmpc ijmpd iopart isprs iucr jarticle jasatex jbook jgrga jreport jsarticle jsbook jss kluwer latex8 letter lettre llncs ltugboat maa-monthly memoir moderncv mwart mwbk mwrep paper powerdot recipebook report revtex revtex4-1 revtex4-2 revtex4 sciposter scrartcl scrarticle-beamer scrbook scrlettr scrlttr2 scrreprt seminar siamltex sigplanconf simplecv singlecol-new singlecol slides spie sts.inc svglobal svglobal3 svjog svmono svmult svprobth tarticle tbook treport tufte-book tufte-handout which was generated by find /Applications/LyX.app -name '*.layout' \ | awk -F'/' '{print $7}' \ | sort \ | sed 's/.layout//g' and so will miss the .inc and .module there. Would that make sense? el -- To email me replace 'nospam' with 'el' -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: tex2lyx 2.3.2 and enumerate-resume
In case someone is interested, I got to this issue, while playing with Dragon Dictate for the Mac (discontinued by the developer 6 weeks after I purchased the license :-(-O) It reliably crashes when trying to "activate" LyX, never mind that a few years ago when I tried this with previous versions I could not dictate into LyX. So I went the markdown road and developed this workflow over a Sunday afternoon Dictate Markdown into TextMate Issue regularly "Press Key Command S" and "Cache Document" :-)-O Bash Function call pandoc with specific template do some editing of the LaTeX file with Perl run tex2lyx remove ERT with Perl version the Markdown and LyX file(s) Review in LyX Save PDF or print Now I still need to Train my Dragon to understand my Namlish and the medical and/or IT terms I use, but it seems with a bit of self discipline and a cheat sheet I might be onto something. I will also experiment with Dragon on Windows in Virtual Box, which I have for my practice software anyway, and from which I can save the markdown file out onto the mac, so I can continue with the above workflow. This might actually be a solution for other people needing to generate large amounts of text in LyX. greetings, el On 2019-05-13 23:46 , Dr Eberhard W Lisse wrote: > Perfect, I am an early adopter of new versions so I'll go for 2.4 > rather than for 2.3.[34] anyway. > > thanks, > > el [...] >> It's basically https://www.lyx.org/trac/ticket/11259 >> >> It's fixed in 2.4.x. It might get backported to 2.3.4 (but not >> 2.3.3). >> >> Jürgen
Re: tex2lyx 2.3.2 and enumerate-resume
Perfect, I am an early adopter of new versions so I'll go for 2.4 rather than for 2.3.[34] anyway. thanks, el On 2019-05-13 18:41 , Jürgen Spitzmüller wrote: > Am Montag, den 13.05.2019, 14:09 +0200 schrieb Dr Eberhard Lisse: >> Hi, >> >> I have run >> >> tex2lyx -c scrartcl -m enumitem -f mwe.tex >> >> and get the enclosed >> >> mwe.lyx >> >> where I have manually removed the ERT (see below) from the line with >> "item 1" and right clicked that and the line with "item 2" to be >> proper >> Enumerate-Resume which produces the enclosed >> >> mwe.pdf >> >> >> While the PDF is correctly numbered I would rather prefer not to have >> the ERT in the LyX file, as left in the one with "item 3". >> >> >> Is this known? > > Yes. > >> >> Would that be a bug? > > It's basically https://www.lyx.org/trac/ticket/11259 > > It's fixed in 2.4.x. It might get backported to 2.3.4 (but not 2.3.3). > > Jürgen > >> >> Can something be done about it? Other than regex'ing it in Perl. >> >> greetings, el -- Dr. Eberhard W. Lisse / Obstetrician & Gynaecologist (Saar) e...@lisse.na/ * | Telephone: +264 81 124 6733 (cell) PO Box 8421 / Bachbrecht, Namibia ;/
Re: tex2lyx 2.3.2 and enumerate-resume
Am Montag, den 13.05.2019, 14:09 +0200 schrieb Dr Eberhard Lisse: > Hi, > > I have run > > tex2lyx -c scrartcl -m enumitem -f mwe.tex > > and get the enclosed > > mwe.lyx > > where I have manually removed the ERT (see below) from the line with > "item 1" and right clicked that and the line with "item 2" to be > proper > Enumerate-Resume which produces the enclosed > > mwe.pdf > > > While the PDF is correctly numbered I would rather prefer not to have > the ERT in the LyX file, as left in the one with "item 3". > > > Is this known? Yes. > > Would that be a bug? It's basically https://www.lyx.org/trac/ticket/11259 It's fixed in 2.4.x. It might get backported to 2.3.4 (but not 2.3.3). Jürgen > > Can something be done about it? Other than regex'ing it in Perl. > > greetings, el signature.asc Description: This is a digitally signed message part
tex2lyx 2.3.2 and enumerate-resume
Hi, I have run tex2lyx -c scrartcl -m enumitem -f mwe.tex and get the enclosed mwe.lyx where I have manually removed the ERT (see below) from the line with "item 1" and right clicked that and the line with "item 2" to be proper Enumerate-Resume which produces the enclosed mwe.pdf While the PDF is correctly numbered I would rather prefer not to have the ERT in the LyX file, as left in the one with "item 3". Is this known? Would that be a bug? Can something be done about it? Other than regex'ing it in Perl. greetings, el #LyX 2.3 created this file. For more info see http://www.lyx.org/ \lyxformat 544 \begin_document \begin_header \save_transient_properties true \origin unavailable \textclass scrartcl \begin_preamble \usepackage{enumitem} \end_preamble \use_default_options false \begin_modules enumitem \end_modules \maintain_unincluded_children false \language english \language_package none \inputencoding auto \fontencoding default \font_roman "default" "default" \font_sans "default" "default" \font_typewriter "default" "default" \font_math "auto" "auto" \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 \use_microtype false \use_dash_ligatures true \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize default \spacing single \use_hyperref false \papersize default \use_geometry false \use_package amsmath 1 \use_package amssymb 0 \use_package cancel 0 \use_package esint 1 \use_package mathdots 0 \use_package mathtools 0 \use_package mhchem 0 \use_package stackrel 0 \use_package stmaryrd 0 \use_package undertilde 0 \cite_engine basic \cite_engine_type default \biblio_style plain \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \justification true \use_refstyle 0 \use_minted 0 \index Index \shortcut idx \color #008000 \end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \paragraph_indentation default \is_math_indent 0 \math_numbering_side default \quotes_style english \dynamic_quotes 0 \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 Some text \end_layout \begin_layout Enumerate-Resume item 1 \end_layout \begin_layout Enumerate-Resume item 2 \end_layout \begin_layout Standard more text \end_layout \begin_layout Enumerate \begin_inset Argument 1 status collapsed \begin_layout Plain Layout resume \end_layout \end_inset item 3 \end_layout \begin_layout Enumerate item 4 \end_layout \begin_layout Standard and even more. \end_layout \end_body \end_document mwe.pdf Description: Adobe PDF document mwe.tex Description: TeX document
Re: How to force tex2lyx to read unicode (from within Lyx)?
On 11-Feb-19 4:16 AM, Scott Kostyshak wrote: > On Sat, Nov 03, 2018 at 11:45:14AM -0400, Richard Kimberly Heck wrote: >> On 11/2/18 5:52 PM, Baris Erkus wrote: >>> On 11/2/2018 1:33 PM, Baris Erkus wrote: >>>> Hello, >>>> >>>> I am trying to import the a .tex file into LyX (using file->import). >>>> The file has Turkish characters and I believe it is using UTF8 encoding. >>>> When I import it, it does not show Turkish characters properly. I >>>> attached the file for your play-around. >>>> >>>> When I import the file on the command line with the UTF8 option tex2lyx >>>> -e UTF8 ch1.tex, the LyX file looks just fine except one or two characters. >>>> >>>> So is there a way to tell to tex2lyx to use UTF8 encoding from within >>>> LyX? This issue is occured when I import a tex file that has >>>> \input{ch1.tex} in it. So, maybe LyX has and option to force tex2lyx to >>>> read in UTF8 for all imports? >>>> >>>> I found exactly same question on this post, but the answers seem to be >>>> unrelated: >>>> >>>> https://lyx-users.lyx.narkive.com/Rg1StNIT/how-to-force-tex2lyx-to-read-unicode-from-within-lyx >>>> >>>> Thanks >>>> >>>> Baris >>>> >>> Found the answer: >> Well, that's *an* answer: You can set up a custom "utf8" import, if you >> want. As JMarc said, though, tex2lyx should detect the encoding. Can you >> file a bug report about this so it doesn't get lost? > For archival purposes, note that a bug report was created here: > >https://www.lyx.org/trac/ticket/11364 > > Scott Noted with thanks. BE. -- ↓↓ Please bottom-post. Start your reply here:
Re: How to force tex2lyx to read unicode (from within Lyx)?
On Sat, Nov 03, 2018 at 11:45:14AM -0400, Richard Kimberly Heck wrote: > On 11/2/18 5:52 PM, Baris Erkus wrote: > > On 11/2/2018 1:33 PM, Baris Erkus wrote: > >> Hello, > >> > >> I am trying to import the a .tex file into LyX (using file->import). > >> The file has Turkish characters and I believe it is using UTF8 encoding. > >> When I import it, it does not show Turkish characters properly. I > >> attached the file for your play-around. > >> > >> When I import the file on the command line with the UTF8 option tex2lyx > >> -e UTF8 ch1.tex, the LyX file looks just fine except one or two characters. > >> > >> So is there a way to tell to tex2lyx to use UTF8 encoding from within > >> LyX? This issue is occured when I import a tex file that has > >> \input{ch1.tex} in it. So, maybe LyX has and option to force tex2lyx to > >> read in UTF8 for all imports? > >> > >> I found exactly same question on this post, but the answers seem to be > >> unrelated: > >> > >> https://lyx-users.lyx.narkive.com/Rg1StNIT/how-to-force-tex2lyx-to-read-unicode-from-within-lyx > >> > >> Thanks > >> > >> Baris > >> > > > > Found the answer: > > Well, that's *an* answer: You can set up a custom "utf8" import, if you > want. As JMarc said, though, tex2lyx should detect the encoding. Can you > file a bug report about this so it doesn't get lost? For archival purposes, note that a bug report was created here: https://www.lyx.org/trac/ticket/11364 Scott signature.asc Description: PGP signature
Re: How to force tex2lyx to read unicode (from within Lyx)?
On 11/2/18 5:52 PM, Baris Erkus wrote: > On 11/2/2018 1:33 PM, Baris Erkus wrote: >> Hello, >> >> I am trying to import the a .tex file into LyX (using file->import). >> The file has Turkish characters and I believe it is using UTF8 encoding. >> When I import it, it does not show Turkish characters properly. I >> attached the file for your play-around. >> >> When I import the file on the command line with the UTF8 option tex2lyx >> -e UTF8 ch1.tex, the LyX file looks just fine except one or two characters. >> >> So is there a way to tell to tex2lyx to use UTF8 encoding from within >> LyX? This issue is occured when I import a tex file that has >> \input{ch1.tex} in it. So, maybe LyX has and option to force tex2lyx to >> read in UTF8 for all imports? >> >> I found exactly same question on this post, but the answers seem to be >> unrelated: >> >> https://lyx-users.lyx.narkive.com/Rg1StNIT/how-to-force-tex2lyx-to-read-unicode-from-within-lyx >> >> Thanks >> >> Baris >> > > Found the answer: Well, that's *an* answer: You can set up a custom "utf8" import, if you want. As JMarc said, though, tex2lyx should detect the encoding. Can you file a bug report about this so it doesn't get lost? Riki
Re: How to force tex2lyx to read unicode (from within Lyx)?
On 11/2/2018 1:33 PM, Baris Erkus wrote: Hello, I am trying to import the a .tex file into LyX (using file->import). The file has Turkish characters and I believe it is using UTF8 encoding. When I import it, it does not show Turkish characters properly. I attached the file for your play-around. When I import the file on the command line with the UTF8 option tex2lyx -e UTF8 ch1.tex, the LyX file looks just fine except one or two characters. So is there a way to tell to tex2lyx to use UTF8 encoding from within LyX? This issue is occured when I import a tex file that has \input{ch1.tex} in it. So, maybe LyX has and option to force tex2lyx to read in UTF8 for all imports? I found exactly same question on this post, but the answers seem to be unrelated: https://lyx-users.lyx.narkive.com/Rg1StNIT/how-to-force-tex2lyx-to-read-unicode-from-within-lyx Thanks Baris Found the answer: See attached figure [cid:part1.B290F4D5.E96124FC@hotmail.com]
Re: How to force tex2lyx to read unicode (from within Lyx)?
Well, seems like file->import simply calls tex2lyx.exe without any option such as "-e UTF8". It should not be very difficult to let the user enter his choice of options... On 11/2/2018 10:43 PM, Jean-Marc Lasgouttes wrote: > Le 02/11/2018 à 10:33, Baris Erkus a écrit : >> So is there a way to tell to tex2lyx to use UTF8 encoding from within >> LyX? This issue is occured when I import a tex file that has >> \input{ch1.tex} in it. So, maybe LyX has and option to force tex2lyx to >> read in UTF8 for all imports? > > THe question is why tex2lyx does not see that your main file contains > UTF8. If LaTeX can process it as UTF8, so should tex2lyx. > > JMarc
Re: How to force tex2lyx to read unicode (from within Lyx)?
Le 02/11/2018 à 10:33, Baris Erkus a écrit : So is there a way to tell to tex2lyx to use UTF8 encoding from within LyX? This issue is occured when I import a tex file that has \input{ch1.tex} in it. So, maybe LyX has and option to force tex2lyx to read in UTF8 for all imports? THe question is why tex2lyx does not see that your main file contains UTF8. If LaTeX can process it as UTF8, so should tex2lyx. JMarc
Re: How to force tex2lyx to read unicode (from within Lyx)?
On Fri, Nov 02, 2018 at 10:33:53AM +, Baris Erkus wrote: > Hello, > > I am trying to import the a .tex file into LyX (using file->import). > The file has Turkish characters and I believe it is using UTF8 encoding. > When I import it, it does not show Turkish characters properly. I > attached the file for your play-around. > > When I import the file on the command line with the UTF8 option tex2lyx > -e UTF8 ch1.tex, the LyX file looks just fine except one or two characters. > > So is there a way to tell to tex2lyx to use UTF8 encoding from within > LyX? This issue is occured when I import a tex file that has > \input{ch1.tex} in it. So, maybe LyX has and option to force tex2lyx to > read in UTF8 for all imports? > > I found exactly same question on this post, but the answers seem to be > unrelated: > > https://lyx-users.lyx.narkive.com/Rg1StNIT/how-to-force-tex2lyx-to-read-unicode-from-within-lyx > > Thanks > > Baris > I can reproduce the incorrect LaTeX import, and also Vim says the file encoding is "utf-8". I can also reproduce with LyX 2.1.0, so it appears it is not a recent regression. Hopefully someone who knows more will have an idea. Scott signature.asc Description: PGP signature
How to force tex2lyx to read unicode (from within Lyx)?
Hello, I am trying to import the a .tex file into LyX (using file->import). The file has Turkish characters and I believe it is using UTF8 encoding. When I import it, it does not show Turkish characters properly. I attached the file for your play-around. When I import the file on the command line with the UTF8 option tex2lyx -e UTF8 ch1.tex, the LyX file looks just fine except one or two characters. So is there a way to tell to tex2lyx to use UTF8 encoding from within LyX? This issue is occured when I import a tex file that has \input{ch1.tex} in it. So, maybe LyX has and option to force tex2lyx to read in UTF8 for all imports? I found exactly same question on this post, but the answers seem to be unrelated: https://lyx-users.lyx.narkive.com/Rg1StNIT/how-to-force-tex2lyx-to-read-unicode-from-within-lyx Thanks Baris % \chapter{G\.IR\.I\c{S} â BAÅLIKLAR (BÄ°RÄ°NCÄ° DERECE BAÅLIKLAR)}\label{giris} % Birinci dereceden baÅlıklar okuma yönünde, saÄ sayfadan baÅlamalı, büyük ve koyu harflerle yazılmalıdır. (Ãrnek: {\bf 1. GÄ°RÄ°Å}) Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gub rgren, no sea takimata sanctusest Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut lab ore sit et dolore magna. \section{Tezin Amac{\i}(Ä°kinci Derece BaÅlık Nasıl: Ä°lk Harfler Büyük)}\label{tezinamaci} Ä°kinci dereceden baÅlıklar koyu ve baÅlıÄı oluÅturan kelimelerin ilk harfleri büyük yazılır. (Ãrnek: {\bf 2.1 Süreç Yeterlik Analizi}) Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gub rgren, no sea takimata sanctusest Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut lab ore sit et dolore magna. \subsection{Ãçüncü derece baÅlık nasıl: ilk harf büyük diÄerleri küçük}\label{ucderecebaslik} Ãçüncü ve dördüncü dereceden baÅlıklar koyu ve sadece ilk harfi büyük yazılır. (Ãrnek: {\bf 2.1.1 Histogram kullanarak süreç analizi, 3.1.2.2 Süreç analizinin adımları}) Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gub rgren, no sea takimata sanctus est Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut lab ore sit et dolore magna.Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt. \subsection{Tezin ikincil amaçları} Ãçüncü ve dördüncü dereceden baÅlıklar koyu ve sadece ilk harfi büyük yazılır. (Ãrnek: {\bf 2.1.1 Histogram kullanarak süreç analizi, 3.1.2.2 Süreç analizinin adımları}) Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gub rgren, no sea takimata sanctus est. \subsubsection{Dördüncü derece baÅlık nasıl: ilk harf büyük diÄerleri küçük} Ãçüncü ve dördüncü dereceden baÅlıklar koyu ve sadece ilk harfi büyük yazılır. (Ãrnek: {\bf 2.1.1 Histogram kullanarak süreç analizi, 3.1.2.2 Süreç analizinin adımları}) Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut lab ore sit et dolore magna. Stet clita kasd gub rgren, no sea takimata sanctus est Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut lab ore sit et dolore magna. Stet clita kasd gub rgren, no sea takimata sanctus est. \subsubsection{Dördüncü derece baÅlık nasıl: ilk harf büyük diÄerleri küçük} Ãçüncü ve dördüncü dereceden baÅlıklar koyu ve sadece ilk harfi büyük yazılır. (Ãrnek: {\bf 2.1.1 Histogram kullanarak süreç analizi, 3.1.2.2 Süreç analizinin adımları}) {\bf BeÅinci derece baÅlık : dördüncü dereceden sonrası numaralandırılmaz} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut lab ore sit et dolore magna. Stet clita kasd gub rgren, no sea takimata sanctus est Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut lab ore sit et dolore magna. Stet clita kasd gub rgren, no sea takimata sanctus est.Lorem ipsum dolor sit a
Re: tex2LyX
Am Donnerstag, den 07.06.2018, 13:40 +0200 schrieb Kornel Benko: > tex2lyx still (again?) has some quirks. > Importing development/batchtests/ams-import.tex leads to correct > display in lyx, but > the tex-file used to compile with e.g. pdflatex is wrong. > > The original preamble is now repeated twice This is a general limitation. Preamble definitions are only removed if they are in the LyX preamble, i.e. after %% LyX [...] created this file. [...] and before %% User specified LaTeX commands. The same happens with \newcommand and \newenvironment Fixing this would require some effort. Jürgen signature.asc Description: This is a digitally signed message part
Re: tex2LyX
Am Donnerstag, 24. Mai 2018 20:55:12 CEST schrieb Kornel Benko : > > New test: AMS-import. > tex2lyx still (again?) has some quirks. Importing development/batchtests/ams-import.tex leads to correct display in lyx, but the tex-file used to compile with e.g. pdflatex is wrong. The original preamble is now repeated twice > \makeatletter > %% Textclass specific LaTeX commands. > \numberwithin{equation}{section} > \numberwithin{figure}{section} > \theoremstyle{plain} > \newtheorem{thm}{\protect\theoremname} > \theoremstyle{plain} > \newtheorem{cor}[thm]{\protect\corollaryname} > > %% User specified LaTeX commands. > > > \theoremstyle{plain} > \newtheorem{thm}{\protect\theoremname}[section] > %\newtheorem{thm}{\protect\theoremname}% => works > \newtheorem{cor}[thm]{\protect\corollaryname} Kornel signature.asc Description: This is a digitally signed message part.
Re: tex2LyX
Am Donnerstag, 24. Mai 2018 12:18:24 CEST schrieb Jürgen Spitzmüller : > 2018-05-24 12:10 GMT+02:00 Kornel Benko : > > > Why no commit? > > > > I just wanted to hear whether there are objections or comments. This part > of the code is not my homeland. > > > > I could prepare a testcase in development/batchtests. > > > > Something like > > > > buffer-new > > > > buffer-import pdflatex theorem-ams.tex > > > > buffer-export pdf2 > > > > lyx-quit > > > > Yes, that would be helpful. > > Thanks > Jürgen > > > > > > New test: AMS-import. Kornel signature.asc Description: This is a digitally signed message part.
Re: tex2LyX
2018-05-24 12:10 GMT+02:00 Kornel Benko : > Why no commit? > I just wanted to hear whether there are objections or comments. This part of the code is not my homeland. > I could prepare a testcase in development/batchtests. > > Something like > > buffer-new > > buffer-import pdflatex theorem-ams.tex > > buffer-export pdf2 > > lyx-quit > Yes, that would be helpful. Thanks Jürgen > > > Kornel >
Re: tex2LyX
Am Donnerstag, 24. Mai 2018 10:24:34 CEST schrieb Jürgen Spitzmüller : > 2018-05-22 9:12 GMT+02:00 Jürgen Spitzmüller : > > > It's the [section]. See attached file. This looks like a bug. Could you > > file a report, please? > > > > Ticket and patch here: > https://www.lyx.org/trac/ticket/11156 > > Jürgen Why no commit? I could prepare a testcase in development/batchtests. Something like buffer-new buffer-import pdflatex theorem-ams.tex buffer-export pdf2 lyx-quit Kornel signature.asc Description: This is a digitally signed message part.
Re: tex2LyX
2018-05-22 9:12 GMT+02:00 Jürgen Spitzmüller : > It's the [section]. See attached file. This looks like a bug. Could you > file a report, please? > Ticket and patch here: https://www.lyx.org/trac/ticket/11156 Jürgen
Re: tex2LyX
2018-05-22 9:12 GMT+02:00 Jürgen Spitzmüller > It's the [section]. See attached file. This looks like a bug. Could you > file a report, please? > The problem is that checkModule() (in tex2lyx.cpp) does not check for module requirements. It does read the module that provides a specific layout, but not the modules that are required by it. In the given case, this means that no LaTeXName is defined for the theorems. The attached patch is a workaround, but of course this needs to be fixed at the root, in the mentioned method. Any takers? Jürgen diff --git a/lib/layouts/theorems-sec.module b/lib/layouts/theorems-sec.module index f22e8a3de7..37ee512323 100644 --- a/lib/layouts/theorems-sec.module +++ b/lib/layouts/theorems-sec.module @@ -16,6 +16,8 @@ Counter theorem End Style Theorem + LatexType Environment + LatexName thm Preamble \theoremstyle{plain} \newtheorem{thm}{\protect\theoremname}[section]
Re: tex2LyX
On Wed, May 23, 2018 at 02:54:25AM +, Richard Kimberly Heck wrote: > then it is not easy. So, in all honestly, we would not advertise that > LyX allows one to collaborate with someone using raw LaTeX. +1 we would all love for LyX to seamlessly import LaTeX, but it is just way too complicated of an issue. I also recommend that when collaborating, you should use the same set of tools. Although LyX exports LaTeX, it is not a LaTeX editor. As Riki mentioned, there are continued improvements. see the "tex2lyx" section of the following for recent improvements that will be in LyX's 2.3.1 release: https://www.lyx.org/trac/browser/lyxgit/status.23x?rev=2.3.x Best, Scott signature.asc Description: PGP signature
Re: tex2LyX
On 05/22/2018 06:57 PM, Hal Kierstead wrote: > Is there a place were one can read the requirements for a LaTex file > to import correctly? For instance most files I receive from > collaborators do not have the theorem definitions in the right form. Others can perhaps chime in on this, but I think the issue has to do with what theorem environments are defined in the various theorem*.module files. Certainly if your collaborators used the theorem definitions from those files, then all would be well; and it may be that you could define your own module, with whatever definitions your friends use, and that would work. But I don't know. > I think LyX is a great tool, both for learning LaTex and doing serious > writing. However none of my 70 coauthors have used it, and except for my > current students, I know of nobody in my department who uses it. I think the > greatest obstacle to wider use is that Tex2LyX does not work reliably. By the > nature of the task, Tex2LyX is trying to convert files that were not written > for LyX, so requiring special forms of LaTex devalues the program. When I > collaborate I end up using LaTex instead of LyX most of the time or using LyX > to create LaTex segments to cut and paste. One of the first big advantages of > LyX is that you get structure for your document with numbered theorems, etc. > It would be nice for demonstration/advertising purposes if this always worked. Unfortunately, there's no way that tex2lyx can understand arbitrary constructs, so we will always be limited somehow. People using LaTeX will sometimes do things like: \def\begq{\begin{quote}} \def\endq{\end{quote}} We can't possibly figure that out in the tex2lyx code. The truth is that even exporting a LyX file to LaTeX and then re-importing that same file (what we call "roundtrip") won't always give you the same file back again. It's a goal to have this work, but even then it is not easy. So, in all honestly, we would not advertise that LyX allows one to collaborate with someone using raw LaTeX. We even discourage trying to collaborate with someone using a different major version, e.g., 2.2.x vs 2.3.x, largely for the same sort of reason: the need to use ERT to handle new constructs in the lower version. All that said, improving tex2lyx is always a goal, so specific bug reports are always welcome. Riki
Re: tex2LyX
> On May 22, 2018, at 12:12 AM, Jürgen Spitzmüller wrote: > > Am Dienstag, den 22.05.2018, 09:04 +0200 schrieb Jürgen Spitzmüller: >> One problem is that the theorems are named and defined differently to >> those LyX supports ("theorem" and "corollary" vs. "thm" and "cor"), >> and >> see >> >> https://www.lyx.org/trac/ticket/10432 >> >> If I change that, it sill does not import for me, so there must be >> another issue. > > It's the [section]. See attached file. This looks like a bug. Could you > file a report, please? > > Jürgen > >> >> Jürgen >> >>> >>> Riki > Jürgen and Riki - Thanks. I will try to file the bug report. Is there a place were one can read the requirements for a LaTex file to import correctly? For instance most files I receive from collaborators do not have the theorem definitions in the right form. I think LyX is a great tool, both for learning LaTex and doing serious writing. However none of my 70 coauthors have used it, and except for my current students, I know of nobody in my department who uses it. I think the greatest obstacle to wider use is that Tex2LyX does not work reliably. By the nature of the task, Tex2LyX is trying to convert files that were not written for LyX, so requiring special forms of LaTex devalues the program. When I collaborate I end up using LaTex instead of LyX most of the time or using LyX to create LaTex segments to cut and paste. One of the first big advantages of LyX is that you get structure for your document with numbered theorems, etc. It would be nice for demonstration/advertising purposes if this always worked. Hal
Re: tex2LyX
2018-05-22 9:17 GMT+02:00 Jean-Marc Lasgouttes: > > \begin{thm} > > For every $\epsilon>0$, there is a constant $\delta>0$ so that if > > \end{theorem} > Yes, thanks. Fixing that does not help, though. Jürgen
Re: tex2LyX
Le 22/05/2018 à 09:12, Jürgen Spitzmüller a écrit : Am Dienstag, den 22.05.2018, 09:04 +0200 schrieb Jürgen Spitzmüller: One problem is that the theorems are named and defined differently to those LyX supports ("theorem" and "corollary" vs. "thm" and "cor"), and see https://www.lyx.org/trac/ticket/10432 If I change that, it sill does not import for me, so there must be another issue. It's the [section]. See attached file. This looks like a bug. Could you file a report, please? The following does not look good in you example (mismatch in begin/end). Not sure whether this matters. JMarc > \begin{thm} > For every $\epsilon>0$, there is a constant $\delta>0$ so that if > \end{theorem}
Re: tex2LyX
Am Dienstag, den 22.05.2018, 09:04 +0200 schrieb Jürgen Spitzmüller: > One problem is that the theorems are named and defined differently to > those LyX supports ("theorem" and "corollary" vs. "thm" and "cor"), > and > see > > https://www.lyx.org/trac/ticket/10432 > > If I change that, it sill does not import for me, so there must be > another issue. It's the [section]. See attached file. This looks like a bug. Could you file a report, please? Jürgen > > Jürgen > > > > > Riki\documentclass{amsart} \theoremstyle{plain} \newtheorem{thm}{\protect\theoremname}[section] %\newtheorem{thm}{\protect\theoremname}% => works \newtheorem{cor}[thm]{\protect\corollaryname} % - \begin{document} \section{Introduction}\label{sec:introduction} We assume \begin{thm} For every $\epsilon>0$, there is a constant $\delta>0$ so that if \end{theorem} \begin{cor} For every $\epsilon>0$, there is a constant $\delta>0$ so that if \end{cor} \begin{thm} There exists a positive constant $C_2$ so that \end{thm} \end{document} signature.asc Description: This is a digitally signed message part
Re: tex2LyX
Am Montag, den 21.05.2018, 11:24 -0400 schrieb Richard Kimberly Heck: > On 05/19/2018 06:55 PM, Hal Kierstead wrote: > > All - > > > > I am using LyX 2.3.0 on macOS 10.13.4. When I try to import a tex > > file I get ert for every theorem type statement. Is there away to > > avoid this? > > Someone else should be able to answer this better, but I believe this > is > supposed to work. One problem is that the theorems are named and defined differently to those LyX supports ("theorem" and "corollary" vs. "thm" and "cor"), and see https://www.lyx.org/trac/ticket/10432 If I change that, it sill does not import for me, so there must be another issue. Jürgen > > Riki > signature.asc Description: This is a digitally signed message part
Re: tex2LyX
On 05/19/2018 06:55 PM, Hal Kierstead wrote: > All - > > I am using LyX 2.3.0 on macOS 10.13.4. When I try to import a tex file I get > ert for every theorem type statement. Is there away to avoid this? Someone else should be able to answer this better, but I believe this is supposed to work. Riki
tex2LyX
All - I am using LyX 2.3.0 on macOS 10.13.4. When I try to import a tex file I get ert for every theorem type statement. Is there away to avoid this? I know I can go through by hand and correct each occurrence, but it would be much better if the converter handled it. At least it compiles. Here is a small example of a tex file and the imported LyX file. Thanks, Hal Test.tex Description: TeX document Test.lyx Description: Binary data
Re: tex2lyx
On 2017-09-25, Paul A. Rubin wrote: > On 09/25/2017 10:35 AM, Patrick Dupre wrote: >> No, It do not have the layout! > Well, there's your problem. No layout, no using the class with LyX. If > you can find an osajnl.layout file somewhere online, deposit it in your > local layouts folder, reconfigure and restart LyX, and you should be > able to continue. If not, I suspect you will need to cobble one > together. Typically, one starts with a layout file for a similar class > and modifies it as needed to handle specific features of the new class. The the documentation in Help>Customization, chapter 5 Installing New Document Classes, Layouts, and Templates Günter
Re: tex2lyx
On 09/25/2017 10:35 AM, Patrick Dupre wrote: No, It do not have the layout! Well, there's your problem. No layout, no using the class with LyX. If you can find an osajnl.layout file somewhere online, deposit it in your local layouts folder, reconfigure and restart LyX, and you should be able to continue. If not, I suspect you will need to cobble one together. Typically, one starts with a layout file for a similar class and modifies it as needed to handle specific features of the new class. Paul
Re: tex2lyx
No, It do not have the layout! === Patrick DUPRÉ | | email: pdu...@gmx.com Laboratoire de Physico-Chimie de l'Atmosphère | | Université du Littoral-Côte d'Opale | | Tel. (33)-(0)3 28 23 76 12 | | Fax: 03 28 65 82 44 189A, avenue Maurice Schumann | | 59140 Dunkerque, France === > Sent: Monday, September 25, 2017 at 4:33 PM > From: "Paul A. Rubin" > To: "Patrick Dupre" , lyx > Subject: Re: tex2lyx > > On 09/25/2017 10:22 AM, Patrick Dupre wrote: > > Hello, > > > > Apparently this tex template is acceptable for the OSA. > > However, it fails when I try to convert it to lyx. > > Cannot read layout file `'. > > Error reading `' > > (Check `osajnl') > > Check your installation and try Options/Reconfigure... > > Error: Could not read layout file for textclass "osajnl". > > > > > > \documentclass[9pt,twocolumn,twoside]{osajnl} > > > > \begin{document} > > \end{document} > > > > > > Is it possible to avoid the failure? > > > Do you have a LyX layout file for the osajnl class? Without it, LyX does > not know how to lay out documents using that class. I did a quick Google > search but could not find one. > > Paul > >
Re: tex2lyx
On 09/25/2017 10:22 AM, Patrick Dupre wrote: Hello, Apparently this tex template is acceptable for the OSA. However, it fails when I try to convert it to lyx. Cannot read layout file `'. Error reading `' (Check `osajnl') Check your installation and try Options/Reconfigure... Error: Could not read layout file for textclass "osajnl". \documentclass[9pt,twocolumn,twoside]{osajnl} \begin{document} \end{document} Is it possible to avoid the failure? Do you have a LyX layout file for the osajnl class? Without it, LyX does not know how to lay out documents using that class. I did a quick Google search but could not find one. Paul
tex2lyx
Hello, Apparently this tex template is acceptable for the OSA. However, it fails when I try to convert it to lyx. Cannot read layout file `'. Error reading `' (Check `osajnl') Check your installation and try Options/Reconfigure... Error: Could not read layout file for textclass "osajnl". \documentclass[9pt,twocolumn,twoside]{osajnl} \begin{document} \end{document} Is it possible to avoid the failure? Thank. === Patrick DUPRÉ | | email: pdu...@gmx.com Laboratoire de Physico-Chimie de l'Atmosphère | | Université du Littoral-Côte d'Opale | | Tel. (33)-(0)3 28 23 76 12 | | Fax: 03 28 65 82 44 189A, avenue Maurice Schumann | | 59140 Dunkerque, France ===
Re: tex2lyx error
On 11/17/2016 05:36 PM, Jay A. Leavitt, PhD wrote: > Running Win 10, LyX 2.2.2 > template.tex is a template for Springer publications. Latex files with > Springer macros cannot import into LyX. > LyX: Cannot convert file. An error occurred while running: > tex2lyx -fixedenc utf8 -f "template.tex" "template.lyx" I would guess that the problem is that the file uses a document class for which there is no layout file. What document class does it use? Richard
tex2lyx error
Running Win 10, LyX 2.2.2 template.tex is a template for Springer publications. Latex files with Springer macros cannot import into LyX. LyX: Cannot convert file. An error occurred while running: tex2lyx -fixedenc utf8 -f "template.tex" "template.lyx" --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Re: tex2lyx
On 09/05/2014 03:18 AM, Mark A Pinsky wrote: I'm running Lyx 2.1 and trying to convert tex-file to lyx-file. Follow the standard pass: file> import>Latex(plain); however am getting an error message: An error occurred while running tex2lyx-f"root1.tex""root1.lyx" What should I do? If you can run LyX from a terminal, you will likely get more error messages. Alternatively, send the file to me, and I'll try it. Richard
tex2lyx
I'm running Lyx 2.1 and trying to convert tex-file to lyx-file. Follow the standard pass: file> import>Latex(plain); however am getting an error message: An error occurred while running tex2lyx-f"root1.tex""root1.lyx" What should I do? Thanks, Mark
Re: tex2lyx -f error
On 04/01/2014 10:42 PM, Okhaide Akhigbe wrote: I am trying to import the springer "BioMed Central's TeX template" (http://www.springeropen.com/authors/tex), for use in a journal. When I import I get this error The following is my configurations: Windows 8 64bit LyX 2.0.7 MikeTex 2.9 I think you get this error if you do not have a layout file for whatever class the template uses. In this case, the class is bmcart.layout, and unless you wrote a layout file yourself, you do not have one. Please see Chapter 5 of the Customization manual for information on what layout files are and so forth, if that did not make sense to you. Since bmcart is just a variant of article, you should at least be able to get basic functionality by (i) copying the article.layout file into your LyX user directory; (ii) renaming it as bmcart.layout; (iii) changing the first line to read: \DeclareLaTeXClass{Article (BMC)} (iv) reconfiguring LyX and then attempting to re-import. Probably a lot of the template will import as ERT, since this layout file says nothing about whatever is different about bmcart. Richard
tex2lyx -f error
I am trying to import the springer "BioMed Central's TeX template" ( http://www.springeropen.com/authors/tex), for use in a journal. When I import I get this error [image: Inline image 1] The following is my configurations: Windows 8 64bit LyX 2.0.7 MikeTex 2.9 <>
Re: Issues with Tex2Lyx
Am Samstag 01 März 2014, 21:59:45 schrieb Gavrielle Untracht: > I am a student hoping to use LyX to format my thesis. My university > provides a template .tex file which I am not required to use, but would > save me some time. When I try to import the file into LyX, I recieve the > error "An error occured while running: tex2lyx..." First question is: What LaTeX class is this, and is there an equivalent LyX layout file? See http://wiki.lyx.org/FAQ/SurprisesForNewUsers#new-class HTH Jürgen
Issues with Tex2Lyx
Hello, I am a student hoping to use LyX to format my thesis. My university provides a template .tex file which I am not required to use, but would save me some time. When I try to import the file into LyX, I recieve the error "An error occured while running: tex2lyx..." Based upon my internet research, it seems like a likely cause is some incompatibility in the TeX code which is not easily translatable into Lyx. I was wondering if you could help me identify some likely culprits so that I could edit the TeX file to something that LyX could import. Is this straight forward to do, or do you think it would be more time efficient to recreate the template in LyX? If I create a LyX template, can I donate it to the grad school for other students to use? Is it possible that I'm having an issue because my template uses BibTex? Thanks in advance, Gavrielle -- Gavrielle Untracht g...@cornell.edu c:(201) 618-1081 Cornell University Graduate School Applied Physics 2014
Re: SV: enhancment request for tex2lyx
Le 26/01/14 21:07, Ingar Pareliussen a écrit : I thought that tex2lyx translated these macros away from macros to char-encodings, and thus is should be, in these cases, safe to remove the braces as part of the conversion. You are right of course, I was trying this argument in order to avoid ugly hardcoding :) However, one could argue that the writer2latex is doing it wrong as you probably should write \ae{} instead of {\ae}. (tex2lyx does remove the {} after \ae{}, but I see how that is more safe to remove) Ah, so writer2latex is the culprit, I understand now. Please open a new ticket with this information. Sadly this is not only a problem in the bibliography as we use these characters a lot. :) Well, actually we do too. JMarc
SV: enhancment request for tex2lyx
>I am not sure how to do this reliably. I do not see why one could use >the markup you describe, except maybe in bibliography. The problem is >that it is never possible to assume safely that a macro does not change >its environment (think {\bf}). Hm: I'm probably missing something here. :) I thought that tex2lyx translated these macros away from macros to char-encodings, and thus is should be, in these cases, safe to remove the braces as part of the conversion. However, one could argue that the writer2latex is doing it wrong as you probably should write \ae{} instead of {\ae}. (tex2lyx does remove the {} after \ae{}, but I see how that is more safe to remove) Sadly this is not only a problem in the bibliography as we use these characters a lot. :) Ingar Dewey, J. (2001), Erfaring og tenking. (f{\o}rst utgitt 1916). I Dale E. L.: \emph{Om utdanning. Klassiske tekster.} Oslo: Gyldendal Norsk Forlag. Fuglestad, O. L. \& Wadel, C. C. (2011), Feltarbeid som prosess. Ny metodedel. I Wadel, C., Fuglestad, O. L. \& Wadel, C. C.: \emph{{\textquotedblright}Og kven si skuld er det?{\textquotedblright}} (s. 175-268). Gimlemoen: H{\o}yskoleforlaget. Furu, E. M. (2007), \emph{Rak l{\ae}rerygg: aksjonsl{\ae}ring i skolen}. Dr. grad avhandling, Universitetet i Troms{\o}. Halvorsen, A. (2009), Praktikerforskning -- legitimt og nyttig bidrag i kunnskapsutvikling. I Johnsen H. C. G, Halvorsen, A og Repstad, P (red.): \emph{{\AA} forske blant sine egne}. Kristiansand: H{\o}yskoleforlaget. Jarvis, P. (2002), \emph{Praktiker-forskere: utvikling af teori fra praksis}. K{\o}benhavn: Alinea. \ae{} \o{} \aa{} \AE{} \O{} \AA{} {\ae} {\o} {\aa} {\AE} {\O} {\AA}
Re: enhancment request for tex2lyx
Le 26/01/14 19:09, Ingar Pareliussen a écrit : When importing Norwegian texts latex encoded special character get translated.{\aa} -> {å} and [\o} -> {ø} etc. However, the { and } are imported as ERT and makes the text very hard to read. Could tex2lyx removed the extra {} when importing? I am not sure how to do this reliably. I do not see why one could use the markup you describe, except maybe in bibliography. The problem is that it is never possible to assume safely that a macro does not change its environment (think {\bf}). So, what is the rule you would propose? JMarc
enhancment request for tex2lyx
When importing norwegian texts latex encoded special charcter get translated.{\aa} -> {å} and [\o} -> {ø} etc. However, the { and } are imported as ERT and makes the text very hard to read. Could tex2lyx removed the extra {} when importing? Ingar
tex2lyx fails with ACM Transacton on Graphics sample
Hi, I tried to convert TOG sample (available at http://tog.acm.org/acm-tog.zip) to LYX, but it fails with error message > Cannot read layout file `'. > Error reading `' > (Check `acmtog') > Check your installation and try Options/Reconfigure... > Error: Could not read layout file for textclass "acmtog". > It seems that tex2lyx expects a layout file to be present, but TOG class do not define one. Any advices for fixing this problem? Matti L -- Life is complex. It has real and imaginary parts.
Re: Tex2Lyx
All, Thanks, I will try ubuntu version then. Greeting, Hayu
Re: Tex2Lyx
On Mon, 15 Jul 2013 11:23:33 + (UTC) Hayuning wrote: > Hello, > > In the announcement of the latest version, Lyx 2.0.6, it is said that > they add new option -m to select needed modules (bug 8393). > > We know that one of the Lyx issues is that if we import Tex file to > Lyx, it does not recognize the theorem module, instead it will appear > as ERT. That's a *horrible* design decision. I'd much prefer it import a begin and end string so you could hand-search instances, and manually apply the theorum module. Or at least have an option to do that. Once you lose a style, you can never get it back. SteveT Steve Litt* http://www.troubleshooters.com/ Troubleshooting Training * Human Performance
Re: Tex2Lyx
On Mon, Jul 15, 2013 at 7:23 AM, Hayuning wrote: > Hello, > > In the announcement of the latest version, Lyx 2.0.6, it is said that they add > new option -m to select needed modules (bug 8393). > > We know that one of the Lyx issues is that if we import Tex file to Lyx, it > does not recognize the theorem module, instead it will appear as ERT. > > With that new option in Lyx 2.0.6, does it mean the above issue is resolved? > If yes, can anybody tell me how to do that? > > I tried to import tex file, but the theorem still appeared in ERT form. > > Thank you. Hi Hayu, Importing the theorem environment should be fixed in LyX 2.1, which should hopefully be out soon: http://www.lyx.org/trac/ticket/8552 Do you happen to use Ubuntu? If so, it's very easy to use the development version without having to give up your current version. They can be both installed with no risk. To do this, see the instructions here: http://wiki.lyx.org/LyX/LyXOnUbuntu#toc3 Best, Scott
Tex2Lyx
Hello, In the announcement of the latest version, Lyx 2.0.6, it is said that they add new option -m to select needed modules (bug 8393). We know that one of the Lyx issues is that if we import Tex file to Lyx, it does not recognize the theorem module, instead it will appear as ERT. With that new option in Lyx 2.0.6, does it mean the above issue is resolved? If yes, can anybody tell me how to do that? I tried to import tex file, but the theorem still appeared in ERT form. Thank you. Hayu
Re: tex2lyx fails and does not say why
On 05/03/2012 12:12 PM, Barger, Carla wrote: Hi, Lyx 2.0.3 MS Windows 7 (Ultimate) I'm trying to import into lyx from tex. The dialog box says that the tex2lyx command failed but did not say anything further. As it happens, it failed because python was not installed. It would be nice if the dialog box had further information. Carla Barger Faculty Assistant, Faculty Services Chicago Booth 5807 South Woodlawn Avenue Suite 422 Chicago, IL 60637 Voice 773.702.0415 | Email carla.bar...@chicagobooth.edu<mailto:carla.bar...@chicagobooth.edu> Visit us at www.ChicagoBooth.edu<http://www.chicagobooth.edu/> Hi, You can get further information from the "Progress/Debug Messages" panel that you can open using the menu View > View Messages. It is rather strange that the LyX installer for windows would not install python, so if you could provide more information here, we could perhaps fix a problem in the installer. Which installer did you use? Regards, Julien
Re: tex2lyx fails when run from Import menu
On 03/05/2012 12:23 PM, Barger, Carla wrote: What can be done so that tex import works from the file menu? Since you installed python after you installed LyX, you should reconfigure LyX (from the Tools menu). -- David L. Johnson Arguing with an engineer is like mud wrestling with a pig... You soon find out the pig likes it!
Re: How to force tex2lyx to read unicode (from within Lyx)?
On 2012-02-19, Georg Baum wrote: > Guenter Milde wrote: >> On 2012-02-15, Georg Baum wrote: >>> Jean-Marc Lasgouttes wrote: >>> Unfortunately I know next to nothing about use_non_tex_fonts. After >>> reading the code and user guide a bit I see that using xetex is only >>> possible if use_non_tex_fonts is true, so your patch looks fine. >> It is the other way round: using xetex or luatex is also possible without >> use_non_tex_fonts (which actually means use_fontspec). OTOH, with >> use_non_tex_fonts True, it one of xetex or luatex must be used. > For luatex I agree, but for xetex I don't believe that you are right. Do you > have an example .lyx file, where use_non_tex_fonts is false, but xetex is > still used? If you are right, the patch introduces a regression. Just take a "normal" file (with use_non_tex_fonts False) and select one of File>Export>LaTeX (XeTex) File>Export>PDF (XeTeX) View>Other Formats>PDF (XeTeX) The exported LaTeX with my somewhat outdated LyX-svn is %% LyX 2.1.0svn 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[T1]{fontenc} \usepackage{babel} \usepackage{xunicode} \begin{document} Test \end{document} and compiles fine with XeTeX. Günter
Re: Mac-specific: tex2lyx won't run
On Feb 19, 2012, at 1:36 PM, stefano franchi wrote: > I am forwarding to the users' list. This problem starts to exceed my > lyx/Latex skills. What I can say is this: > > If I: > > 1. Import your file with the modified latex converter > > 2. Change fonts to non-latex > > 3. Select full-coverage unicode fonts like TeX Gyre Termes/Heros > > 4. Compile with xelatex > > Everything goes well. > > HOWEVER, the order of the 1-4 operations is crucial on my setup. If, > for instance, I import and then try to compile first (step 4), I get > the error you mention. After that, there is no way to get the file to > compile even after switching to non-latex fonts and selecting > appropriate fonts. I have to close the file and reimport it. > So: > > 1-2-3-4 works > 1-4-2-3-4 fails permanently > 1-2-4-3-4 fails permanently as well > > Closing the file after failure and trying again with the correct > sequence works. This may a lyx bug, I suspect. > > More skillful people may provide a deeper answer. Thanks for the problem-solving help again, Stefano. This worked. I had to guess in selecting fonts, as I have no idea what #3 amounts to. When I selected Palatino for serif, it went through. Thanks so much. I would appreciate help from anyone in identifying the offending character[s] so I don't have to jump through all these hoops every time I export from Scrivener/import to Lyx/compile. I don't know if Scrivener is source of the problem, if it's something I'm doing in the way I format in Scrivener--in one section of the paper I inserted a long-ish line centered on the page to mark a break between subsections of a section that I did not want to mark with subheadings--or if it's a problem with LyX. For now I'm grateful that Stefano has rescued me once again. Sincerely, -- Eric Weir Decatur, GA eew...@bellsouth.net "What does it mean...that the world is so beautiful?" - Mary Oliver
Re: Mac-specific: tex2lyx won't run
On Sun, Feb 19, 2012 at 11:00 AM, Eric Weir wrote: > > On Feb 19, 2012, at 9:54 AM, stefano franchi wrote: > > On Sun, Feb 19, 2012 at 5:13 AM, Eric Weir wrote: > > > On Feb 18, 2012, at 8:16 AM, Eric Weir wrote: > > > After both types of imports I get the following message: "Could not find > > LaTeX command for character''(code point 0x2028) > > Some characters of your document are probably not representable in the > > chosen encoding. Changing the document encoding to utf8 could help." > > > I've verified that Scrivener uses Unicode UTF8. > > > Perhaps you or someone one the list will know what the offending character > > is? > > > > Googling "codepoint 0x2028" I immediately located a previous post here by > > Jürgen responding to another user's query in which he said it was a line > > separater, and suggested doing a view > view source, locating the offending > > character, which would appear in red. > > > I did that. There was only one instance in the source. But when I tried > > compiling after doing so I got the same error. This time I clicked on the > > "view complete log" button in the error window. I found six instances of the > > following error report: > > > aa! LaTeX Error: Command \textquotedbl unavailable in encoding OT1., See the > > LaTeX manual or LaTeX Companion for explanation., Type H for > > immediate help., ... , > > , l.380 Evident in \textquotedbl, > > {}Avoidable Losses\textquotedbl{}' alternative > > > I am not really sure why you are getting this message---in particular > I'm baffled by the OT1 reference. This is the old latex (tex) font > encoding. It contains only the basic ASCII characters. Did this > error(s) occur after you tried to compile correctly imported > Scivener-Latex file? And if so, are you compiling with XeTex or Luatex > or pdflatex? > > > I've started over a couple times--fresh export from Scrivener, compile using > latex (plain) modified with the 1e UTF8 coding. > > I've searched for the instances of the odd character combinations that in > Scrivener I thought were single/double quote combinations but that view as > source look more like a double quote/backtic combination, with the backtic > sometimes inside and sometimes outside the double quote. As near as I could > tell from the error messages, these were the offending characters. But after > deleting them and inserting proper single/double quote combinations and > compiling I got the same messages. > > One other thing. Jürgen said to view the source, look for the offending > characters, and delete them. When I view the source I see on red error > indication, not six, and the error is unrelated to the errors that are > listed in the compile error window when I view the complete log, i.e., the > one quoted above. It looks like this: > > > \footnote{McNeil, Coppola, Radigan, \& Vasquez Heilig, 2008, 12--14.% > } The apparent impact of the accountability system came to be widely > discussed as ``the Texas miracle.'' As such it served as the model > for other states and eventually the federal No Child Left Behind act. > '> > > > In case might be of help I'm attaching the complete compile error log from a > XeTeX compile I tried and got the same error I get with LaTeX compiles. Also > the Latex document as exported from Scrivener. > > Thanks for your help. I imagine you have more interesting or important > things to be doing than this. > Eric, I am forwarding to the users' list. This problem starts to exceed my lyx/Latex skills. What I can say is this: If I: 1. Import your file with the modified latex converter 2. Change fonts to non-latex 3. Select full-coverage unicode fonts like TeX Gyre Termes/Heros 4. Compile with xelatex Everything goes well. HOWEVER, the order of the 1-4 operations is crucial on my setup. If, for instance, I import and then try to compile first (step 4), I get the error you mention. After that, there is no way to get the file to compile even after switching to non-latex fonts and selecting appropriate fonts. I have to close the file and reimport it. So: 1-2-3-4 works 1-4-2-3-4 fails permanently 1-2-4-3-4 fails permanently as well Closing the file after failure and trying again with the correct sequence works. This may a lyx bug, I suspect. More skillful people may provide a deeper answer. Cheers, Stefano -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas A&M University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: How to force tex2lyx to read unicode (from within Lyx)?
Guenter Milde wrote: > On 2012-02-15, Georg Baum wrote: >> Jean-Marc Lasgouttes wrote: > >>> Georg, Juergen, I'd like some feedback on the soundness of the patch. I >>> know next to nil about xetex, and I do not know what is the current >>> state of the art wrt tex2lyx. > >> Unfortunately I know next to nothing about use_non_tex_fonts. After >> reading the code and user guide a bit I see that using xetex is only >> possible if use_non_tex_fonts is true, so your patch looks fine. > > It is the other way round: using xetex or luatex is also possible without > use_non_tex_fonts (which actually means use_fontspec). OTOH, with > use_non_tex_fonts True, it one of xetex or luatex must be used. For luatex I agree, but for xetex I don't believe that you are right. Do you have an example .lyx file, where use_non_tex_fonts is false, but xetex is still used? If you are right, the patch introduces a regression. Georg
Re: Mac-specific: tex2lyx won't run
On Feb 18, 2012, at 8:16 AM, Eric Weir wrote: > After both types of imports I get the following message: "Could not find > LaTeX command for character''(code point 0x2028) > Some characters of your document are probably not representable in the chosen > encoding. Changing the document encoding to utf8 could help." > > I've verified that Scrivener uses Unicode UTF8. > > Perhaps you or someone one the list will know what the offending character is? Googling "codepoint 0x2028" I immediately located a previous post here by Jürgen responding to another user's query in which he said it was a line separater, and suggested doing a view > view source, locating the offending character, which would appear in red. I did that. There was only one instance in the source. But when I tried compiling after doing so I got the same error. This time I clicked on the "view complete log" button in the error window. I found six instances of the following error report: aa! LaTeX Error: Command \textquotedbl unavailable in encoding OT1., See the LaTeX manual or LaTeX Companion for explanation., Type H for immediate help., ... , , l.380 Evident in \textquotedbl, {}Avoidable Losses\textquotedbl{}' alternative It looked to me like these were situations in which I used an apostrophe in combination with a double quote. I searched for that combination and found that some occurrences were different than others. I don't know how to describe the difference except to say some did not look like a standard single/double quote combination. More like a doublequote/right-leaning backtic combination. I lost count, but I think there were six of them. I deleted them and replaced them with a doublequote/singlequote combination. Tried compiling again and got the same errors. I am at a loss. Help would be appreciated. Thanks, -- Eric Weir Decatur, GA eew...@bellsouth.net "We do not inherit the earth from our ancestors, we borrow it from our children." - Chief Seattle.
Re: Mac-specific: tex2lyx won't run
On Feb 17, 2012, at 9:36 AM, Eric Weir wrote: > On Feb 16, 2012, at 7:47 PM, stefano franchi wrote: > >> try this workaround to the workaround. Instead of creating a new >> converter, simply go to the existing LAtex(plain-->lyx converter, look >> at the command string (the tex2lyx etc.) and stick a "-e UTF8" before >> the -f switch. Then click "modify" and then click "apply". > > > It worked! Thanks! Well, yesterday it worked. This morning it's not. I've tried it a couple times. I've verified that the latex(plain) converter has "-e UTF8" in it. [This is the exact code in the converter: $$s/../MacOS/tex2lyx -e UTF8 -f $$i $$o] I've tried it in the terminal, too. This was the command: /Applications/LyX.app/Contents/MacOS/tex2lyx -e UTF8 ~/documents/a/evaluation/avoidable-losses/version-viii/lyxified/revision-of-evaluation-of-the-qualitative-analysis.tex Same result. After both types of imports I get the following message: "Could not find LaTeX command for character''(code point 0x2028) Some characters of your document are probably not representable in the chosen encoding. Changing the document encoding to utf8 could help." I've verified that Scrivener uses Unicode UTF8. Perhaps you or someone one the list will know what the offending character is? Thanks, -- Eric Weir Decatur, GA eew...@bellsouth.net "What is man without the beasts? If all the beasts were gone, men would die from a great loneliness of spirit." - Chief Seattle
Re: Mac-specific: tex2lyx won't run
On Feb 16, 2012, at 10:45 AM, stefano franchi wrote: > On Thu, Feb 16, 2012 at 9:40 AM, Eric Weir wrote: >> >> On Feb 16, 2012, at 9:37 AM, stefano franchi wrote: >> >>> On Thu, Feb 16, 2012 at 6:35 AM, Eric Weir wrote: >>> Thanks, Stefano. Don't see how to do that, either. Scrivener does not appear on the dropdown list. Perhaps there is something on the list that would stand in for the Scrivener output? E.g., it probably wouldn't do the job, but "plain text"? >>> >>> Scrivener does not appear because you haven't created it yet. >>> >>> 1. Go to: Tools>>Preferences>>FileHandling>>File Format >>> >>> 2. Click "New" >>> >>> 3. Type "Scrivener' (or whatever) in the filed labeled "Format" >>> >>> 4. Click "Apply" >> >> Thanks, Stefano. I was overlooking the file format window. Had some >> difficulty getting them to save. When I finally did and tried importing a >> latex document the weird characters were there again. I tried this several >> times, making sure that the converter was properly set up and selected, and >> starting fresh with a new compile/export from Scrivener and continued to get >> the weird characters. >> >> Finally resorted to executing the command in the terminal. > > That would work as well---just less conveniently so. Be sure you have > the -e UTF8 switch in the converter line (as per my previous post) I copied the text from your message. Since it's not in the command you gave me to use in the terminal, I'm wondering about this part of what you said I should put in the converter field: -f $$i $$o I assume it's not the source of the problem I'm having at the moment. Thanks, -- Eric Weir Decatur, GA eew...@bellsouth.net "A man should be in the world as though he were not in it so that it will be no worse because of his life." - Wendell Berry
Re: Mac-specific: tex2lyx won't run
On Thu, Feb 16, 2012 at 9:40 AM, Eric Weir wrote: > > On Feb 16, 2012, at 9:37 AM, stefano franchi wrote: > >> On Thu, Feb 16, 2012 at 6:35 AM, Eric Weir wrote: >> >>> Thanks, Stefano. Don't see how to do that, either. Scrivener does not >>> appear on the dropdown list. Perhaps there is something on the list that >>> would stand in for the Scrivener output? E.g., it probably wouldn't do the >>> job, but "plain text"? >> >> Scrivener does not appear because you haven't created it yet. >> >> 1. Go to: Tools>>Preferences>>FileHandling>>File Format >> >> 2. Click "New" >> >> 3. Type "Scrivener' (or whatever) in the filed labeled "Format" >> >> 4. Click "Apply" > > Thanks, Stefano. I was overlooking the file format window. Had some > difficulty getting them to save. When I finally did and tried importing a > latex document the weird characters were there again. I tried this several > times, making sure that the converter was properly set up and selected, and > starting fresh with a new compile/export from Scrivener and continued to get > the weird characters. > > Finally resorted to executing the command in the terminal. That would work as well---just less conveniently so. Be sure you have the -e UTF8 switch in the converter line (as per my previous post) Cheers, S. > > -- > Eric Weir > Decatur, GA USA > eew...@bellsouth.net > > "Hatred destroys. Love heals." > > - Eknath Easwaran > -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas A&M University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Mac-specific: tex2lyx won't run
On Feb 16, 2012, at 9:37 AM, stefano franchi wrote: > On Thu, Feb 16, 2012 at 6:35 AM, Eric Weir wrote: > >> Thanks, Stefano. Don't see how to do that, either. Scrivener does not appear >> on the dropdown list. Perhaps there is something on the list that would >> stand in for the Scrivener output? E.g., it probably wouldn't do the job, >> but "plain text"? > > Scrivener does not appear because you haven't created it yet. > > 1. Go to: Tools>>Preferences>>FileHandling>>File Format > > 2. Click "New" > > 3. Type "Scrivener' (or whatever) in the filed labeled "Format" > > 4. Click "Apply" Thanks, Stefano. I was overlooking the file format window. Had some difficulty getting them to save. When I finally did and tried importing a latex document the weird characters were there again. I tried this several times, making sure that the converter was properly set up and selected, and starting fresh with a new compile/export from Scrivener and continued to get the weird characters. Finally resorted to executing the command in the terminal. -- Eric Weir Decatur, GA USA eew...@bellsouth.net "Hatred destroys. Love heals." - Eknath Easwaran
Re: Mac-specific: tex2lyx won't run
On Thu, Feb 16, 2012 at 6:35 AM, Eric Weir wrote: > > On Feb 15, 2012, at 1:57 PM, stefano franchi wrote: > >>> On Feb 15, 2012, at 10:55 AM, stefano franchi wrote: >>> >>>> 3. In Tools>>Preferences>>FIle Converters, create a new converter from >>>> Scrivener to Lyx: select "Scrivener" in the From dropdown list, and >>>> "Lyx" in the "to list. Enter the call to tex2lyx with the UTF8 switch >>>> in the "Converter field": >>>> tex2lyx -e UTF8 -f $$i $$o >> >> >> >> And, you need to create the new format before you can create the converter. > > Thanks, Stefano. Don't see how to do that, either. Scrivener does not appear > on the dropdown list. Perhaps there is something on the list that would stand > in for the Scrivener output? E.g., it probably wouldn't do the job, but > "plain text"? Scrivener does not appear because you haven't created it yet. 1. Go to: Tools>>Preferences>>FileHandling>>File Format 2. Click "New" 3. Type "Scrivener' (or whatever) in the filed labeled "Format" 4. Click "Apply" Then you can add the converter Cheers, S. > > Sincerely, > -- > Eric Weir > Decatur, GA > eew...@bellsouth.net > > "We do not inherit the earth from our ancestors, > we borrow it from our children." > > - Chief Seattle. > -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas A&M University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: How to force tex2lyx to read unicode (from within Lyx)?
Eric Weir wrote: > > (IMV, the name for this setting should also be changed: > > - use_non_tex_fonts > > + use_fontspec > > > > this would prevent much confusion.) > > While I now know what it refers to, as a new user I would otherwise have > found the new description mystifying. I would seem that it's possible to be > clear both to advanced users/developers and new users. This is an internal value only. But I also think we should keep it as it is, i.e. abstract and not bound to some specific package which may change in the future. Jürgen
Re: Mac-specific: tex2lyx won't run
On Feb 15, 2012, at 1:57 PM, stefano franchi wrote: >> On Feb 15, 2012, at 10:55 AM, stefano franchi wrote: >> >>> 3. In Tools>>Preferences>>FIle Converters, create a new converter from >>> Scrivener to Lyx: select "Scrivener" in the From dropdown list, and >>> "Lyx" in the "to list. Enter the call to tex2lyx with the UTF8 switch >>> in the "Converter field": >>> tex2lyx -e UTF8 -f $$i $$o > > > > And, you need to create the new format before you can create the converter. Thanks, Stefano. Don't see how to do that, either. Scrivener does not appear on the dropdown list. Perhaps there is something on the list that would stand in for the Scrivener output? E.g., it probably wouldn't do the job, but "plain text"? Sincerely, -- Eric Weir Decatur, GA eew...@bellsouth.net "We do not inherit the earth from our ancestors, we borrow it from our children." - Chief Seattle.
Re: How to force tex2lyx to read unicode (from within Lyx)?
On Feb 16, 2012, at 4:35 AM, Guenter Milde wrote: > (IMV, the name for this setting should also be changed: > - use_non_tex_fonts > + use_fontspec > this would prevent much confusion.) While I now know what it refers to, as a new user I would otherwise have found the new description mystifying. I would seem that it's possible to be clear both to advanced users/developers and new users. Regards, -- Eric Weir Decatur, GA eew...@bellsouth.net "Style is truth." - Ray Bradbury
Re: How to force tex2lyx to read unicode (from within Lyx)?
On 2012-02-15, Georg Baum wrote: > Jean-Marc Lasgouttes wrote: >> Georg, Juergen, I'd like some feedback on the soundness of the patch. I >> know next to nil about xetex, and I do not know what is the current >> state of the art wrt tex2lyx. > Unfortunately I know next to nothing about use_non_tex_fonts. After reading > the code and user guide a bit I see that using xetex is only possible if > use_non_tex_fonts is true, so your patch looks fine. It is the other way round: using xetex or luatex is also possible without use_non_tex_fonts (which actually means use_fontspec). OTOH, with use_non_tex_fonts True, it one of xetex or luatex must be used. Günter
Re: How to force tex2lyx to read unicode (from within Lyx)?
On 2012-02-15, Georg Baum wrote: > Jürgen Spitzmüller wrote: >> If other encodings are used, LuaTeX uses the "luainputenc" package, which >> has the same syntax than inputenc, i.e. >> \usepackage[]{luainputenc} >> Maybe we have to care about that. > luainputenc is already handled. Fine. > What is missing for luatex is to set > use_non_tex_fonts to true and the encoding to utf8 if luainputenc is not > used. Unfortunately this is not so easy as with xetex. "use_non_tex_fonts" is actually a toggle to use the "fontspec" package (coupled with the use of polyglossia if the language-package setting is set to auto, if I remember right). The "fontspec" package can be used with the XeTeX and LuaTeX engines but not with TeX and eTeX. This means that tex2lyx should look for \usepackage{fontspec} and set "use_non_tex_fonts" accordingly. (IMV, the name for this setting should also be changed: - use_non_tex_fonts + use_fontspec this would prevent much confusion.) The default encoding (if neither "inputenc" nor "luainputenc" is found) may be chosen according to use_non_tex_fonts: True XeTeX or LuaTeX engines must be used to compile --> assume their default encoding (utf8) as file encoding. False any tex engine can be used to compile --> assume either the 8-bit tex default (ASCII) or utf8 as file encoding. Actually, utf8 should be a safe bet in any case when no "inpuenc" or "luainputenc" is found, as ASCII is a subset of utf8 and no tex engine understands 8-bit encodings (latin-1 ...) without inputenc or a similar package. UTF8 decoding errors should lead to a message: "unknown encoding, please specify the file encoding". If tex2lyx is called from the LyX-GUI, this error should lead to a pop-up dialogue where you can specify an encoding. Günter
Re: How to force tex2lyx to read unicode (from within Lyx)?
Jürgen Spitzmüller wrote: > LuaTeX can use other encodings, but not with non-tex fonts. So if > \use_non_tex_fonts is true (this is what you want to check for, right?), > the encoding of the file must be utf8. No, it is the other way round: If a xetex package is detected, use_non_tex_fonts is set to true, and the encoding is set to utf8. > If other encodings are used, LuaTeX uses the "luainputenc" package, which > has the same syntax than inputenc, i.e. > > \usepackage[]{luainputenc} > > Maybe we have to care about that. luainputenc is already handled. What is missing for luatex is to set use_non_tex_fonts to true and the encoding to utf8 if luainputenc is not used. Unfortunately this is not so easy as with xetex. Georg
Re: How to force tex2lyx to read unicode (from within Lyx)?
Jean-Marc Lasgouttes wrote: > Georg, Juergen, I'd like some feedback on the soundness of the patch. I > know next to nil about xetex, and I do not know what is the current > state of the art wrt tex2lyx. Unfortunately I know next to nothing about use_non_tex_fonts. After reading the code and user guide a bit I see that using xetex is only possible if use_non_tex_fonts is true, so your patch looks fine. Georg
Re: Mac-specific: tex2lyx won't run
On Wed, Feb 15, 2012 at 10:59 AM, Eric Weir wrote: > > On Feb 15, 2012, at 10:55 AM, stefano franchi wrote: > >> 3. In Tools>>Preferences>>FIle Converters, create a new converter from >> Scrivener to Lyx: select "Scrivener" in the From dropdown list, and >> "Lyx" in the "to list. Enter the call to tex2lyx with the UTF8 switch >> in the "Converter field": >> tex2lyx -e UTF8 -f $$i $$o > > In Tools I do not have the Preferences option. If I go to Preferences > File > Handling > Converters the "add" button is greyed out. I don't see how to add > a new converter. Sorry, that was Linux--As Stephan pointed out, it's in the application menu on the Mac. And, you need to create the new format before you can create the converter. Cheers, Stefano -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas A&M University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Mac-specific: tex2lyx won't run
Am 15.02.2012 um 17:59 schrieb Eric Weir: > > On Feb 15, 2012, at 10:55 AM, stefano franchi wrote: > >> 3. In Tools>>Preferences>>FIle Converters, create a new converter from >> Scrivener to Lyx: select "Scrivener" in the From dropdown list, and >> "Lyx" in the "to list. Enter the call to tex2lyx with the UTF8 switch >> in the "Converter field": >> tex2lyx -e UTF8 -f $$i $$o > > In Tools I do not have the Preferences option. If I go to Preferences > File > Handling > Converters the "add" button is greyed out. I don't see how to add > a new converter. Preferences resides in the application menu. LyX -> Preferences... Stephan
Re: Mac-specific: tex2lyx won't run
On Feb 15, 2012, at 10:55 AM, stefano franchi wrote: > 3. In Tools>>Preferences>>FIle Converters, create a new converter from > Scrivener to Lyx: select "Scrivener" in the From dropdown list, and > "Lyx" in the "to list. Enter the call to tex2lyx with the UTF8 switch > in the "Converter field": > tex2lyx -e UTF8 -f $$i $$o In Tools I do not have the Preferences option. If I go to Preferences > File Handling > Converters the "add" button is greyed out. I don't see how to add a new converter. Thanks, -- Eric Weir "Uncertainty is an uncomfortable position, but certainty is an absurd one." - Voltaire
Re: How to force tex2lyx to read unicode (from within Lyx)?
On 2012-02-15, Jürgen Spitzmüller wrote: > Jean-Marc Lasgouttes wrote: >> I thought LuaTeX could use encdings other than utf8. Is utf8 the >> default? And does it use the same packages as XeTeX? > LuaTeX can use other encodings, but not with non-tex fonts. Are you sure. I'd think that with "luainputenc" there would be no limitation of the input encoding to utf8. Of course, with non-tex fonts the *font encoding* is Unicode. > So if > \use_non_tex_fonts is true (this is what you want to check for, > right?), the encoding of the file must be utf8. This might be a LyX limitation. However this is about tex2lyx, so we would check for \usepackage{fontenc} or \usepackage{xunicode}. I propose to also check for > \usepackage[]{luainputenc} Günter
Re: Mac-specific: tex2lyx won't run
On Feb 15, 2012, at 10:55 AM, stefano franchi wrote: > following on Enrico's excellent suggestion, here is how you can solve > your Scrivener-related problem in a Lyx-way. The developers are > working on a permanent solution, it seems. So this may turn > unnecessary very shortly. At any rate, here it goes: > > 1, Create a new format in Tools>>Preferences>>File formats. Click > "New" and call it Scrivener or something like it. > > 2. Save. > > 3. In Tools>>Preferences>>FIle Converters, create a new converter from > Scrivener to Lyx: select "Scrivener" in the From dropdown list, and > "Lyx" in the "to list. Enter the call to tex2lyx with the UTF8 switch > in the "Converter field": > tex2lyx -e UTF8 -f $$i $$o > > 4. Click "Add" and click "Save." > > Now you should have the "Scrivener" (or whatever you called the > format) option in File>>Import, without needing to go to the command > line. In fact Lyx does internally exactaly what you'd on the command > line. Thanks, Stefano. I was hoping after hearing from Enrico that something like that might be possible. Sincerely, -- Eric Weir Decatur, GA USA eew...@bellsouth.net "Imagining the other is a powerful antidote to fanaticism and hatred." - Amos Oz
Re: Mac-specific: tex2lyx won't run
On Wed, Feb 15, 2012 at 5:45 AM, Eric Weir wrote: > > On Feb 14, 2012, at 4:47 PM, Enrico Forestieri wrote: > >> Eric Weir writes: >>> I'm attempting to use the workaround suggested by Stefano to get LyX to >>> recognize a Unicoded document as Unicoded. The workaround involves use >>> of the tex2lyx command. >>> >>> I'm on a Mac. When I run the command I get a command not found message. >>> When I do locate tex2lyx, however, the file shows up in two locations: >>> /Applications/LyX.app/Contents/MacOS and >>> /Applications/TeX/LyX.app/Contents/MacOS >>> >>> How do I get the command to run? >> >> Why don't you simply modify the converter in >> Tools->Preferences->File Handling->Converters->LaTeX (plain) -> LyX >> and then use File->Import->LaTeX (plain) ? > > Thanks, Enrico. I've checked that out. With help it may be something I'd want > to try. For now, I got the command to run by specifying the path and with the > default settings in document > settings compiling to pdflatex recognizes the > unicode coding. > Eric, following on Enrico's excellent suggestion, here is how you can solve your Scrivener-related problem in a Lyx-way. The developers are working on a permanent solution, it seems. So this may turn unnecessary very shortly. At any rate, here it goes: 1, Create a new format in Tools>>Preferences>>File formats. Click "New" and call it Scrivener or something like it. 2. Save. 3. In Tools>>Preferences>>FIle Converters, create a new converter from Scrivener to Lyx: select "Scrivener" in the From dropdown list, and "Lyx" in the "to list. Enter the call to tex2lyx with the UTF8 switch in the "Converter field": tex2lyx -e UTF8 -f $$i $$o 4. Click "Add" and click "Save." Now you should have the "Scrivener" (or whatever you called the format) option in File>>Import, without needing to go to the command line. In fact Lyx does internally exactaly what you'd on the command line. Cheers, Stefano -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas A&M University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Mac-specific: tex2lyx won't run
On Feb 14, 2012, at 4:47 PM, Enrico Forestieri wrote: > Eric Weir writes: >> I'm attempting to use the workaround suggested by Stefano to get LyX to >> recognize a Unicoded document as Unicoded. The workaround involves use >> of the tex2lyx command. >> >> I'm on a Mac. When I run the command I get a command not found message. >> When I do locate tex2lyx, however, the file shows up in two locations: >> /Applications/LyX.app/Contents/MacOS and >> /Applications/TeX/LyX.app/Contents/MacOS >> >> How do I get the command to run? > > Why don't you simply modify the converter in > Tools->Preferences->File Handling->Converters->LaTeX (plain) -> LyX > and then use File->Import->LaTeX (plain) ? Thanks, Enrico. I've checked that out. With help it may be something I'd want to try. For now, I got the command to run by specifying the path and with the default settings in document > settings compiling to pdflatex recognizes the unicode coding. It's a workaround. I hope there will eventually be a fix to the problem that will make it unnecessary. If not the solution you suggest may work--again, with help. Sincerely, -- Eric Weir Decatur, GA eew...@bellsouth.net "Style is truth." - Ray Bradbury
Re: How to force tex2lyx to read unicode (from within Lyx)?
Jean-Marc Lasgouttes wrote: > I thought LuaTeX could use encdings other than utf8. Is utf8 the > default? And does it use the same packages as XeTeX? LuaTeX can use other encodings, but not with non-tex fonts. So if \use_non_tex_fonts is true (this is what you want to check for, right?), the encoding of the file must be utf8. If other encodings are used, LuaTeX uses the "luainputenc" package, which has the same syntax than inputenc, i.e. \usepackage[]{luainputenc} Maybe we have to care about that. The font packages are the same (basically fontspec). Jürgen
Re: How to force tex2lyx to read unicode (from within Lyx)?
Le 15/02/2012 11:38, Jürgen Spitzmüller a écrit : Jean-Marc Lasgouttes wrote: > I have a patch that seems to work with XeTeX, I do not know anything > about luatex (what shall we do with it?) I think your patch will work for LuaTeX as well. I thought LuaTeX could use encdings other than utf8. Is utf8 the default? And does it use the same packages as XeTeX? I am very confused by these different engines... JMarc
Re: How to force tex2lyx to read unicode (from within Lyx)?
Jean-Marc Lasgouttes wrote: > I have a patch that seems to work with XeTeX, I do not know anything > about luatex (what shall we do with it?) I think your patch will work for LuaTeX as well. Jürgen
Re: How to force tex2lyx to read unicode (from within Lyx)?
Le 15/02/2012 10:51, Guenter Milde a écrit : IMV, it should try utf8 first in case this does not give a result. * if the file is pure ASCII, everything is fine * if the file is utf8 encoded, fine too * if another encoding is used, an error occures: try again with the second guess. That is not a bad solution, but probably not so easy to implement with our current code. I have a patch that seems to work with XeTeX, I do not know anything about luatex (what shall we do with it?) JMarc
Re: How to force tex2lyx to read unicode (from within Lyx)?
On 2012-02-14, stefano franchi wrote: > On Tue, Feb 14, 2012 at 8:05 AM, Jean-Marc Lasgouttes >> tex2lyx is not really the culprit. The file you attach is broken : it >> does not use xetex/luatex, but it does use "Unicode (XeTeX) (utf8)" as >> encoding. As a result, the latex export of the file does not specify >> any encoding, and tex2lyx is not able to guess it. > Sorry, but I don't understand what you mean by "broken" here. If I set > the encoding to pure Unicode (isn't that what "Unicode (XeTeX) (utf8)" > means?) shouldn't that be enough to specify that the file is > Unicode-encoded? The setting "Unicode (XeTeX) (utf8)" specifies that the LyX-generated LaTeX file should be utf-8 encoded Unicode * without "forced" substitutions (for characters the halfway utf8 support of 8-bit LaTeX does not understand or does wrong), and * without calling the "inputenc" package. This means that in the exported file, utf-8 encoding is used but there is no specification of the used encoding inside the *.tex file. You can consider this an "expert setting": it allows to circumvent limitations but usually requires additional custom preamble code to produce valid LaTeX files. Similar to the use of ERT, LyX does not guarantee proper working. > That seems obvious to me (which of course may only reflect my ignorance > of Lyx code). If that's not true then I do not understand what is the > meaning of the Document>>Settings>Language>>Encoding value. It seems that tex2lyx relies on the optional argument in the \usepackage[]{inputenc} line to determine the *.tex file encoding. IMV, it should try utf8 first in case this does not give a result. * if the file is pure ASCII, everything is fine * if the file is utf8 encoded, fine too * if another encoding is used, an error occures: try again with the second guess. Günter
Re: Mac-specific: tex2lyx won't run
Eric Weir writes: > I'm attempting to use the workaround suggested by Stefano to get LyX to > recognize a Unicoded document as Unicoded. The workaround involves use > of the tex2lyx command. > > I'm on a Mac. When I run the command I get a command not found message. > When I do locate tex2lyx, however, the file shows up in two locations: > /Applications/LyX.app/Contents/MacOS and > /Applications/TeX/LyX.app/Contents/MacOS > > How do I get the command to run? Why don't you simply modify the converter in Tools->Preferences->File Handling->Converters->LaTeX (plain) -> LyX and then use File->Import->LaTeX (plain) ? -- Enrico
Re: Mac-specific: tex2lyx won't run
On Tue, Feb 14, 2012 at 11:18 AM, Eric Weir wrote: > > On Feb 14, 2012, at 11:07 AM, BH wrote: > >> I'm guessing the problem is that tex2lyx isn't in your PATH, which >> means you must provide it yourself. So from the Terminal, you should >> type, for example, >> >> /Applications/LyX.app/Contents/MacOS/tex2lyx > > Thanks, Will do. But while I'm at it, is there a way to get it in my path. It > appears I may be needing to use the command a fair bit. Here's one explanation: http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/ BH
Re: How to force tex2lyx to read unicode (from within Lyx)?
On Tue, Feb 14, 2012 at 8:05 AM, Jean-Marc Lasgouttes wrote: > Le 14/02/2012 00:47, Richard Heck a écrit : > >>> Try out the enclosed minimal lyx file. >>> >>> 1. exporting to latex and reimporting into lyx from >>> FIle>>Import>>Latex(plain) produces garbage characters for the dashes >>> >>> 2. However, calling>tex2lyx -e UTF8 from the command line produces >>> the correct file. >> >> Still, it's surprising we fail in this particular case, so I'd guess it >> is indeed a bug. I'll cross-post to devel. > > > tex2lyx is not really the culprit. The file you attach is broken : it does > not use xetex/luatex, but it does use "Unicode (XeTeX) (utf8)" as encoding. > As a result, the latex export of the file does not specify any encoding, and > tex2lyx is not able to guess it. > Sorry, but I don't understand what you mean by "broken" here. If I set the encoding to pure Unicode (isn't that what "Unicode (XeTeX) (utf8)" means?) shouldn't that be enough to specify that the file is Unicode-encoded? That seems obvious to me (which of course may only reflect my ignorance of Lyx code). If that's not true then I do not understand what is the meaning of the Document>>Settings>Language>>Encoding value. Cheers, Stefano -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas A&M University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Mac-specific: tex2lyx won't run
On Feb 14, 2012, at 11:07 AM, BH wrote: > I'm guessing the problem is that tex2lyx isn't in your PATH, which > means you must provide it yourself. So from the Terminal, you should > type, for example, > > /Applications/LyX.app/Contents/MacOS/tex2lyx Thanks, Will do. But while I'm at it, is there a way to get it in my path. It appears I may be needing to use the command a fair bit. Sincerely, -- Eric Weir "With an ounce of willingness, everything can change." - Kim
Re: Mac-specific: tex2lyx won't run
On Tue, Feb 14, 2012 at 10:54 AM, Eric Weir wrote: > > Just correcting a typo in the subject heading. > > -- > > I'm attempting to use the workaround suggested by Stefano to get LyX to > recognize a Unicoded document as Unicoded. The workaround involves use of > the tex2lyx command. > > I'm on a Mac. When I run the command I get a command not found message. When > I do locate tex2lyx, however, the file shows up in two > locations: /Applications/LyX.app/Contents/MacOS > and /Applications/TeX/LyX.app/Contents/MacOS > > How do I get the command to run? I'm guessing the problem is that tex2lyx isn't in your PATH, which means you must provide it yourself. So from the Terminal, you should type, for example, /Applications/LyX.app/Contents/MacOS/tex2lyx to invoke it. (Or use the path to the version of LyX in your /Applications/TeX folder -- whichever one you want to use.) BH
Mac-specific: tex2lyx won't run
Just correcting a typo in the subject heading. -- I'm attempting to use the workaround suggested by Stefano to get LyX to recognize a Unicoded document as Unicoded. The workaround involves use of the tex2lyx command. I'm on a Mac. When I run the command I get a command not found message. When I do locate tex2lyx, however, the file shows up in two locations: /Applications/LyX.app/Contents/MacOS and /Applications/TeX/LyX.app/Contents/MacOS How do I get the command to run? Thanks, -- Eric Weir eew...@bellsouth.net "Every moment is unique and discrete." Eknath Eswaran
Ma-specific: tex2lyx won't run
I'm attempting to use the workaround suggested by Stefano to get LyX to recognize a Unicoded document as Unicoded. The workaround involves use of the tex2lyx command. I'm on a Mac. When I run the command I get a command not found message. When I do locate tex2lyx, however, the file shows up in two locations: /Applications/LyX.app/Contents/MacOS and /Applications/TeX/LyX.app/Contents/MacOS How do I get the command to run? Thanks, -- Eric Weir eew...@bellsouth.net "Every moment is unique and discrete." Eknath Eswaran
Re: How to force tex2lyx to read unicode (from within Lyx)?
Jean-Marc Lasgouttes wrote: > Georg, Juergen, I'd like some feedback on the soundness of the patch. I > know next to nil about xetex, and I do not know what is the current > state of the art wrt tex2lyx. The latter I don't know either, but the patch looks sane. We set the encoding to utf8 internally as well if \use_non_tex_fonts is true. Jürgen
Re: How to force tex2lyx to read unicode (from within Lyx)?
Le 14/02/2012 00:47, Richard Heck a écrit : Try out the enclosed minimal lyx file. 1. exporting to latex and reimporting into lyx from FIle>>Import>>Latex(plain) produces garbage characters for the dashes 2. However, calling>tex2lyx -e UTF8 from the command line produces the correct file. Still, it's surprising we fail in this particular case, so I'd guess it is indeed a bug. I'll cross-post to devel. tex2lyx is not really the culprit. The file you attach is broken : it does not use xetex/luatex, but it does use "Unicode (XeTeX) (utf8)" as encoding. As a result, the latex export of the file does not specify any encoding, and tex2lyx is not able to guess it. Even better, try to visualize the file: the encoding will be bogus, without any intervention of tex2lyx. What happens in this case is that the encoding is set to latin1 (utf8 is a better default in some sense, but if you guess it wrong, you can bet convertion errors, see bug #7509). Unfortuantely, it seems that the encodings utf8 and utf8x (handled by plain latex), do not understand some of your hyphens, and produce a document that does not compile. So your best bet is probably to produce a file that will be imported as XeTeX/LuaTeX. This will happen when some characteristic packages are recognized, which will happen after the followinf patch is applied. Georg, Juergen, I'd like some feedback on the soundness of the patch. I know next to nil about xetex, and I do not know what is the current state of the art wrt tex2lyx. JMarc Index: src/tex2lyx/Preamble.cpp ======= --- src/tex2lyx/Preamble.cpp (révision 40747) +++ src/tex2lyx/Preamble.cpp (copie de travail) @@ -401,6 +401,7 @@ h_font_sans = "default"; h_font_typewriter = "default"; h_font_default_family = "default"; + h_use_non_tex_fonts = "false"; h_font_sc = "false"; h_font_osf= "false"; h_font_sf_scale = "100"; @@ -581,8 +582,11 @@ add_package(name, options); string scale; - if (is_known(name, known_xetex_packages)) + if (is_known(name, known_xetex_packages)) { xetex = true; + h_use_non_tex_fonts = "true"; + p.setEncoding("utf8"); + } // roman fonts if (is_known(name, known_roman_fonts)) { @@ -901,6 +905,7 @@ << "\\font_sans " << h_font_sans << "\n" << "\\font_typewriter " << h_font_typewriter << "\n" << "\\font_default_family " << h_font_default_family << "\n" + << "\\use_non_tex_fonts " << h_use_non_tex_fonts << "\n" << "\\font_sc " << h_font_sc << "\n" << "\\font_osf " << h_font_osf << "\n" << "\\font_sf_scale " << h_font_sf_scale << "\n" Index: src/tex2lyx/Preamble.h === --- src/tex2lyx/Preamble.h (révision 40747) +++ src/tex2lyx/Preamble.h (copie de travail) @@ -90,6 +90,7 @@ std::string h_font_sans; std::string h_font_typewriter; std::string h_font_default_family; + std::string h_use_non_tex_fonts; std::string h_font_sc; std::string h_font_osf; std::string h_font_sf_scale;
Re: How to force tex2lyx to read unicode (from within Lyx)?
On 02/13/2012 05:41 PM, stefano franchi wrote: I have been helping Eric Weir with his Scrivener-->LaTeX-->Lyx import and we have narrowed down the problem to Lyx not importing a Unicode-encoded file as Unicode. I'm glad to hear someone was able to help with this. Thanks for your efforts on behalf of the LyX community. So tex2lyx is the culprit. Wasn't this solved some time ago, however?I mean: automatic recognition of the imported file encoding? Well, that's a complicated issue. They may have tried to do a better job, but recognizing the file encoding completely reliably is not in general possible. There's some famous example of this. Try out the enclosed minimal lyx file. 1. exporting to latex and reimporting into lyx from FIle>>Import>>Latex(plain) produces garbage characters for the dashes 2. However, calling>tex2lyx -e UTF8 from the command line produces the correct file. Still, it's surprising we fail in this particular case, so I'd guess it is indeed a bug. I'll cross-post to devel. Richard
How to force tex2lyx to read unicode (from within Lyx)?
I have been helping Eric Weir with his Scrivener-->LaTeX-->Lyx import and we have narrowed down the problem to Lyx not importing a Unicode-encoded file as Unicode. So tex2lyx is the culprit. Wasn't this solved some time ago, however?I mean: automatic recognition of the imported file encoding? Try out the enclosed minimal lyx file. 1. exporting to latex and reimporting into lyx from FIle>>Import>>Latex(plain) produces garbage characters for the dashes 2. However, calling >tex2lyx -e UTF8 from the command line produces the correct file. Is this a bug? Or a feature? Cheers, Stefano -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas A&M University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org em-dash-test.lyx Description: application/lyx
tex2lyx and custom macros
Hi, can someone remember me how to use tex2lyx with custom macros, so that they're imported as a single inset, and not the separated macro name, the open brace and closed braces ? Thx, T.