Skip to main content

All Questions

Tagged with
3 votes
3 answers
362 views

Replace each letter of a given word with blank boxes

I would like a command that takes a word and replaces each letter with a box. For example, the output of The mystery word is \mycommand{hello}. should be The mystery word is □□□□□.
Garf's user avatar
  • 510
1 vote
0 answers
48 views

New environment as a single box [closed]

I am making my new environment for headings. It is as follows: \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \begin{document} \newlength{\headspace} \setlength{\headspace}{3mm ...
Vladimir's user avatar
  • 589
0 votes
2 answers
104 views

Why are braces mandatory in boxes?

Both \hbox and \vbox (and similar box commands) require explicitly to enclose their content inside of curly braces, so they behave differently from macros. What's the reason of this specification? If ...
User's user avatar
  • 2,530
0 votes
0 answers
26 views

Ensure that box does not exceed a number of linebreaks

I have made a box that I do not want to exceed 22 lines. If it does it will overlap with some other text which is not desirable. How can I ensure that the text will not have more than 22 lines? I had ...
Vebjorn's user avatar
  • 1,884
6 votes
2 answers
191 views

Unexpected newline (catcode magic)

I am playing with Tex catcodes and hboxes. The following code should produce three lines of output: A...1... B...2... C...3... However, for some reason it makes a line break between A and ...1..., ...
zuz's user avatar
  • 87
1 vote
2 answers
393 views

Create an adapted pgfpicture with fixed width for RTL context

Here an example of fixed width pgfpicture in RTL context (lualatex engine) \documentclass{article} \usepackage{pgf} \usepackage[showframe]{geometry} \parindent0pt \begin{document} \pagedir TRT \...
Salim Bou's user avatar
  • 17.1k
5 votes
1 answer
451 views

When should I use a \box register rather than \def? [duplicate]

\def is sometimes used as an abbreviation of a box construction, then its output is sometimes the same as the output with a \box register instead of \def. Here is the question. When should I use a \...
agnagic's user avatar
  • 535
3 votes
1 answer
207 views

An understanding trouble with \framebox

I'm reading More Math Into LaTeX, and it introduces the command of \framebox at section 3.9.2 on page 91-92. There are the two following code examples which show different output: \framebox{\makebox[\...
smallk's user avatar
  • 33
4 votes
2 answers
308 views

Different macro behavior when used in another macro

Please consider the following MWE : \documentclass{article} \newcommand{\mymargin}{\hspace*{3em}} \newcommand{\innerbox}[1]{\mymargin\fbox{#1}\mymargin} \newcommand{\outerbox}[1]{\fbox{#1}} \begin{...
user30654's user avatar
1 vote
1 answer
70 views

Inclosing \section in \vbox failed with: "Something's wrong--perhaps a missing \item. }"

I wanna put some complex commands (e.g. \section and \chapter) inside a box (\vbox) so later I can compute the height of the block contains the text. Here is the full example: \documentclass[11pt]{...
jiun's user avatar
  • 193
0 votes
3 answers
2k views

Box equivalent to shortstack but allowing to change line spacing

I need a text box that works absolutely equivalent to \shortstack, notably multiline has horizontal alignment option vertically aligned to top does not need me to specify height/width but adjusts ...
Patrick Storz's user avatar
5 votes
3 answers
5k views

Continuing solution frame for exams

New edit: The proposed answer by magula, which used to work with version 2.5 of exam.cls no longer works with the current version 2.603. The following was included as a note for version 2.601: "We ...
Daniel W. Farlow's user avatar
3 votes
1 answer
716 views

"Something's wrong--perhaps a missing \item" error in \newenvironment using a \vtop box

In attempting an answer to "How to label a list / make a line before list stick with the list?" I answered using a \vtop box to contain the entire list including the label. I then, trying to improve ...
A Feldman's user avatar
  • 3,955
6 votes
2 answers
2k views

Can two \vtop boxes exist side by side?

So I am trying to see if I can put two \vtop boxes side by side. The below is the closest I have gotten. This is a kind of a "plain-tex in latex" example. \documentclass[fontsize=13pt,letterpaper,]{...
A Feldman's user avatar
  • 3,955
3 votes
2 answers
2k views

edit the minimum length of \hfill

Once again I have a pretty special problem: I'd like to edit the minimum length of \hfill. According to de.wikibooks it is a TeX primitive. Therefore, I assume, that it can't be edited. What is it ...
MaestroGlanz's user avatar
  • 2,348

15 30 50 per page