{environments} is for general questions related to (La)TeX environments. For questions about environment subcategories like {lists}, {quoting} environments, or {floats} use the appropriate tag instead.

learn more… | top users | synonyms (3)

2
votes
0answers
44 views

newenvironment using pgfplotstable

I want to have a newenvironment body as an inline input argument for pgfplotstable. Is it possible to do this without using braces in the body itself? \documentclass{article} ...
8
votes
1answer
56 views

Defining a reusable string from within an environment

I write documents that rely heavily on the 'enumerate' environment. I'd like to turn any particular item from within that environment into a variable that I can use elsewhere. The idea is to ensure ...
5
votes
2answers
110 views

Memoir boxed example environment

Memoir's manual has this example of frame with title environment. I was wondering how can I add a counter to it? Say, to mimic the AMS theorem environments. Any better way of achieving this in memoir ...
4
votes
2answers
39 views

vspace mysteriously being inserted after nested custom environment

I have created my own environment that creates a table using tabu and then puts some vertical space after it, unless my environment is being nested, in which case I want it to skip the vertical space. ...
0
votes
0answers
37 views

Problems with Korean characters and ArXiv

Here is the minimum working example. \documentclass[12pt]{article} \title{Sample} \author{Me} \pagenumbering{gobble} ...
3
votes
1answer
42 views

How to define an environment that takes a number of arguments and produces a table

