{sourcecode} is a collection of computer instructions, here for (La)TeX.

learn more… | top users | synonyms

0
votes
1answer
546 views

Is there a beamer auto-indent program? [duplicate]

Possible Duplicate: Tool for cleaning LaTeX code Beamer presentation files are very structures, they have sections, in which you find subsections, which include frames that have titles and ...
1
vote
3answers
2k views

lstlisting with c++: spaces around scope resolution operator

I am having a hard time to make the output of lstlisting for c++ source look good. Currently, I am stuck with a problem to reduce the amount of space around the scope resolution operator ::. See the ...
5
votes
1answer
6k views

TeXStudio doesn't recognize some commands

I'm starting to use TeXStudio. I'm having some issues, for example with \begin{align*} \sqrt[n]{a}^2-\sqrt[n]{ab}&=m\sqrt[n]{a}\\ \end{align*} When i put the point on align* i get a small ...
2
votes
2answers
246 views

Is there a way to make ChkTeX ignore TikZ code

ChkTeX does not like TikZ, and will report a bunch of errors. Is there a way to make ChkTex ignore TikZ code?
10
votes
1answer
1k views

Numbers and programming code

This happens when I use programming code and enumeration, how can I add a gap between the numbering and the line numbers of the code. I'm using this in LaTeX Preamble: \usepackage{listings} ...
4
votes
1answer
454 views

Beamer: How to do src highlighting when src is split with \only<> command? [duplicate]

Thanks to Marc van Dongen there is a template of a "step by step" programming tutorial (with a sample layout in his question): How to create step by step annotated programming tutorial in LaTeX? . I ...
4
votes
1answer
1k views

Including a text file in LaTeX

I write a program by DevC++ compiler and save it by .cpp format, and want to paste the code in my editor, Do I have to paste all the code each time? Is there a way to include the file instead of ...
2
votes
0answers
122 views

Automatic source document formatting [duplicate]

Possible Duplicate: Tool for cleaning LaTeX code This might not be a TeX question, strictly speaking but I'm sure this is the right forum to ask this: Is there a tool that can format the ...
2
votes
2answers
833 views

Source code for examples in TikZ/PGF manual

I am starting to learn TikZ. I was wondering if the source code for all examples in the TikZ manual (2.10 version) is available somewhere for download?
10
votes
1answer
1k views

Source Code Indentation

I was wondering if it is possible to indent the code like in most programming languages as shown below: \part \chapter \section \subsection etc. This would make the ...
7
votes
1answer
242 views

How would I recursively add the document source code to an appendix?

For kicks, I would like to include the source code as an appendix. It's rather superfluous, yes, but it's puzzling. I commonly have documents that are structured thusly: main.tex includes: ...
4
votes
2answers
664 views

Finding TeX Sources in C

Why is it so hard to find TeX sources in C? I know the full source code is included in the tex.web and pdftex.web files, but isn't there any way to convert them to plain C code?
2
votes
1answer
302 views

Sample Metafont source for one character

I would just like to look at the Metafont source code for the lower-case 'a' in the Computer Modern font. Where could I find that? Or even better, if that source could be the answer to this question.
1
vote
1answer
155 views

Listing not printing inside “ ” [duplicate]

Possible Duplicate: Listings package not correctly showing PHP strings I'm using listings to include C code, but I've a problem: when I insert in the listing a printf like the following ...
4
votes
0answers
450 views

Syntax highlighting blocks of code with LaTeX and literate programming tools [closed]

Using packages like minted (thanks to Pygments), LaTeX can generate beautifully highlighted/colored source code. Literate programming tools such as noweb and cweb can generate beautifully typeset and ...
2
votes
1answer
3k views

lstlisting environment ignores tabs

