Αποτελέσματα Αναζήτησης
I am looking to create a very simple, very basic nested table of contents in php which gets all the h1-6 and indents things appropriately. This means that if I have something like: <h1>content</h1> <h2>more content</h2> I should get: content more content.
To create the table of contents is straightforward, the command \tableofcontents does the job. Sections, subsections and chapters are included in the table of contents. To manually add entries, for example when you want an unnumbered section, use the command \addcontentsline as shown in the following example:
20 Δεκ 2011 · tocbibind: can be used to add the ToC and/or bibliography and/or the index etc. to the table of contents. tocvsec2: gives control over section numbering and/or the entries in the table of contents on a section by section basis. etoc: (released a year after OP) claims a different approach than other toc packages.
12 Αυγ 2010 · A table of contents (ToC) is produced by inserting \tableofcontents at the appropriate place in your document. Note that you need at least two LaTeX runs to produce the ToC (LaTeX collects the data for the ToC in the first run and typesets it in the second run).
LaTeX will use the section headings to create the table of contents and there are commands to create a list of figures and a list of tables as well. I will give a small example code to create a table of contents first: \documentclass{article} \begin{document} \tableofcontents.
25 Φεβ 2014 · This code example is what @chmhughes referred to as a minimal working example (MWE), which you should be able to compile. There are a couple of things to note with this example: 1) This code shows you the basic workings of how to include sections and subsections in your content page.
Produce a table of contents, or list of figures, or list of tables. Put the command in the input file where you want the table or list to go. You do not type the entries; for example, typically the table of contents entries are automatically generated from the sectioning commands \chapter , etc.