What is the best way to create an environment that takes a number of arguments, like this: \finding{% Text argument #1, Text argument #2, Text argument #3, Text argument #4} and produces something ...
0
votes
1answer
34 views

CJKvert affecting all CJK in document

My document has been compiling very well (thanks in no small part to Tex SX!), but I seem to have hit a snag. I added a more complicated dedication to the beginning of my thesis (using \dedication ...
3
votes
3answers
92 views

How can I split this equation?

Does anyone know how to split this equation in two lines? \begin{equation*} \iint_S \eta = \iint_S \left[F(x(u,v), y(u,v), z(u,v)) \ \frac{\partial(x,y)}{\partial(u,v)} + G(x(u,v), y(u,v), z(u,v)) \ ...
1
vote
0answers
38 views

How do I make a new command with author/journal/year citation in footnote

\documentclass{beamer} \usepackage[backend=bibtex]{biblatex}%backend=biber, natbib=true, style=chem-acs \bibliography{oralspaper} \DeclareCiteCommand{\citejournal}%%%creating \citejournal command ...
2
votes
1answer
63 views

How can I escape the scope of an environment?

Is there any way to escape the scope of an environment, e.g. to get the \pgfplotsset command in the MWE below have an effect on the subsequent plot? (I know that \newcommand doesn't have this ...
1
vote
0answers
21 views

How to continue a framed box which is defined in floating environment [duplicate]

I have defined a floating environment. It defines a framed box using \mdframe. Here is the code I used. \documentclass{article} \usepackage{mdframed} \usepackage{lipsum} \usepackage{caption} ...
3
votes
2answers
60 views

Hide content of tabular environment [duplicate]

I would like to create a pdf file that containes only the table captions, but not the content of the table. So I tried to redefine the tabular environment in the preamble of my document (it is ...
3
votes
0answers
45 views

Define new command which insert environment [duplicate]

Am i able to do something like this: (without defining new environment) \newcommand{\code}[2] { \begin{lstlisting}[language=#1] #2 \end{lstlisting} } I don't want to write: ...
1
vote
1answer
40 views

changing font in a particular environment

For a book, I want to change the default font in the Examples environment (declared in the same way as theorem) to the usual roman (not italic) so that there are not very large areas of italic font. ...
6
votes
2answers
108 views

copy and reuse the content of an environment

is there a way to embed an text in several environments (or structures, \chapter, \section etc.) in one file and "copy"/insert the content of single environment items in other files? i've noticed the ...
10
votes
3answers
361 views

Defining a list environment with multiple optional arguments

I'm trying to define a list environment with multiple optional arguments and with a default values for those arguments. For example, creating a new environment with a name newenv, which accepts two ...
4
votes
1answer
86 views

Getting pages where an environment is located

I am trying to create a new environment that sticks a watermark in the background. Specifically, I have something like \usepackage{background} \newenvironment{\watermarked}{ ...
5
votes
1answer
125 views

New environment for minipage and colorbox

I would like to create a new environment that would automate the following code: \setbox0=\hbox{\begin{minipage}{5.8in} \color{black} \begin{verbatim} <Some verbatim text here> \end{verbatim} ...
3
votes
1answer
66 views

Minted In A New Environment

I'm trying to enclose Minted in a new environment as follows: \documentclass{article} \usepackage{minted} \usepackage{mdframed} \usepackage[varqu]{zi4} \definecolor{codebggray}{rgb}{0.95,0.95,0.95} ...
2
votes
0answers
102 views

Checking if first portion of an environment's content is empty

Motivation: I am working on a very personalized Exercise/Answer package for my colleagues. The exercise, exsheets, etc. packages don't do what I need. To accomplish this, I create an exercises ...
2
votes
1answer
79 views

Why the renewcommand doesn't work as I expect?

I re-defined two environment \newtheorem{exmp}{Example} \newenvironment{examp}{\begin{exmp}}{\renewcommand{\proofname}{Sol.}\end{exmp}} ...
4
votes
2answers
1k views

Lyx 2.0 Formatted references to theorem/lemma/claim environments

In Lyx 2.0, I'm trying to use a formatted reference to a claim, but I cannot get the "formatted" part, i.e. I can't get it to typeset "claim" as well as the claim number. I'm using modules "Theorems ...
1
vote
1answer
221 views

Acrostic Environment

I tried to wrote the code of an environment for acrostics, using cenverse and boldfirst, but it doesn't work (probably because cenverse use // and boldfirst not). \newcommand\dob[1]{\textbf{#1}} ...
0
votes
1answer
58 views

Automatic parsing/extraction of single-argument commands from input (for use in new environment)?

I'm not sure whether this is in principle possible, so let me try to explain; consider this MWE: \documentclass{article} \usepackage[showframe]{geometry} \usepackage{tikz} \usetikzlibrary{calc} ...
10
votes
3answers
3k views

Defining a command for amsmath's align environment

I'd like to define a shorthand command for \begin{align*} and \end{align*}. When I write \newcommand{\ba}{\begin{align*}} it works fine. But when I write \newcommand{\ea}{\end{align*}} ...
1
vote
0answers
44 views

Making a textpos command being transparent

I am defining my own margin notes command and I have a question about making a command "transparent". To be more clear, I have the following code : \documentclass{article} ...
7
votes
2answers
109 views

convert a \newcommand to \newenvironment

I have defined a command as follows \newsavebox{\textsix} \newcommand{\bottomr}[1]{\sbox{\textsix}{\parbox{11cm}{\begin{flushright} #1 \end{flushright}}}} which save the parameter (text) of the ...
2
votes
2answers
51 views

set section environment to be math only, amsmath's begin{gather}

I want to create a small formulary, and for that virtually every line has to be math formulas. I use the gather-environment from the package amsmath, for example: ...
2
votes
1answer
48 views

Square brackets in in the `description' of the theorem environment [duplicate]

The following code works fine \begin{theorem}[Euler] Blah \end{theorem} But whenever I try to use square brackets in the description I get an error. \begin{theorem}[The set $[0, 1]$ is compact] ...
2
votes
1answer
137 views

Can a chapter style environment be used for appendix formatting?

I have started including appendices in my thesis to collate common information for each separate \part section so as to make the script concise and to the point. I am using a KOMA-Script document ...
0
votes
1answer
134 views

Change words in a Tikz picture every page

I'd like to create a template, as below. But I'd like to make it so that I can have multiple pages of the same layout and be able to easily replace "Header 1" and "Header 2" with different words each ...
3
votes
2answers
39 views

having custom caption in listing

I would like to have my custom name for my listing, how can I do that. here is my code: \documentclass[12pt,a4paper]{scrreprt} \usepackage{listings} \lstloadlanguages{R} \lstset{% general command ...
3
votes
1answer
63 views

\newlist vs. \newenvironment for defining an individual list style

as far as I know, there are two ways of defining an individual list style: 1) Use the enumitem package and the \newlist and \setlist commands 2) Define an individual environment like the following ...
2
votes
0answers
67 views

Remove bibliography headings with multibib and tocbibind

I use multibib which creates two families of citation commands: pri and sec. I would like to get rid of bibliography headings for the \bibliographypri and \bibliographysec commands while keeping the ...
4
votes
1answer
46 views

Reducing the distance in textbf environment

I want to introduce a notation for concatenating vectors in a manuscript that I represent vectors with bold characters, $\textbf{x}$. The problem is defining it like $\textbf{x}:\textbf{y}$ introduces ...
4
votes
1answer
91 views

Detect actual start of text

I have conditional which is sometimes suppressed, and if it gets typeset needs to be noted. If the conditional text begins with an environment which adds vertical space prior to the actual start of ...
3
votes
2answers
172 views

tikzpicture to create a first page with an image in background taking the whole page

I am trying to create a newsletter with Latex, but I am not expert at all. My goal is, for the moment, to create a first page (the cover), with an image in the background, and some text overprinted. ...
2
votes
1answer
66 views

(Re-)Setting the currents section name from within the section

I am trying to reset the currents section from somewhere "whithin" the section, but after the \section command. Is that even possible with the way LaTeX works? I know, it is possible to use the title ...
5
votes
2answers
86 views

Collecting contents of LaTeX environment

I have the following for collecting contents of an environment and printing them later, it works but for my real task i want to use the environ package because i need to be able to have access to ...
0
votes
0answers
38 views

Help with “environment” problem

I am new to LaTeX. I want to write a report which will contain math symbols and equations. I began like this \documentclass{article} \begin{4 week report} \ body \end{4 week report} ...
6
votes
1answer
127 views

Macro, new command or new environment for code?

I am using the listings package to typeset code. I have defined a custom style using \lstdefinestyle{verbo} and then typeset code in a lstlisting environment as in the following MWE. ...
5
votes
2answers
251 views

(La)TeX equivalent of MS Word's “Don't add space between paragraphs of the same style”

I'm using a quote environment to add some references at the beginning of sections with two custom commands. If I have more than one reference, the \list nature of the environment automatically adds ...
13
votes
2answers
745 views

Combine minted and tcolorbox

I have the idea to combine minted with tcolorbox. At first, I have created my own minted environments: \newminted[mycsharp]{csharp}{tabsize=2,fontsize=\footnotesize} ...
0
votes
0answers
19 views

image into framewithtitle environment (memoir class)

I need to add image or figure into boxes for my phd document, so i try using the framewithtitle environment defined in page 276 of memoir class documentation. % !TEX encoding = UTF-8 Unicode % -*- ...
5
votes
1answer
50 views

Have something like figure but with its own counter and listof

Given the following MWE: \documentclass[english]{scrartcl} \usepackage{syntax} \begin{document} \begin{figure} \begin{grammar} <example> ::= \[[ \lit{def} <identifier> \lit{=} ...
5
votes
1answer
107 views

Redefine verbatim environment

I have a text with source code, which I would like to display. I am using pandoc, so I have to use either verbatim or listings enviroment. Unfortunately, I can't use listings package (due to ...
3
votes
2answers
52 views

How to align the new environment

I have to define the new environment, similar to the proof environment. I learned on our site how to define it, but I do not know how to customize it. In particular, I design a book by using gsm ...
1
vote
1answer
86 views

How to make my sty file work only inside a environment?

Say for example, i have a bibpattern.sty which consists of some latex commands (like \COMMENT). I want this bibpattern.sty to work only inside \begin{thebibliography} ... \end{bibliography}. The same ...
4
votes
2answers
111 views

Setting vertical margins on top and below align* environment

I'm using the amsmath align* environment to format multi line formulas. Unfortunately, the environment adds a lot of margin before and below the formula. I found only one solution to get rid of this ...
5
votes
2answers
165 views

“itemize” or “enumerate” IN section headings

Is it possible to use lists WITHIN section headings, subsection headings, etc.? I wanted to do so like \documentclass[11pt]{scrartcl} \usepackage{enumerate} %... \begin{document} \section{My three ...