11
votes
1answer
110 views

Defining a particular environment in LaTeX

I need help writing an Example environment. I just want it to look like the figure below which I took from an old book I have in my library. This is what I have done. ...
3
votes
1answer
74 views

Define new align environment based on the old one

I am aware that there are plentiful similar questions, but since (even after several reading) I don't understand the the answers, I am unable to apply them to my problem. I simply want to define a ...
4
votes
1answer
105 views

Why am I getting a “perhaps a missing \item” error in my custom epigraph environment?

I have tried to customised a new environment for epigraphs in a book. This page should have no fancy headers or anything alike. It should only have a list of one or more epigraphs. To that end I am ...
2
votes
2answers
213 views

Insert a character in the beginning of each line in a special verbatim environment

How can I insert a special character or a symbol in the beginning of each line in a verbatim environment? In particular, there is a constraint that applies to the verbatim environment: it must be of a ...
13
votes
2answers
605 views

Format a verbatim paragraph

How can I format a verbatim paragraph? I.e. break, fill and join input lines to produce globally balanced output with the lengths of each line approaching the target \textwidth as closely as possible. ...
10
votes
4answers
359 views

Is there a ready solution to typeset a diff file?

In a text about Git I want to typeset diffs similar to this visualization: Commit details on GitHub. Is there any ready-made solution to that, especially the coloring of the diff lines? (In other ...
0
votes
2answers
141 views

How do I make frame environment play nice with \textbf?

I am getting a strange error message when I put textbf into a frame environment. Minimal Example \documentclass{article} \listfiles \begin{document} \begin{frame} \textbf{Lemma 1} \end{frame} ...
11
votes
1answer
261 views

New list environment: automatic enumeration with “a posteriori” format

This is a follow-up question to Nested enumerate labels with parent label appended plus a single set of enclosing parentheses First and foremost, sorry for my English, I'm learning it currently. ...
8
votes
1answer
165 views

How do I adjust the placement of descriptions I've made alongside enumerated statements within a boxed theorem environment?

Basically, what I'd like is to have an elegant command that would enable descriptions (commutativity, associativity, etc.) made alongside enumerated statements to be aligned to the far right side of ...
2
votes
1answer
548 views

Homework template

I've been using this homework template I found online that is pretty light. I am very new to using LaTeX, and although I find writing basic mathematical expressions easy, some of the cooler more ...
4
votes
1answer
110 views

An environment with custom justification

I would like to create an environment called "question" with one argument (being the question number) with a certain alignment/justification. How might I define one so that it comes out like how it ...
6
votes
2answers
507 views

Problem with \renewcommand in LaTeX

Please consider the following code: \documentclass[11pt,twoside,openany]{book} \usepackage[svgnames,x11names]{xcolor} \usepackage{wallpaper} \usepackage{changepage} \usepackage[explicit]{titlesec} ...
3
votes
1answer
167 views

New environment. Highlight content with symbols and indentation

I'm writing my thesis and I want to highlight some part of my text which resides in a separate paragraph. I like the well-known example of \newenvironment{king} {\rule{1ex}{1ex}\hspace{\stretch{1}}} ...
4
votes
1answer
590 views

Dynamically use RTF-Code in latex-document

I'm looking for a way to dynamically use Rich-Text-Format code in a latex document. The background is this: I want to paste formatted programming-source from visual studio into my latex code because ...
2
votes
1answer
58 views

Auto including the section into an (pre-defined) environment

There is a coherency problem in the following text (its typesetting). The last paragraph must not be considered as a part of subsect02. For instance it is a kind of conclusion of two approaches ...
3
votes
1answer
62 views

Formatting text using `…` only in one specific environment

I would like to make the character ` active in one environment so that `some text` will be formatted using black background and white for the text. This feature must be activated only inside the ...
5
votes
1answer
207 views

Changing the font for a custom environment

I can't figure out how to embed a command like \textbf or something in a newly created environment, I have: \newenvironment{definition} {\begin{quote}} {\end{quote}} I want to customize my ...
5
votes
2answers
899 views

Environment with first paragraph in bold and no pagebreaks

I would like to setup a new environment which typesets the first paragraph in boldface, the following paragraphs in normal text, and with (possibly) no pagebreaks between the first paragraph and the ...
4
votes
2answers
1k views

\bgroup and \egroup?

So I've been looking to expand on the following bit of code (a hack to not screw up the margins when using oversized figures): \noindent\makebox[\textwidth]{% \begin{tabularx}{1.5\textwidth}{XX} ...
16
votes
3answers
980 views

Formatting FAQ lists in LaTeX

I want to format a list of "Question + Answer" pairs in a TeX-document. In HTML I use the <dl> command: http://www.w3.org/TR/html401/struct/lists.html, e.g.: <dl> ...
4
votes
1answer
192 views

converting documentclasses into environments: is it possible?

Rewritten question. For my phd-project i need to quote screenplays. I would like to keep the screenplay layout in my thesis. I know there is the document class called screenplay. Now i am wandering ...
12
votes
2answers
1k views

Define an “escape underscore” environment

I am writing a text document in LaTeX where I need a lot a words with underscores: foo_bar_1, more_bar_2_long_expression_3. I know about the underscore package, but for some reason the [strings] ...
3
votes
2answers
267 views

“Problem description” to look like abstract

I would like to have my "Problem Description" to have the same look/layout as abstract. Any way I can "clone" the the abstract command? preamble: \documentclass[pdftex,10pt,b5paper,twoside]{report} ...