4
votes
1answer
56 views

Convert a latex command with parameter into a two begin end commands without parameter

I have defined a command \newcommand{\CV}[1]{\parbox[c]{0.2\textwidth}{\begin{flushleft}#1\end{flushleft}}} which I obviously have to call like \CV{My text} However I rather would like to use ...
5
votes
1answer
65 views

\savebox in page header with redefinable commands

I'm making a document class with some redefinable commands for page headers. However, I'm running into the following issue: \documentclass{article} \usepackage{fancyhdr} % In custom document class ...
6
votes
2answers
106 views

Using boxes to define an adjusting (Dirac) bracket

I'd like to define a set of adjusting bracket, called in physics Dirac brackets. This brackets accept three arguments, separated by vertical lines, and all of them are enclosed by angles, e.g. in ...
3
votes
1answer
142 views

Using \parbox in \resizebox

I tried resizing a \parbox-d text into a 5cm x 5cm square box (without keeping the aspect ratio). The output is absolutely strange to me, even if I don't specify the height. Couldn't find the ...
3
votes
1answer
70 views

Using savebox around the BODY of environ

I tried to use a \savebox around the \BODY macro of \NewEnviron. Can I keep the linebreaks somehow (they are gone, in the MWE)? \documentclass{article} \usepackage{environ} \newsavebox{\mybox} ...
8
votes
1answer
97 views

Implement functionality equivalent to many thousand \savebox

I have a large (approx 600 pages) index of files, and for each file entry significant computation is required so that additional links can be added. The computation of these links takes quite a bit ...
7
votes
1answer
74 views

Is there a switch to turn off LaTeX counters from inside a box?

I know that amsmath typesets at least twice its material, the first one for measurement and that it takes measures (sic) to avoid some counters being updated twice. Is there a switch a macro writer ...
3
votes
1answer
355 views

Create an environment like the `checkboxes` in exam.cls

I am having trouble on how will i create something like the checkboxesor oneparcheckboxes environment in exam.cls. The only difference is that since the checkboxes gives circle, i'd like to create ...
0
votes
0answers
37 views

Create two small box after text? [duplicate]

how should i declare a command for two small boxes after text in every line? based from this link Create a two column static small box. I need to remove the automatic printing of its numbers. What ...
15
votes
4answers
390 views

Reasons for saving a box?

I've been reading through a number of answers that use \newsavebox to save the contents of a box. As far as I can tell it's a workaround for fragility of some kind. Is that right? If not, what is the ...
2
votes
1answer
385 views

Create a two column static small box

how can I create a new command to make a static true and false as labels of the first and two columns. This columns are lanes of small boxes. This small boxes would depend on the questions created. If ...
13
votes
2answers
235 views

Persuading (la)tex “silently to go beyond the envelope of 'good taste' ” to avoid an overfull hbox

My understanding, based on reading this website, is that (la)tex performs at most three passes when trying to typeset a paragraph: one based on \pretolerance, one based on \tolerance, and one based on ...
1
vote
1answer
88 views

How to output the choices of the questions inside a box?

I plan to create a command where I can use to output the choices inside the box and above the list of questions but its a know how. This is a sample output of what i am saying. I will use the ...
3
votes
1answer
164 views

Aligning three small box together with a text

I made through creating the boxes inside a box with help of an expert by this link Is three boxes inside a box posibble in latex Now im being troubled on how will i put into command to align this ...
0
votes
1answer
418 views

Create a static box in LaTeX

How can I make a command to automate the creation of a box? This box would enclose texts or statements, questions and the like when the command is used. Example:
7
votes
1answer
198 views

Savebox equivalent of \csname?

I would like to define a command which would increment a counter, and create a new savebox whose name is generated from the counter value. Something like: \documentclass{article} ...
12
votes
3answers
672 views

Use \bgroup and \egroup to set some pre and post code to a macro

Why isn’t it possible to use \bgroup and \egroup in this way? \documentclass{article} \def\precode{\fbox\bgroup} \def\postcode{\egroup} \newcommand{\mymacro}[1]{\precode#1\postcode} ...
9
votes
2answers
862 views

How to avoid underfull vbox in combination with \vsplit?

In the following example I am using the command \vsplit. I can't see the reason why \vsplit produced an overfull \vbox \documentclass{article} \parindent0pt \def\exampletext{Text Text Text Text Text ...
6
votes
3answers
233 views

New command for a height-flexible rect

I'm trying to create a command that will take in one argument and create a rectangle around that number of empty lines. I have the following: \newcommand{\putansbox}[1]{ \framebox[\textwidth]{ ...
5
votes
2answers
2k views

Grey box code and lists

I've got that code from a website to make grey areas in my LaTeX document. % http://www.alfredklomp.com/programming/tex/macros/ \long\def\greybox#1{% \newbox\contentbox% \newbox\bkgdbox% ...
3
votes
1answer
234 views

Defining my own “boxes”?

What I want is a environment that lets me create my own "boxes" (or blocks? I keep confusing them...) with the following properties They visually couple together a piece of sourcecode and a ...
6
votes
1answer
450 views

Why there is no output when invoking \usebox{\mybox} outside the minipage in which \sbox{\mybox}{contents} is invoked?

\documentclass{article} \newsavebox{\mybox} \begin{document} \fbox{% \begin{minipage}{5cm} \sbox{\mybox}{from first minipage} \usebox{\mybox} \end{minipage}% } %nothing rendered ...