LaTeX forum ⇒ LyXChanging page margins for Code Listing doesn't work

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
GuyL44
Posts: 1
Joined: Sat Oct 26, 2013 11:33 am

Changing page margins for Code Listing doesn't work

Postby GuyL44 » Sat Oct 26, 2013 11:49 am

Hey there,

I'm writing a document that has a few Code Listings inserted into it. It's in the "Article (Hebrew)" format - which, as far as I know, isn't any different from the standard "Article" - it only has added language support.

Anyway, I'm trying to have only one of the listings start off more to the left than usual - basically to have a negative left page margin, on that specific listing only.

I've tried 3 methods so far, none managed to do the trick:
1. Document->Settings->Listings
I entered the command xleftmargin=-3cm, the program recognizes it, but only changes the comments in the code. Meaning, only on the lines where there's a "%" (the code is set in MATLAB) the negative indentation is performed. The rest of the code stays right where it was.
2. \usepackage{changepage}
This method looked promising, but it didn't work as well. I used the aforementioned package and inserted the proper commands ("{adjustwidth}{-3cm}{}" etc.) and nothing worked. Only simple text (i.e. outside of the Code Listing) was moved. The listing stayed the same.
3. http://stackoverflow.com/a/1670572
This one didn't do the trick either. Again, only "plain" text was affected, never the code listing.


Can anyone help me? It's been driving me crazy and I have no idea what I'm doing wrong!
(Added: I'm using Lyx 2.0.5.1)

Tags:

Return to “LyX”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 3 guests