Tag Info

Hot answers tagged

8

Document classes The standard classes report and book and the KOMA-Script classes scrreprt and scrbook do not store the chapter title in macros. Class memoir uses three internal macros for the chapter title and its variations for the table of contents and the header lines: \chapter[title in table of contents][title in header line]{title in body} Then ...


7

This is very interesting problem. So I tried to solve this in my favorite macro package, i.e. plain TeX. You can be inspired by this and you (or somebody else) can try to re-implement these ideas to LaTeX. We need to set the \output routine in order to do the specified page design. I din't do this (for sake of simplicity and for the reason that plain TeX ...


6

Here's a more dynamic approach in which you do not have to write out each of the vertices' names. \documentclass{article} \usepackage{etoolbox} \usepackage{tkz-berge} \def\myInstance#1#2{$#1_{#2}$} \newcommand\aeAssignLabels[3]{%% \let\myexecutable\relax \foreach \myn in {#3} {%% \ifx\myexecutable\relax ...


6

Since you don't want numbering, use \setcounter{secnumdepth}{0} \documentclass{article} \setcounter{secnumdepth}{0} \begin{document} \section{A section} \subsection{A sub section} \subsubsection{A sub sub section} \end{document}


3

You have to nest the definition in this way: \makeatletter \def\@seccntformat#1{% \expandafter\ifx\csname c@#1\endcsname\c@section\else \expandafter\ifx\csname c@#1\endcsname\c@subsection\else \expandafter\ifx\csname c@#1\endcsname\c@subsubsection\else \csname the#1\endcsname\quad \fi\fi\fi} \makeatother MWE \documentclass{article} ...


3

As mentioned in the comment you can simply use this: \newtheoremstyle{theorem} {1.5em} % Space above {} % Space below {\itshape} % Body font {} % Indent amount % Indent amount: empty = no indent; \parindent = normal paragraph indent {\bfseries\itshape} % Theorem head font {} % Punctuation after theorem head {1em} % Space after theorem head % Space after ...


3

The answer that you linked to does tell you how to add the labels. You first need to stop the labels being printed using \SetVertexNoLabel and then you need to manually specify the labels that you want using \AssignVertexLabel: Here's the full code to manually change the labels: \documentclass{article} \usepackage{tkz-berge} \begin{document} ...


3

The documentation for termcal mixes the code itself with the instructions, which can sometimes be a bit confusing. In the code of the package, the macro \calprintclass is defined (this is the command you mention in your question.) So to change it (to anything) you need to use \renewcommand not \newcommand. In your case you want to eliminate it altogether, ...


3

Your numbering doesn't really make sense: 1.1.1 <-- by section 1.1.1.1 <-- by subsection 1.1.1.2 <-- by subsection 1.2 <-- by chapter* 1.2.2.1 <-- by subsection The reference by chapter should start again from 1. To achieve a "restart numbering from every sectional unit" approach, you can use the following setup: ...


3

I do not see the benefit of using such complicated equation numbers. Numbering equations within sections is more than enough IMHO. Nevertheless, the additional level can be suppressed, if the subsection counter is zero. Also \numberwithin does not define a transitive closure. Thus the equation number needs to be reset for each \section, too. ...


2

Add also subsection to the reset list of chapter and then redefine \thefigure to look what's the deepest non zero counter. \documentclass[12pt,a4paper]{report} \usepackage[titles]{tocloft} % one usually wants the `titles` option \usepackage{graphicx} \usepackage{chngcntr} \setlength{\cftfignumwidth}{4em} \counterwithin*{subsection}{chapter} ...


2

