Linked Questions

0
votes
0answers
43 views

About renewcommand [duplicate]

I'm new to LaTeX and I was wondering how to write a command that gives me \left\{A,B\right\}. I want to renew this command like \poisson, for example. If someone could help me, I will be very ...
298
votes
5answers
92k views

What is the difference between \def and \newcommand?

Inspired by a question about \let and \def, I have some that essentially all boil down to asking What are the differences between \def and \newcommand? In particular, I wonder Is it possible to ...
14
votes
1answer
876 views

LaTeX programming Inheritance with \newcommand \newenvironment \renew… etc

I'd like to create (or renew) several LaTeX commands and environments, and understand how it works. One of my new environments would be equivalent to \begin{quotation}. So, imagine my \begin{foo} ...
5
votes
4answers
1k views

Change Content Font in tabular Environments

I am trying to change the font in the content of all of the tables in a document from a serif font to a sans-serif font. Specifically, I need something that can be applied to tabular and tabular* ...
5
votes
3answers
559 views

create environment that resizes content

I want to create an environment that puts its content within a minipage as wide as the current page. The environment would work as follows: \begin{FitToWidth} HELLO \end{FitToWidth} and produce a "...
4
votes
1answer
5k views

How to use case 1, case 2 in a proof (IEEE confs)

I want to show: proof: Case 1: ..... Case 2: ..... in a proof. The following is my rough codes: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \begin{proof} \...
2
votes
1answer
1k views

Latex \newcommand usage

I would like to simplify the way to type indicator functions. So I used package bbm and defined \newcommand{\1}{\mathbbm{1}} But I actually want something like \mathbbm{1}_{XXX}=\newcommand{1}{XXX}. ...
2
votes
2answers
611 views

how to define newcommand that takes []{} as arguments and not {}{}?

I find myself doing a lot of things like this below in order to compile document for both pdf and tex4ht \ifdefined\HCode \includegraphics[width=0.5\paperwidth]{foo.eps} \else \includegraphics[...
5
votes
2answers
248 views

How can I use a list stored in aux and insert its output into a tikz node?

# Update 2015-03-19 Better Answer Found This question is part of a trail of questions. The goal mine was to use this list inside of a tikz node, but I removed that from previous questions in the ...
3
votes
1answer
907 views

\usepackage for \newenvironment

I am trying to create a package called lessonPlanner in which I declare some new environments via \newenvironment So I have something like ... mwe.tex \usepackage{lessonPlanner} \begin{document} ....
2
votes
1answer
1k views

Calling macro fails with error \inaccessible

I am trying to define a macro which I will include in a class definition. For the time being I put the macro definition in the normal document. Compiling the following document fails. \documentclass[...
5
votes
1answer
243 views

Examples of table of contents in pure TeX

I'd like to try to create a document structure and table of contents in pure TeX. Does anyone know of any resources or examples to do this? My purpose is mainly educational, to learn how to write ...
4
votes
1answer
459 views

How to fix sizes between different fonts

actual problem: How to make a second font the same "actual" size of the first one. \documentclass[a4paper, 12pt]{scrreprt} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \...
3
votes
2answers
692 views

newcommand: passing coordinates as a single argument

Is it possible to pass an array argument to newcommand and then access those individual array elements? For example, if I wanted to multiply the third element of the array (first argument) by the ...
2
votes
1answer
853 views

Creating a Problem Environment

I'm trying to learn how to make new environments, namely I want to make a "problem environment" for examples of problems, and the algorithms that solve them. Optimally I would like it to use a ...

15 30 50 per page