I have this LaTeX code: \lstset{ language=Java, tabsize=8, keepspaces, extendedchars=true, rulecolor=\color{black}, basicstyle=\footnotesize, aboveskip=5pt, ...
2
votes
1answer
2k views

Autoformat latex source [duplicate]

Possible Duplicate: Tool for cleaning LaTeX code I got a simple question. I just got hold of a, very "ugly" latex document. By ugly I mean, that the source code is almost unreadable. Is ...
3
votes
1answer
5k views

Edit LaTeX source in LyX

I recently installed LyX 2.0.1 (2011-08-31). I have the option to display the LaTeX source. I have tried to modify this source (in the LyX tab) in order to get some changes in the LyX file and the pdf ...
12
votes
1answer
600 views

Is there such a thing as a LaTeX code formatter

I was looking for this a while back for JavaScript, but I was wondering a general purpose one exists for all, or most languages. For example for LaTeX I would put the following in a text box ...
3
votes
2answers
266 views

Where can I get the source code to LaTeX2HTML?

I want to get and improve the source of the LaTeX2HTML program, but the top Google results are outdated, with broken links. Does anyone know where the source resides?
2
votes
1answer
386 views

Re-Indent in TeXShop

Is there something as Re-Indent (in Xcode) or Smart Indent (in Matlab) for TeXShop?
15
votes
2answers
484 views

Location inside a LaTeX source code

When viewing a pdf of a long LaTeX document, it can sometimes be difficult to find where a certain equation or a line in the pdf is located in the source code, as there are no page numbers in the ...
15
votes
2answers
2k views

Colored background in inline listings

I would like to make inline code more distinguishable from the text surrounding it, and I thought that using a background might work (like it is done on the stackexchange pages.) Since I use the ...
9
votes
1answer
7k views

How to create beamer slides with source code that can be copied?

We are converting our course slides from Powerpoint to LaTeX, to be able to offer all code in a more open format and to let students easily copy code from the slides. However, the latter does not seem ...
2
votes
2answers
1k views

Lyx edit source code otherwise, How to insert diagrams

Is it possible to edit source code in Lyx? Otherwise, how might I draw diagrams like venn diagrams or graphs
10
votes
1answer
1k views

What are the standard styles to format LaTeX source code?

In any other programming languages, we have several ways to format our source code. For example, some of the standard styles are: Allman(ANSI) K&R GNU .... Within LaTeX, I couldn't find a neat ...
48
votes
5answers
5k views

How can I see the “implementation” of the \LaTeX command?

After reading another question relating to how to see definitions of commands, I tried: \documentclass{article} \begin{document} \show\LaTeX \end{document} But this shows me in my logfile: ...
6
votes
2answers
2k views

How do you get TeXShop to automatically insert line breaks?

As I am using version control (hg) it is convenient to have hard line breaks in my tex files. Is there a way to set up TeXShop so that it automatically inserts line breaks? (For instance, as I ...
11
votes
1answer
1k views

Where I can find the source code of pdflatex.exe?

Where I can find the source code of pdflatex.exe? Edit 1 This is quoted from the link given by @TH. pdfTeX is built on top of TeX, written by Donald Knuth cum suis (Liang and so), and eTeX, ...
38
votes
2answers
3k views

Styleguide for LaTeX similar to the Google styleguides?

Even though I don't work at Google, the Google Styleguides have been very helpful for me in adopting consistent, readable style conventions for my code. Unfortunately, there is no Google Styleguide ...
21
votes
3answers
2k views

When can I safely add an empty line?

I really like spacing my LaTeX to stay organized, but I'm always scared that adding a space will affect the output when all I really wanted to do was separate the "code" a bit. So most of the time I ...
135
votes
4answers
6k views

What is the use of percent signs (%) at the end of lines?

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?
11
votes
3answers
5k views

How display LaTeX code in LaTeX document?

I'm making Beamer presentation. How I can display LaTeX code inside presentation?
15
votes
1answer
426 views

Are there guidelines on how to read commented sources of LaTeX packages?

I'm trying to read source2e.pdf (texdoc source2e on the command line), but I'm stumped. It seems a rather mysterious tome to me. As I understand from this answer about what arguments a command ...
55
votes
5answers
4k views

Tool for cleaning LaTeX code

Is there something like indent for LaTeX? I have a collaborator that is using Scientific Workplace and the code it produces is totally messed up; I know I shouldn't expect miracles, but any machine ...