LyX problem - I need your help

2016-04-26 Thread Isam Alobaidi
Dear Sir,
This is Isam Alobaidi, PhD student in computer science department in
Missouri University of Scienec and technology.
I faced a problem with the LyX, I wonder if you can help me with it. I am
writing my thesis by LyX but the university enforce me to
use their temple that written in LaTeX.
I have no idea how I can connect them together and use the temple in LyX in
an other word how to make a given LaTeX template compatible with my LyX
file?
Waiting your kindly response.
Thanks.

-- 
Isam Alobaidi
PhD Student, Department of Computer Science 
Missouri University of Science and Technology 
113 ERL, 500 West 16th Street, Rolla, MO 65409
Webpage: http://web.mst.edu/~iaahgb/


RE: log file location - move from temporary directory to .lyx file location

2016-04-26 Thread Christopher Bilder
Thank you all for your suggestions. With the additional help of Tim Arnold (SAS 
Institute; author of the StatRep package for LaTeX), here's a somewhat 
hardcoded way to move the log file on a Windows 7 system with LyX 2.1.1: 

1) Select Preferences > File Handling > File Formats and then choose a format 
of PDF (pdflatex)
2) In the Copier field, enter 
  
 python "C:\Program Files (x86)\LyX 2.1"\\Resources\\scripts\\ext_copy.py 
-e log -t. $$i c:\\myfolder

   where myfolder would be the location where your LyX file is located 
3) Select Save
4) Reconfigure (Select Tools > Reconfigure) and exit LyX
5) Re-open the LyX file and select File > Export > PDF (pdflatex)

This works but it is not necessarily idea. Does anyone have ideas for 
improvement? For example, is there a way to get around hard coding the path to 
ext_copy.py or myfolder? Also, is there a way to do this by selecting the 
document viewer icon on the View/Update toolbar (equivalent to Document > View 
[PDF (pdflatex)] or Ctrl-R) rather than File > Export > PDF (pdflatex)?

The main reason again for my original question is to actually do this moving 
with .sas files that are created automatically by the StatRep package when a 
LyX/LaTeX file is compiled. Not everyone necessarily knows what a SAS file is 
or has access to SAS to run a SAS file, so that's why I chose to phrase the 
question in terms of the LaTeX log file. I have not tried yet the previous 
suggestion of using the LyX Converter to automatically run these SAS files. The 
potential for doing it is very interesting and would be a nice addition to the 
reproducibility of research area, like knitr is for R programs. 

Thanks,

Chris

-Original Message-
From: Bert Lloyd [mailto:bert.lloyd...@gmail.com] 
Sent: Tuesday, April 26, 2016 9:15 AM
To: lyx-users@lists.lyx.org
Cc: Christopher Bilder ; Richard Heck 
Subject: Re: log file location - move from temporary directory to .lyx file 
location

Chris, I've faced a somewhat similar situation in the past and I handled it by 
writing a script to do the following

1. export lyx to tex (in cygwin, lyx -e tex mylyxfile.lyx) 2. Use latex or 
pdflatex to process the resulting mylyxfile.tex 3. now the ancillary files (in 
your case, .log) should be created in the same directory, so you can do your 
task 4. clean up the ancillary files using rm

I am really terrible at writing scripts so I'll allow someone more adept to 
code up an example, but this is the basic idea and it works for me, albeit in a 
fairly hacky way.

Hope this helps and good luck,
BL

