LyXadd code to

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
keygen
Posts: 3
Joined: Sat Mar 22, 2008 11:46 pm

add code to

Post by keygen »

hey, i wanna add some code into my work and i really miss the TAB to format the code.

is there a way to have tabs?
or kinda add padding or margin to the specific the lines?

something like this in BB: [ code ] code here [ / code ]

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

add code to

Post by localghost »

You have to describe more precisely what you want to do. And I can't really figure out what you mean with the term "tab". I can only assume what you want to do.
  1. You want to write pure LaTeX source code in your document.
  2. You want to insert some code of another programming language into your document.
So, please make clear what you want to have. Otherwise I don't see the possibility to help.


Best regards
Thorsten¹
keygen
Posts: 3
Joined: Sat Mar 22, 2008 11:46 pm

Re: add code to

Post by keygen »

after hours of searching in google i found out that "program listing" do the trick. sorry, if i didn't came back and changed to topic to kinda "solved".

but i have another problem now and maybe you can help me out there too:

i use kbibtex for the bibliography. if i put a citation anywhere in the text it just shows as [1] but i need it like [Az99] which is what my University wants it to be.

and it should look like this after that in the bibliography:

[Az99] Azubi, L. et. al.: Die Fußnote in LNI-Bänden. In (Glück, H.I.; Gans, G. Hrsg.): For rung leicht gemacht - eine Einführung. Format-Verlag, Bonn, 1999; S. 135-162

i have most of the information written into kbibtex so it is available and fine. it just need to look like the one above in the printed pdf.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

add code to

Post by localghost »

You still seem to have difficulties in describing a problem precisely. So, please make clear how you create your bibliography. Therefore you should point out the output of KBibTeX and show how you include that in the source of your document. The best way to do that is to generate a minimal working example (MWE).
User avatar
Maksi
Posts: 52
Joined: Sun Mar 16, 2008 12:12 pm

add code to

Post by Maksi »

You need to choose a suiting citation and bibliography style. LyX has support for (default) numerical citations, for the natbib package, for jurabib and -- after some extra configuration -- even for biblatex. In LyX go to Document -> Settings -> Bibliography to choose your style. I never used natbib, but check natbib and play around with the different styles available. Another solution would be to configure LyX for biblatex and use the biblatex-style alphabetic as that seems to be exactly what you are looking for.
A Humanities user of LaTeX :)
keygen
Posts: 3
Joined: Sat Mar 22, 2008 11:46 pm

Re: add code to

Post by keygen »

thanks for you help but i don't get biblatex to work in lyx for whatever reason. :(

but after some more research i found another simple way:

just click on "bibtex generated bibliography" and add alphadin! thats it!!! :)
Post Reply