Showing posts with label lyx. Show all posts
Showing posts with label lyx. Show all posts

Saturday, 5 October 2013

Damn! How to set image in a landscape mode into Lyx.

Ok. Finally i've discovered the magic formula to set a image in landscape mode into lyx, with custom margin.

The ingredients are these: 
  1. Modify Document preamble: go to Document->Settings->LaTextPreamble and add: 
    \usepackage{pdflscape}
    \usepackage{changepage}
    \usepackage{anysize}
  2. Before you insert the image, add a LaText box code (or hit CTRL+L) and insert: \marginsize{3cm}{2cm}{0cm}{1cm} % left rigth top bottom
    \begin{landscape}
  3.  Add Image (Insert->Image or Insert ->Floating Object and after, Insert->Image).
  4. Set image size: mouse right click on image and select Settings.
  5. After Image add another  LaText box code and insert: \end{landscape}
  6. Optionally: if you want change margin, add another time  \marginsize{3cm}{2cm}{0cm}{1cm} % left rigth top bottom with your preffered values.
This is the result: 

Friday, 27 September 2013

Lyx Program Listing cool style

Hello! While I was writing my thesis with lyx, I found myself to insert(to see to insert a box code, visit: http://stackoverflow.com/questions/2116944/insert-programming-code-in-a-lyx-document) a box contains a program code ( Java). Without options, the box code is very good, like:
It is nice, but if I want more style? In this document there are a lots of tricks to get our code box nicest http://ftp.uniroma2.it/TeX/macros/latex/contrib/listings/listings.pdf. To insert option configuration into box code, click with right click mouse into box code, and going to Settings->Advanced insert your options.

For example, to get this result : 






 


I have inserted these option: 

caption={Classe java Tripla}
emph={subject,predicate,object}
emphstyle={\color{blue}}
frame=shadowbox
keywordstyle={\color{violet}}
rulesepcolor={\color{gray}}

Try to believe!!

P.S. To enable all color into lyn, do this: go in Document->Settings->Latext Preamble and insert
\usepackage{xcolor}