Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!ut-emx!emx.utexas.edu From: young@emx.utexas.edu (Young U. Ryu) Newsgroups: comp.text.tex Subject: Re: FIGURE and BIBLIOGRAPHY questions (LATEX) Keywords: LaTeX, Figure, Table, Bibliography Message-ID: <39629@ut-emx.uucp> Date: 13 Nov 90 07:34:30 GMT Sender: young@ut-emx.uucp Organization: The University of Texas at Austin; Austin, Texas Lines: 155 rigoutso@ROBROY.NYU.EDU (Isidore Rigoutsos) asked the following questions. > 1) Is there any way to make the word "Figure" of the figure caption line be > *boldface*? %%% If you want both Figure (and Table) and following number %%% in boldface \catcode`@=11 \long\def\@makecaption#1#2{ \vskip 10pt \setbox\@tempboxa\hbox{{\bf #1}: #2} \ifdim \wd\@tempboxa >\hsize {\bf #1}: #2\par \else \hbox to\hsize{\hfil\box\@tempboxa\hfil} \fi} \catcode`@=12 %%% or alternatively \catcode`@=11 \def\fnum@figure{\bf Figure \thefigure} \def\fnum@table{\bf Table \thetable} \catcode`@=12 %%% If you want only Figure (and Table) in boldface \catcode`@=11 \def\fnum@figure{{\bf Figure} \thefigure} \def\fnum@table{{\bf Table} \thetable} \catcode`@=12 > 2) Is there any way to replace the word "Figure" of the figure caption line > with something like "Fig." or any given string for that matter? \catcode`@=11 \def\fnum@figure{Fig. \thefigure} %\def\fnum@table{Table \thetable} % You may change Table to anything you want \catcode`@=12 > 3) How can one get rid of the `:' (or replace it by `.') in the line > "Figure XX : "? \catcode`@=11 \long\def\@makecaption#1#2{ \vskip 10pt \setbox\@tempboxa\hbox{#1. #2} % was : instead of . \ifdim \wd\@tempboxa >\hsize #1. #2\par \else \hbox % was : instead of . to\hsize{\hfil\box\@tempboxa\hfil} \fi} \catcode`@=12 > 4) I would like to be able to draw a horizontal line of length \textwidth > immediatelly after the caption line of a figure. Is that possible? How can > it be done? If this is not possible, could I instead put a box around the > figure body? Note: Somebody posted the \boxfigure macro, long time ago. Sorry, I don't remember who. He/she should get the credit for this macro and the \boxtable macro, absolutely. I modified the \boxfigure macro just a little bit. %--------Start Here--------------------------------------------- % \boxfigure{pos}{wid}{text}: A figure with a box around it % % pos the usual figure placement arg: eg. htbp % wid the width of the figure, in some units: eg. 5in % text the contents of the figure, including % picture/caption/label/etc % \newlength{\boxwidth} \newcommand{\boxfigure}[3]{ \begin{figure}[#1] \setlength{\boxwidth}{#2} \addtolength{\boxwidth}{.1in} \centering \framebox[\boxwidth]{ \begin{minipage}{#2} \vspace*{10 pt} #3 \vspace*{5 pt} \end{minipage} } \end{figure} } % \boxtable{pos}{wid}{text}: A table with a box around it % % pos the usual table placement arg: eg. htbp % wid the width of the table, in some units: eg. 5in % text the contents of the table, including % tabular/caption/label/etc % \newcommand{\boxtable}[3]{ \begin{table}[#1] \setlength{\boxwidth}{#2} \addtolength{\boxwidth}{.1in} \centering \framebox[\boxwidth]{ \begin{minipage}{#2} \vspace*{10 pt} #3 \vspace*{5 pt} \end{minipage} } \end{table} } % use \fullboxwidth for arg 2 of boxfigure & boxtable to get box of % size \textwidth \newlength{\fullboxwidth} \setlength{\fullboxwidth}{\textwidth} \addtolength{\fullboxwidth}{-0.1in} %---------End Here---------------------------------------------- For example: \boxfigure{htb}{\fulltextwidth}{ \centering \begin{picture} LaTeX Picture Statements \end{picture} \caption{Blah Blah}\label{Foo} } > 5) Is there any way to replace the word "References" at the beginning of the > bibliography section by a given string? \def\thebibliography#1#2{\section*{#1\@mkboth {\uppercase{#1}}{\uppercase{#1}}}\list {[\arabic{enumi}]}{\settowidth\labelwidth{[#2]}\leftmargin\labelwidth \advance\leftmargin\labelsep \usecounter{enumi}} \def\newblock{\hskip .11em plus .33em minus .07em} \sloppy\clubpenalty4000\widowpenalty4000 \sfcode`\.=1000\relax} \let\endthebibliography=\endlist For example \begin{thebibliography}{My References}{99} \bibitem .... \end{thebibliography} %%%%%%%%%%%%%%%%%%%%%%%% Final Notes: If you include these macros in a XXX.sty file, you may not need \catcode`@=11 and \catcode`@=12. There may exist bugs ... :-) Young The Univ. of Texas at Austin