On Fri, Apr 22, 2016 at 2:21 PM, Richard Heck  wrote:
> On 04/22/2016 12:36 PM, Christopher Bilder wrote:
>
> Hello, I would like to have the LaTeX .log file be automatically put 
> into the folder where I have my .lyx file once the LyX file is 
> compiled. This behavior would be similar to what occurs with LaTeX 
> already when compiling a .tex file. Currently, the .log file is put 
> into a temporary directory by LyX. I understand how to change the path 
> for the temporary directory (Preferences > Paths) which sort of works, 
> but I would also like to remove the set of randomly generated folders 
> that come with it, like “lyx_tmpdir.WrDLwXBld464\lyx_tmpbuf2”, before I can 
> get to my .log file.
>
>
>
> I understand how to see the .log file from within LyX itself (Document 
> > LaTeX Log), so this request my seem odd! The real reason that I want 
> to be able to better control this LyX behavior is because I am using a 
> LaTeX package (StatRep – SAS’s “equivalent” to knitr for R) which 
> generates some additional files (SAS program) that I need to easily access.
>
>
> This should be possible by creating a specialized "copier". See 
> section 3.2 of the Customization manual for information on how to do 
> this. There's a very simple example there, but you can also have a 
> look at the ext_copy.py file, which is mostly used as a copier for html files.
>
> I don't totally understand how StatRep works or what kinds of files it 
> generates where, but you if it is putting them in the temporary 
> directory, you should be able to define a copier to extract them, too. 
> Alternatively, if it's something you are running by hand after export, 
> you should be able to define a "Converter" that will run the SAS 
> program for you, in the temporary directory. This is how kntir works 
> in LyX, I think. See section
> 3.3 of the Customization manual for info on that.
>
> Richard
>


Re: Fwd: Re: Question on creating layouts

2016-04-26 Thread gordon cooper

 You are right! Many thanks Michael.

Gordon.


On 27/04/16 01:33, Michael Berger wrote:

Gordon probably forgot to address the list!?
Michael Berger


 Forwarded Message 
Subject: Re: Question on creating layouts
Date: Tue, 26 Apr 2016 19:27:25 +1200
From: gordon cooper 
To: Michael Berger 



Have successfully done this style of class using Koma Article for a

100+ page technical manual.

Gordon.



On 26/04/16 19:13, Michael Berger wrote:



On 04/26/2016 12:15 AM, Ryan Nicholl wrote:

Hello! I have a problem, I need to create a custom class, but I can't
figure out how to do this using the online documentation. It's rather
confusing to me...

I need several levels of organization:

Title
Chapter
Article
Part
Section
Subsection

All of these need to show up in the table of contents, each is nested
except subsection which does not nest within a section.

A section would look like:

Section -- Foo

in the document, and subsection like:


Section
--. Foo

Could anyone point me towards guide(s) for doing this type of thing?

Thank you,
Ryan P. Nicholl
(678)358-7765
r.p.nich...@gmail.com 


Hi Ryan,
may be this will help:
http://stefaanlippens.net/customLaTeXclassesinLyX

Don't you think one of the KOMA classes offered by LyX can satisfy
your requirements?

Michael Berger












Re: Load package after hyperref is loaded

2016-04-26 Thread Richard Heck
On 04/26/2016 06:48 AM, racoon wrote:
> Hi!
>
> In general packages should be loaded *before* hyperref is loaded. So I
> guess that is what happens when "Use Hyperref Support" is activated in
> the Document Settings.
>
> However, there seem to be some exceptions, for example,
>
> \usepackage[all]{hypcap}.

The user preamble always comes after the LyX-generated premable. If you
put this in your own preamble, then, it will get loaded after hyperref.
The difficult case is when you need to load your own package before
hyperref.

Richard



Re: Question on creating layouts

2016-04-26 Thread Richard Heck
On 04/25/2016 06:15 PM, Ryan Nicholl wrote:
> Hello! I have a problem, I need to create a custom class, but I can't
> figure out how to do this using the online documentation. It's rather
> confusing to me...

