Search found 11 matches

by kostka
Fri Apr 02, 2010 5:26 am
Forum: General
Topic: Framed box with label vertically centered over top line
Replies: 2
Views: 1095

Re: Framed box with label vertically centered over top line

Yep, I was able to use /raisebox to do this, along with a bunch of other things. I'll post the solution here, but keep in mind it relies on several things in my own style file, including /ssp which sets spacing to single space. What's really nice for me about this is the text within the environment ...
by kostka
Fri Apr 02, 2010 2:11 am
Forum: General
Topic: Framed box with label vertically centered over top line
Replies: 2
Views: 1095

Re: Framed box with label vertically centered over top line

Found out about \raisebox, which might work for what I want. I'll post an update at some point.
by kostka
Fri Apr 02, 2010 12:05 am
Forum: General
Topic: Framed box with label vertically centered over top line
Replies: 2
Views: 1095

Framed box with label vertically centered over top line

Basically, on the top line of an fbox, I'd like the line to be interrupted by a label. I've attached a pdf file that shows exactly what I'm after. Is there a way to do this? I'm not looking for someone to do the work for me, but some direction would be nice. I've tried using a tabular environment, b...
by kostka
Thu Feb 18, 2010 10:53 pm
Forum: General
Topic: Use unbalanced brackets in /newenvironment
Replies: 10
Views: 10608

Re: Use unbalanced brackets in /newenvironment

Okay, this seems to work perfectly: \documentclass{minimal} \usepackage{fancybox} \newlength{\boxedeqnlen} \newenvironment{equationbox}{\vspace{1em}\\% \begin{Sbox}\setlength{\boxedeqnlen}{\linewidth}% \addtolength{\boxedeqnlen}{-2\fboxsep}% \addtolength{\boxedeqnlen}{-2\fboxrule}% \begin{minipage}{...
by kostka
Thu Feb 18, 2010 10:19 pm
Forum: General
Topic: Use unbalanced brackets in /newenvironment
Replies: 10
Views: 10608

Re: Use unbalanced brackets in /newenvironment

Thanks for the replies, but I still haven't found a solution. The closest I can get using lrbox (or sbox) is: \documentclass{minimal} \newsavebox{\mybox} \newenvironment{equationbox} {\begin{lrbox}{\mybox}\begin{math}} {\end{math}\end{lrbox}\\% \fbox{\begin{minipage}{\linewidth}% \begin{equation}\us...
by kostka
Thu Feb 18, 2010 12:52 am
Forum: General
Topic: Use unbalanced brackets in /newenvironment
Replies: 10
Views: 10608

Re: Use unbalanced brackets in /newenvironment

frabjous wrote:Did you try the solution using fancybox and the Sbox environment?

...


Thanks! This needs some work to get spacing how I want, but it will work.

I'm going to mark this topic as solved, but I'm still surprised there isn't an easy way to use unbalanced brackets inside of an argument.
by kostka
Thu Feb 18, 2010 12:18 am
Forum: General
Topic: Use unbalanced brackets in /newenvironment
Replies: 10
Views: 10608

Re: Use unbalanced brackets in /newenvironment

[...] I suppose using the framed environment would work as well, as long as the functionality is identical to fbox, but I'd still like to know if the scenario in the OP is possible. Don't suppose, just test. The framed package as suggested by frabjous is the solution to your scenario. But for empha...
by kostka
Wed Feb 17, 2010 9:59 pm
Forum: General
Topic: Use unbalanced brackets in /newenvironment
Replies: 10
Views: 10608

Re: Use unbalanced brackets in /newenvironment

Can you just use the framed environment from the framed package? Or the Sbox environment of fancybox ? For this example, yes, but what I actually want is a lot more complicated. I just wanted the example to be quickly understood for anyone reading this forum. I actually want to convert something cl...
by kostka
Wed Feb 17, 2010 9:44 pm
Forum: General
Topic: Use unbalanced brackets in /newenvironment
Replies: 10
Views: 10608

Use unbalanced brackets in /newenvironment

I want to use unbalanced brackets in the start and end arguments of /newenvironment Example: I want to somehow define \newenvironment{boxthis} { \fbox{ } % <-- note this is unbalanced { } } % <-- note this is unbalanced, but balances with the brackets in the above such that \begin{boxthis} this text...
by kostka
Tue Sep 15, 2009 9:28 am
Forum: General
Topic: check if a parameter is empty
Replies: 2
Views: 37887

Re: check if a parameter is empty

Thanks very much, I like that format the best. I also found the following way to do it:

  1. \usepackage{ifthen}
  2.  
  3. \newcommand{\card}[1]{
  4. \ifthenelse{\equal{#1}{}}{Empty.}{Nonempty.}
  5. }


Tim

Go to advanced search