List of Algorithms - Caption Modification
I have a style file for my univerity thesis format, which for the most part does the job. Only trouble is that if redefines the lists of figures and tables and doesn't provide for lists of algorithms. I would, of course, like the list of algorithms to match the others, but I know almost nothing about latex. I copied all references to lists of tables and figures and changed them to refer to algorithms, and it almost works. The last problem is that the code that makes the lot and lof double spaced doesn't seem to run on the algorithms. I've included just this code. Can anyone tell me why it is not being run on the algorithm captions? (I can also provide the whole style file if it would help.) Thanks for any help, Brett Jones applicable code -- % LIST OF FIGURES \def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{LIST OF FIGURES\@mkboth {LIST OF FIGURES}{LIST OF FIGURES}} \singlespace \@starttoc{lof}\if@restonecol\twocolumn\fi \addtocontents{lof}{\noindent Figure \hfill Page} \addtocontents{lof}{\vskip 2ex} \doublespace } % indentation of figure caption in LOF \def\l@figure{\@dottedtocline{0}{0em}{3em}} % LIST OF TABLES % \def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{LIST OF TABLES\@mkboth {LIST OF TABLES}{LIST OF TABLES}} \singlespace \@starttoc{lot}\if@restonecol\twocolumn\fi \addtocontents{lot}{\noindent Table \hfill Page} %% \addtocontents{lot}{\vskip 2ex} \doublespace } % LIST OF ALGORITHMS % \def\listofalgorithms{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{LIST OF ALGORITHMS\@mkboth {LIST OF ALGORITHMS}{LIST OF ALGORITHMS}} \singlespace \@starttoc{loa}\if@restonecol\twocolumn\fi \addtocontents{loa}{\noindent Algorithm \hfill Page} %% \addtocontents{loa}{\vskip 2ex} \doublespace } % indentation of table caption in LOT \let\l@table\l@figure \let\l@algorithm\l@figure \def\b{} % a dummy definition used below % Add an extra space between 2 captions in list of figures or tables. % Also, place a period after the number. \long\def\@caption#1[#2]#3{\par\addcontentsline{\csname ext@#1\endcsname}{#1}{\protect\numberline{\hfill\csname the#1\endcsname.\hspace{1em}}{\ignorespaces #2}} \addtocontents{\csname ext@#1\endcsname}{\vskip 2ex} % enable list of tables/figures when the first table/figure is found \ifnum \csname c@#1\endcsname = 1 \immediate\write\@auxout{\string\globaldefs1} % enable LOT/F in aux file \immediate\write\@auxout{\string\b\csname ext@#1\endcsname true} \immediate\write\@auxout{\string\globaldefs0} \fi \begingroup \@parboxrestore \normalsize \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par \endgroup}
List of Algorithms - Caption Modification
I have a style file for my univerity thesis format, which for the most part does the job. Only trouble is that if redefines the lists of figures and tables and doesn't provide for lists of algorithms. I would, of course, like the list of algorithms to match the others, but I know almost nothing about latex. I copied all references to lists of tables and figures and changed them to refer to algorithms, and it almost works. The last problem is that the code that makes the lot and lof double spaced doesn't seem to run on the algorithms. I've included just this code. Can anyone tell me why it is not being run on the algorithm captions? (I can also provide the whole style file if it would help.) Thanks for any help, Brett Jones applicable code -- % LIST OF FIGURES \def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{LIST OF FIGURES\@mkboth {LIST OF FIGURES}{LIST OF FIGURES}} \singlespace \@starttoc{lof}\if@restonecol\twocolumn\fi \addtocontents{lof}{\noindent Figure \hfill Page} \addtocontents{lof}{\vskip 2ex} \doublespace } % indentation of figure caption in LOF \def\l@figure{\@dottedtocline{0}{0em}{3em}} % LIST OF TABLES % \def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{LIST OF TABLES\@mkboth {LIST OF TABLES}{LIST OF TABLES}} \singlespace \@starttoc{lot}\if@restonecol\twocolumn\fi \addtocontents{lot}{\noindent Table \hfill Page} %% \addtocontents{lot}{\vskip 2ex} \doublespace } % LIST OF ALGORITHMS % \def\listofalgorithms{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{LIST OF ALGORITHMS\@mkboth {LIST OF ALGORITHMS}{LIST OF ALGORITHMS}} \singlespace \@starttoc{loa}\if@restonecol\twocolumn\fi \addtocontents{loa}{\noindent Algorithm \hfill Page} %% \addtocontents{loa}{\vskip 2ex} \doublespace } % indentation of table caption in LOT \let\l@table\l@figure \let\l@algorithm\l@figure \def\b{} % a dummy definition used below % Add an extra space between 2 captions in list of figures or tables. % Also, place a period after the number. \long\def\@caption#1[#2]#3{\par\addcontentsline{\csname ext@#1\endcsname}{#1}{\protect\numberline{\hfill\csname the#1\endcsname.\hspace{1em}}{\ignorespaces #2}} \addtocontents{\csname ext@#1\endcsname}{\vskip 2ex} % enable list of tables/figures when the first table/figure is found \ifnum \csname c@#1\endcsname = 1 \immediate\write\@auxout{\string\globaldefs1} % enable LOT/F in aux file \immediate\write\@auxout{\string\b\csname ext@#1\endcsname true} \immediate\write\@auxout{\string\globaldefs0} \fi \begingroup \@parboxrestore \normalsize \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par \endgroup}
List of Algorithms - Caption Modification
I have a style file for my univerity thesis format, which for the most part does the job. Only trouble is that if redefines the lists of figures and tables and doesn't provide for lists of algorithms. I would, of course, like the list of algorithms to match the others, but I know almost nothing about latex. I copied all references to lists of tables and figures and changed them to refer to algorithms, and it almost works. The last problem is that the code that makes the lot and lof double spaced doesn't seem to run on the algorithms. I've included just this code. Can anyone tell me why it is not being run on the algorithm captions? (I can also provide the whole style file if it would help.) Thanks for any help, Brett Jones applicable code -- % LIST OF FIGURES \def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{LIST OF FIGURES\@mkboth {LIST OF FIGURES}{LIST OF FIGURES}} \singlespace \@starttoc{lof}\if@restonecol\twocolumn\fi \addtocontents{lof}{\noindent Figure \hfill Page} \addtocontents{lof}{\vskip 2ex} \doublespace } % indentation of figure caption in LOF \def\l@figure{\@dottedtocline{0}{0em}{3em}} % LIST OF TABLES % \def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{LIST OF TABLES\@mkboth {LIST OF TABLES}{LIST OF TABLES}} \singlespace \@starttoc{lot}\if@restonecol\twocolumn\fi \addtocontents{lot}{\noindent Table \hfill Page} %% \addtocontents{lot}{\vskip 2ex} \doublespace } % LIST OF ALGORITHMS % \def\listofalgorithms{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn \fi\chapter*{LIST OF ALGORITHMS\@mkboth {LIST OF ALGORITHMS}{LIST OF ALGORITHMS}} \singlespace \@starttoc{loa}\if@restonecol\twocolumn\fi \addtocontents{loa}{\noindent Algorithm \hfill Page} %% \addtocontents{loa}{\vskip 2ex} \doublespace } % indentation of table caption in LOT \let\l@table\l@figure \let\l@algorithm\l@figure \def\b{} % a dummy definition used below % Add an extra space between 2 captions in list of figures or tables. % Also, place a period after the number. \long\def\@caption#1[#2]#3{\par\addcontentsline{\csname ext@#1\endcsname}{#1}{\protect\numberline{\hfill\csname the#1\endcsname.\hspace{1em}}{\ignorespaces #2}} \addtocontents{\csname ext@#1\endcsname}{\vskip 2ex} % enable list of tables/figures when the first table/figure is found \ifnum \csname c@#1\endcsname = 1 \immediate\write\@auxout{\string\globaldefs1} % enable LOT/F in aux file \immediate\write\@auxout{\string\b\csname ext@#1\endcsname true} \immediate\write\@auxout{\string\globaldefs0} \fi \begingroup \@parboxrestore \normalsize \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par \endgroup}
Two latex questions
I have two latex questions if anyone has a minute to help me. First, I cite a reference in a figure caption, but don't like that it shows up in the TOF. Is there a way to show the reference in the figure caption, but not in the TOF? Second, I have a couple LARGE figures that just about fill the page. Trouble is, that they cover the page numbers in the std report format. Actually, it's OK when that happens, but sometimes they don't cover the page number, and the caption ends up beneath it. Is there a way to either turn off or reposition the page number, just for the page that a float ends up on? Thanks for any help. Brett
Two latex questions
I have two latex questions if anyone has a minute to help me. First, I cite a reference in a figure caption, but don't like that it shows up in the TOF. Is there a way to show the reference in the figure caption, but not in the TOF? Second, I have a couple LARGE figures that just about fill the page. Trouble is, that they cover the page numbers in the std report format. Actually, it's OK when that happens, but sometimes they don't cover the page number, and the caption ends up beneath it. Is there a way to either turn off or reposition the page number, just for the page that a float ends up on? Thanks for any help. Brett
Two latex questions
I have two latex questions if anyone has a minute to help me. First, I cite a reference in a figure caption, but don't like that it shows up in the TOF. Is there a way to show the reference in the figure caption, but not in the TOF? Second, I have a couple LARGE figures that just about fill the page. Trouble is, that they cover the page numbers in the std report format. Actually, it's OK when that happens, but sometimes they don't cover the page number, and the caption ends up beneath it. Is there a way to either turn off or reposition the page number, just for the page that a float ends up on? Thanks for any help. Brett
Re: Algorithm Float Reference
Dekel Tsur wrote: On Fri, Mar 16, 2001 at 02:21:16PM -0600, Brett Jones wrote: Interesting - when trying to create a short example, I find that it only breaks when I include the hyperref package. I'm pretty much a novice when it comes to latex... am I using it wrong? You can put the following line in the preamble: \newcommand{\theHalgorithm}{\arabic{algorithm}} Worked like a peach. Many thanks.
Re: Algorithm Float Reference
Dekel Tsur wrote: On Fri, Mar 16, 2001 at 02:21:16PM -0600, Brett Jones wrote: Interesting - when trying to create a short example, I find that it only breaks when I include the hyperref package. I'm pretty much a novice when it comes to latex... am I using it wrong? You can put the following line in the preamble: \newcommand{\theHalgorithm}{\arabic{algorithm}} Worked like a peach. Many thanks.
Re: Algorithm Float Reference
Dekel Tsur wrote: > On Fri, Mar 16, 2001 at 02:21:16PM -0600, Brett Jones wrote: > > Interesting - when trying to create a short example, I find that it only breaks > > when I include the hyperref package. I'm pretty much a novice when it comes to > > latex... am I using it wrong? > > You can put the following line in the preamble: > > \newcommand{\theHalgorithm}{\arabic{algorithm}} Worked like a peach. Many thanks.
Algorithm Float Reference
Hi, Is it possible to insert a label in an algorithm float and reference later (a la table floats, figure floats)? I get an error at the reference (not \def'ed) when I try to do it. (I'm using the report class, 1.1.6fix1 from the rpm). Thx, Brett
Re: Algorithm Float Reference
Herbert Voss wrote: Is it possible to insert a label in an algorithm float and reference later (a la table floats, figure floats)? I get an error at the reference (not \def'ed) when I try to do it. (I'm using the report class, 1.1.6fix1 from the rpm). can you give a short example-file? Interesting - when trying to create a short example, I find that it only breaks when I include the hyperref package. I'm pretty much a novice when it comes to latex... am I using it wrong? Brett -- begin lyx file --- #LyX 1.1 created this file. For more info see http://www.lyx.org/ \lyxformat 218 \textclass report \begin_preamble \usepackage[dvips]{hyperref} \end_preamble \language american \inputencoding auto \fontscheme default \graphics default \paperfontsize default \spacing single \papersize Default \paperpackage a4 \use_geometry 0 \use_amsmath 0 \paperorientation portrait \secnumdepth 2 \tocdepth 2 \paragraph_separation indent \defskip medskip \quotes_language english \quotes_times 2 \papercolumns 1 \papersides 1 \paperpagestyle default \layout Standard This is an example file. See Algorithm \begin_inset LatexCommand \ref{algEx} \end_inset please. \begin_float alg \layout LyX-Code This is an example \layout Caption \begin_inset LatexCommand \label{algEx} \end_inset An example \end_float \the_end
Algorithm Float Reference
Hi, Is it possible to insert a label in an algorithm float and reference later (a la table floats, figure floats)? I get an error at the reference (not \def'ed) when I try to do it. (I'm using the report class, 1.1.6fix1 from the rpm). Thx, Brett
Re: Algorithm Float Reference
Herbert Voss wrote: Is it possible to insert a label in an algorithm float and reference later (a la table floats, figure floats)? I get an error at the reference (not \def'ed) when I try to do it. (I'm using the report class, 1.1.6fix1 from the rpm). can you give a short example-file? Interesting - when trying to create a short example, I find that it only breaks when I include the hyperref package. I'm pretty much a novice when it comes to latex... am I using it wrong? Brett -- begin lyx file --- #LyX 1.1 created this file. For more info see http://www.lyx.org/ \lyxformat 218 \textclass report \begin_preamble \usepackage[dvips]{hyperref} \end_preamble \language american \inputencoding auto \fontscheme default \graphics default \paperfontsize default \spacing single \papersize Default \paperpackage a4 \use_geometry 0 \use_amsmath 0 \paperorientation portrait \secnumdepth 2 \tocdepth 2 \paragraph_separation indent \defskip medskip \quotes_language english \quotes_times 2 \papercolumns 1 \papersides 1 \paperpagestyle default \layout Standard This is an example file. See Algorithm \begin_inset LatexCommand \ref{algEx} \end_inset please. \begin_float alg \layout LyX-Code This is an example \layout Caption \begin_inset LatexCommand \label{algEx} \end_inset An example \end_float \the_end
Algorithm Float Reference
Hi, Is it possible to insert a label in an algorithm float and reference later (a la table floats, figure floats)? I get an error at the reference (not \def'ed) when I try to do it. (I'm using the report class, 1.1.6fix1 from the rpm). Thx, Brett
Re: Algorithm Float Reference
Herbert Voss wrote: > > Is it possible to insert a label in an algorithm float and reference later (a > > la table floats, figure floats)? I get an error at the reference (not > > \def'ed) when I try to do it. (I'm using the report class, 1.1.6fix1 from > > the rpm). > > can you give a short example-file? > Interesting - when trying to create a short example, I find that it only breaks when I include the hyperref package. I'm pretty much a novice when it comes to latex... am I using it wrong? Brett -- begin lyx file --- #LyX 1.1 created this file. For more info see http://www.lyx.org/ \lyxformat 218 \textclass report \begin_preamble \usepackage[dvips]{hyperref} \end_preamble \language american \inputencoding auto \fontscheme default \graphics default \paperfontsize default \spacing single \papersize Default \paperpackage a4 \use_geometry 0 \use_amsmath 0 \paperorientation portrait \secnumdepth 2 \tocdepth 2 \paragraph_separation indent \defskip medskip \quotes_language english \quotes_times 2 \papercolumns 1 \papersides 1 \paperpagestyle default \layout Standard This is an example file. See Algorithm \begin_inset LatexCommand \ref{algEx} \end_inset please. \begin_float alg \layout LyX-Code This is an example \layout Caption \begin_inset LatexCommand \label{algEx} \end_inset An example \end_float \the_end