If you need a completely customized class, then there are two sorts of
things you need to do. The first is at the LaTeX level: You need to
write a class (cls) file, or else at least write a pacakge file (sty)
that provides the additional functionality. I'm afraid there is not much
to say about how to do this other than: You will need to learn a lot of
LaTeX. I personally find the /Guide to LaTeX/ and /LaTeX Companion/
really helpful. Looking at how the basic files that are provided with
LaTeX work is also helpful. In your case, I'd guess that book.cls is
pretty close to what you need. As someone else mentioned, though, the
Koma Script classes are extremely flexible, and it may be that you could
adapt them to your needs. They come with extensive documentation. Look
for the file scrguien.pdf on your computer. Or just look online.

If you can handle the LaTeX part, then you will need a LyX layout file
for the new class. Writing these is less difficult, and you can probably
just adapt the one for book.cls or, if you use Koma Script, for
scrbook.cls. Documentation for this is found in the Customization
manual, chapter 5. People here will be happy to offer help on the LyX
part and, in so far as we can, on the LaTeX part. But not everyone here
is really expert with LaTeX.

Richard

PS It looks as if maybe you are trying to create a collection of
articles. If so, then you might have a look at the combine.cls class.
See these web resources, too:

https://pastcounts.wordpress.com/2010/12/20/how-to-construct-a-collection-of-articles-with-latex/

http://latex-community.org/forum/viewtopic.php?f=4=12030

http://tex.stackexchange.com/questions/110544/book-option-of-the-combine-document-class




Fwd: Re: Question on creating layouts

2016-04-26 Thread Michael Berger

Gordon probably forgot to address the list!?
Michael Berger


 Forwarded Message 
Subject:Re: Question on creating layouts
Date:   Tue, 26 Apr 2016 19:27:25 +1200
From:   gordon cooper 
To: Michael Berger 



Have successfully done this style of class using Koma Article for a

100+ page technical manual.

Gordon.



On 26/04/16 19:13, Michael Berger wrote:



On 04/26/2016 12:15 AM, Ryan Nicholl wrote:

Hello! I have a problem, I need to create a custom class, but I can't
figure out how to do this using the online documentation. It's rather
confusing to me...

I need several levels of organization:

Title
Chapter
Article
Part
Section
Subsection

All of these need to show up in the table of contents, each is nested
except subsection which does not nest within a section.

A section would look like:

Section -- Foo

in the document, and subsection like:


Section
--. Foo

Could anyone point me towards guide(s) for doing this type of thing?

Thank you,
Ryan P. Nicholl
(678)358-7765
r.p.nich...@gmail.com 


Hi Ryan,
may be this will help:
http://stefaanlippens.net/customLaTeXclassesinLyX

Don't you think one of the KOMA classes offered by LyX can satisfy
your requirements?

Michael Berger









Load package after hyperref is loaded

2016-04-26 Thread racoon

Hi!

In general packages should be loaded *before* hyperref is loaded. So I 
guess that is what happens when "Use Hyperref Support" is activated in 
the Document Settings.


However, there seem to be some exceptions, for example,

\usepackage[all]{hypcap}.

Is there a way to load this package *after* hyperref is loaded? Or will 
I have to deactivate "Use Hyperref Support" and load it manually in the 
preamble instead?


Thank you



Re: Question on creating layouts

2016-04-26 Thread Michael Berger



On 04/26/2016 12:15 AM, Ryan Nicholl wrote:
Hello! I have a problem, I need to create a custom class, but I can't 
figure out how to do this using the online documentation. It's rather 
confusing to me...


I need several levels of organization:

Title
Chapter
Article
Part
Section
Subsection

All of these need to show up in the table of contents, each is nested 
except subsection which does not nest within a section.


A section would look like:

Section -- Foo

in the document, and subsection like:


Section 
--. Foo


Could anyone point me towards guide(s) for doing this type of thing?

Thank you,
Ryan P. Nicholl
(678)358-7765
r.p.nich...@gmail.com 


Hi Ryan,
may be this will help:
http://stefaanlippens.net/customLaTeXclassesinLyX

Don't you think one of the KOMA classes offered by LyX can satisfy your 
requirements?


Michael Berger