How to put characters in latex

Perhaps there is a package for this, but I could not find it. If this does not exist, I will be grateful for ideas on how to do ithis. Basically, I need something that will be field characters. Something like that:

------- | A| L| - - - ... | 2| 3| ------- 

Knut has something similar in TAOCP when he discusses the word MIX ... but without the bottom.

So, the character and some other char or characters below. Any ideas? (I foresee tumbleweed) ...

Thanks.

+4
source share
5 answers

You can use \raisebox to fix the vertical height. See the example at the end of this discussion of blocks . Since you can put the boxes inside the boxes, I think something like this is the answer (gives me something similar to your example).

 Some text. \framebox[1.1\width][s]{ \parbox[b]{7.2ex}{ \raisebox{2.0ex}{ \framebox[1.6\width][s]{A} \framebox[1.6\width][s]{L} } \raisebox{0ex}{ \framebox[1.6\width][s]{2} \framebox[1.6\width][s]{3} } } } Some more text. 
+3
source

Sorry, but I have too little reputation to leave a comment. So what do you need is a window around each letter without disturbing the flow of text? What about

 \framebox{x}? 

I don’t know enough about latex, but you should look at creating your own Latex makro, where it is done for each letter that you pass to the new command. Admittedly, this is a kind of brute force ...

+4
source

Here is a basic loop that puts each character (virtually every token, so it won’t work if it has macros):

  \ documentclass {article}
 \ makeatletter
 \ newcommand \ eachboxed [1] {%
   \ @tfor \ @ii: = # 1 \ do {%
     \ fbox {\ strut \ @ii}%
   }%
 }
 \ makeatother
 \ begin {document}
 \ eachboxed {hello}
 \ end {document}

Not sure if this concerns your problem.

+3
source

If the table is not what you want, and I think crunchdog is right, and that is what you want, maybe fbox. Both of them are well described in the usual LaTeX information sources.

+1
source

My instinct is to go with \framebox for individual instances or small groups and use the tabular environment for a more complex situation (usually this means setting up a table ).

0
source

All Articles