Using \numberwithin{equation}{subsection} changes the counter output format and shifts the resetting of the equation counter from section to subsection level (i.e. each time \stepcounter{subsection} is used. However, this means that an orphane equation after a \section, but before \subsection will just use the old counter value, from a previous equation. ...


2

Forget my comment. Beamer provides four macros for this purpose \beamer@savecounter: save the specific counter; \beamer@restorecounter: restore the saved counter; \beamer@labelsavecounter: save the specific counter under the label; \beamer@labelrestorecounter: restore the saved counter. So the remaining problem is: where and how can I insert those ...


2

One way is to change the table counter formatting command \thetable, which is very likely \thechapter.\arabic{table} to \arabic{table} only and reset to the old behaviour it after the relevant chapter. This can be with the \let saving mechanism. Some more explanation: The \newcounter command allows for an optional 2nd argument which contains the driver ...


2

Use the package caption and \caption* inside the table environment


2

Here is how i managed to solve it However, I was wondering if there is a more "automatic" way in LyX


2

That code is aimed to just do the removal from sections. However, in order to remove numbering, the easiest way is to set secnumdepth to 0: \setcounter{secnumdepth}{0} I'll show also how to improve the code you were given for doing several tests. \makeatletter \renewcommand\@seccntformat[1]{\csname prepend@#1\endcsname} ...


2

buf_size is essentially the maximum size of a single input line although it is also used for some macro expansion, so it is the line after tex macros expanded. So either (most likely) your input document has no newlines and is all on one line or you have a very big tex expansion loop, or an infinite expansion loop. You can increase the value in texmf.cnf ...


2

You can use book and then it has \frontmatter for the very same purpose. (Same is possible with memoir, you can always change the tocdepth) \documentclass[a4paper,12pt]{book} \begin{document} \frontmatter \tableofcontents \chapter{Declaration} \chapter{Preface} \chapter{Abstract} \mainmatter \chapter{Introduction} \chapter{Topics in Claims Reserving} ...


1

\documentclass{book} \usepackage{sectsty} \sectionfont{\centering} \renewcommand{\thesection}{\S\,(\roman{section})} \begin{document} \chapter{Introduction} \section{section 1} \chapter{Topics in Claims Reserving} \section{section 1} \section{section2} \chapter{Conclusion} \end{document}


1

The following reproduces the problem: \documentclass{book} \renewcommand{\thechapter}{\thepart.\arabic{chapter}} \begin{document} \tableofcontents \chapter{A chapter} \section{A section} \end{document} Note that \thechapter is defined to include \thepart.. Also, the part counter is typically set using \Roman (as in ...


1

This has already been answered here: Continuous v. per-chapter/section numbering of figures, tables, and other document elements But here is a minimal example which should do what you're looking for. \documentclass{book} \renewcommand{\theequation}{\arabic{equation}} \begin{document} \chapter{One} \begin{equation} 1-1=0 \end{equation} \chapter{Two} ...


1

Use an auxiliary counter, say numberofquestions which is increased each time the row counter is increased, but not reset with a new column. Since there is token expansion involved, it's necessary to write the number explicitly as \number\value{numberofquestions} instead of \thenumberofquestions (which replaced \the\rowNo in this code. After a new page, ...


1

This uses \renewcommand{\thechapter}{...} to change the chapter counter format to be either \arabic{chapter} or \Ordinalnumber{chapter}, depending on the conditional \ifarabicappendix. Say \arabicappendixtrue to get the number output, otherwise keep it to \arabicappendixfalse for the output Appendix First etc. However, if the 'number' format of the ...


1

This is a quick solution with the cntperchap package (I am quite familar with its author ;-)) The key is to register counters which should be tracked on a per chapter base, here it is the section counter. Then use the \GetStoredCounterValue[chapter number]{section} macro to get the number of sections in the relevant chapter. This does not print the number ...


1

The following example remembers the section count in the .aux file. A counter abs@chapter is used to identify the chapter. Thus also starred or unnumbered chapters are supported. \section is redefined to write a line in the .aux file, which increases the number of sections for the current chapter. Also starred \section commands are supported. In the next ...


1

This uses a patch to the \@sect command, writing explicit arabic numbers to the ToC instead of the \thesection. However, this is a quick hack, all *section types will just use \arabic{*section}. As long this is no issue, the code is ok. \documentclass{report} \usepackage{xpatch} \makeatletter \xpatchcmd{\@sect}{% \protect\numberline{\csname ...


1

To change [ Figure 1 about here ] to [ Figure 1.3 about here ] you can redefine \thepostfigure and \theposttable: \renewcommand\thepostfigure{\arabic{chapter}.\arabic{postfig}} \renewcommand\theposttable{\arabic{chapter}.\arabic{posttbl}} and then use this in conjunction with \processdelayedfloats \setcounter{postfig}{0} \setcounter{posttbl}{0} at the ...


1

Issue 2: Package alphalph provides formatting commands for counters, which uses a limited set of symbols. There are different methods for extending the allowed range of values. The default method is the method of the question and shown in the example below. Issue 1: If the counter formatting command of the previous paragraph is used, then the counter values ...



Only top voted, non community-wiki answers of a minimum length are eligible