# I want to use latex to write a big document with three types of tables [closed]

Very concise (vague) question: (4th edit)

I want to use latex to write a big document with three types of tables (tableA,tableB,tableC), over time (dates), indexed by many keys(key1,key2,key3,...).

• Each table has a unique tag (label/bookmark) and show in the PDF as bookmark.
• The big document can be produced in chronological order. Or can be switch to produce all tableAs, all tableBs, then all tableCs.
• Automatically generate a matrix, showing for each key, the tables (using the tag/bookmark/label) associated.
• For each of the tables in the whole document, to produce a separate PDF at the same time, named using their tag/bookmark/label.

So it is 'one' question: (3rd edit)

I know what a 'minimal example' is, but what I want to do may be too much to put into a small example (compared to the one I have in 2nd edit, see below). So I am now editing this into 'one' question.

• Background: I will be training to become a Maths teacher (why I want to use latex for this if possible and not to much trouble) this September. For the paperwork I have to do, I need to have evidence to show I meet the teachers' standard.
• Three (main) types of forms: Reflective Log, Lesson Observation Form and Lesson Plan Form.
• Teachers Standards are labeled as 1.1,1.2,1.3,1.4,2.1,2.2,A,B,C,D ect.
• Each of the forms, will have at least 1 or several of the standards associated with it.

I want to have something like this:

1. Being able to write chronologically, so I will always write at the 'end' of the document. For example

\reflog{01 July 2015}{ standards }{ content of the form }
\obsform{01 July 2015}{ standards }{ content of the form }
\lessonplan{01 July 2015}{ standards }{ content of the form }

\reflog{02 July 2015}{ standards }{ content of the form }
\obsform{02 July 2015}{ standards }{ content of the form }

\obsform{03 July 2015}{ standards }{ content of the form }
\reflog{03 July 2015}{ standards }{ content of the form }

2. Being able to produce the document in the above order, and can be switched to produce, say all the \reflog together, and then \obsform and \lessonplan

3. Being able to index the standards. (see the picture at the end of the OP)

4. Being able to generate an 'automatic' bookmark label.

5. For each of the forms completed, being able to compile to a separate PDF file as well as in the whole big file.

Thanks.

Updated with some effect: (2nd edit)

I hope this is clearer by this example of what I have tried so far.

\documentclass[12pt]{report}

\usepackage{amsmath,enumerate}
\usepackage[top=1cm,bottom=1.5cm,left=1cm,right=1cm]{geometry}
\usepackage{booktabs}

\usepackage{makeidx}
\makeindex

%------------------------------------------------------------------
% define my own stuff %%
%------------------------------------------------------------------
\newcommand{\key}[1]{ #1 \index{#1} }
%------------------------------------------------------------------
\newenvironment{reflog}[5]
{
\cleardoublepage
\begin{center}
\textbf{ \large \sffamily Reflective Log -- #1} \\[2ex]
\begin{tabular}{ p{0.9\textwidth} }
\toprule \\
{ \sffamily Nature of activity: } \\[2ex]
#3 \\[2ex]
\hline \\
{ \sffamily What struck me as important or significant:} \\[2ex]
#4 \\[2ex]
\hline \\
{ \sffamily Implications for my own teaching:} \\[2ex]
#5 \\[2ex]
\hline \\
{ \sffamily Standards this provides evidence for:} \\[2ex]
#2 \\[2ex]
\bottomrule
\end{tabular}
\end{center}
}%
%------------------------------------------------------------------

\newenvironment{obsform}[7]
{
\cleardoublepage
\begin{center}
\textbf{ \large \sffamily Observing other teachers -- #1}
\end{center}
{ \footnotesize
\begin{itemize}
\item How did the teacher help the pupils understand what they were expected to learn?
\item What did the pupils do best at during the lesson, and why was that?
\item Which pupils participated most actively in the lesson, and why was that?
\item Focus on a few pupils e.g. boys, higher attainers, SEN, those who are reluctant to work. How did the teacher encourage them to join in, and what did they learn and do during the lesson?
\item What strategies did the teacher use to manage the learning activities, and to ensure that the pupils behaved well and got on with their work?
\item How did the teacher and pupils use the learning resources, and what contribution to the success of the lesson did the resources make?
\item What did the pupils learn during the lesson, and why was this?
\end{itemize}
}
%
\begin{tabular}{ p{\textwidth} }
\toprule \\
{ \sffamily Brief outline of lesson, with date, subject(topic) covered, and any key information on the class. } \\[2ex]
#3 \\[2ex]
\hline \\
{ \sffamily What seemed to be most successful, and why was this? NB use the above prompts.} \\[2ex]
#4 \\[2ex]
\hline \\
{ \sffamily What seemed to go least successfully, and why might this have been? NB use the above prompts.} \\[2ex]
#5 \\[2ex]
\hline \\
{ \sffamily Comments from discussing the lesson with the teacher afterwards:} \\[2ex]
#6 \\[2ex]
\hline \\
{ \sffamily Implications for my own teaching:} \\[2ex]
#7 \\[2ex]
\hline \\
{ \sffamily Standards this provides evidence for:} \\[2ex]
#2 \\[2ex]
\bottomrule
\end{tabular}
}
%------------------------------------------------------------------

\newenvironment{lessonplan}[3]
{
\cleardoublepage
\begin{center}
\textbf{ \large \sffamily Lesson Plan -- #1 -- #3}
\end{center}
\begin{tabular}{ p{\textwidth} }
\toprule \\
{ \sffamily Content } \\[2ex]
#3 \\[2ex]
\hline \\
{ \sffamily Standards this provides evidence for:} \\[2ex]
#2 \\[2ex]
\bottomrule
\end{tabular}
}
%------------------------------------------------------------------
% BEGIN Document %

\begin{document}
\pagestyle{empty}

\reflog{01 July 2015}{ \key{1.1},\key{1.4},\key{A},\key{1.5} }{
test test
}{
test test
}{
test test
}

\lessonplan{05 July 2015}{ \key{1.4} }{Y8}

\obsform{01 July 2015}{ \key{1.3},\key{3.4},\key{D},\key{1.5} }{
test test
}{
test test
}{
test test
}{
test test
}{
test test
}

\obsform{05 July 2015}{ \key{1.2},\key{2.2},\key{C},\key{F} }{
test test
}{
test test
}{
test test
}{
test test
}{
test test
}

\lessonplan{05 July 2015}{ \key{1.4},\key{1.5} }{Y10}

\reflog{05 July 2015}{ \key{1.4},\key{2.4},\key{A},\key{1.5} }{
test test
}{
test test
}{
test test
}

\cleardoublepage

\printindex

\end{document}


OK, now to be more specific, the problems remaining are:

1. How do I re-define \key{}, to be able to use \key{1.1,1.2,1.3} instead of using \key{1.1},\key{1.2},\key{1.3}
2. How do I make sure the whole document is in a particular order? For example, prints all the \reflogs and then all the \obsforms and then all the \lessonplans. Hopefully, I can also switch this off, so it prints in the order as I enter them.
3. I do not know how to make the bookmarks yet. So that \reflog{01 July 2015}{} has a bookmark 01July2015-RefLog. Or it could also be a big bookmark of Reflective Log and then use the dates as their bookmarks.
4. I have used \pagestyle{empty}, so that the page numbers are not shown as they are not important. How do I make the index using the bookmark labels (see item 3 above). The current index is the normal index using page numbers, which are useless in my case.
5. Is that possible to generate a separate PDF file for each of the customized \newenvironment as well as keeping them in the whole document?

Thanks!

Original Post:

I am not sure if there are packages which can already do this. But I will try my best to describe what exactly I want to do.

I have keywords like 1, 1.1, 1.2, 1.3, 2, 2.1, 2.2, 2.3 as well as A,B,C,D ect.

There are three types of documents I will be producing. Let’s say they are doc1,doc2,doc3 and I will be writing them on various days.

Doc1 on 01 July 2015, it shows 1.1 and 2 and B and C. Doc3 on 01 July 2015, it shows 2.2 and A.

Doc2 on 02 July 2015, it shows C. Doc3 on 02 July 2015, it shows 1.3 and D.

Doc1 on 03 July 2015, it shows 1 and C.

Doc3 on 04 July 2015, it shows A,B,C and D.

I will be writing them in a single latex document, and I hope to update them from time to time. Within these docX above, I am sure I need to find a way to define the keys, above, for example, like a label, \key{1.1} \key{1.2}? Or there are better ways?

What I want (hope) to produce is:

1 – Have a template for each of the document types, for example, can use commands like \doc1{}, \doc2{}, \doc3{}. Each of them starts on a newpage.

And if possible, they produce the content in the whole document as well as a separate PDF file named using the bookmark (see below) with the same content.

2 – For each of the document types and from different dates, to have a bookmark. Using the above example, like Doc1-01July2015, Doc3-01July2015, Doc2-02July2015, Doc3-02July2015, ect. Or using the date-document type format.

3 – Have an indexing table, like this:

All entries in the table are linked to the corresponding document, separated using a space.

## closed as unclear what you're asking by user31729, Mensch, Jesse, John Kormylo, cfrAug 27 '16 at 3:30

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• The table of contents mechanism can be adapted to this. The data is written out to the .toc file that can be read by either the main document or a separate document. – Andrew Swann Jul 5 '15 at 14:41
• This is not one question but many. The site works best when you ask one question per... well, per question. That way, each question addresses a specific issue which makes it easier to find for others with the same question and more likely to encourage answers which are helpful. Right now, to answer your question, you need somebody who knows how to do a whole bunch of quite different things. If you ask separate questions, different people may answer them because they have different expertise. [If different people answer different questions here, whose will you accept?] – cfr Jul 5 '15 at 15:40
• You don't need to keep posting the same code. A question about \key, for example, can just ask about that - no need for the stuff about the table you're using it in. That is minimal examples for each question will likely look quite different, even though they are all based on the same non-minimal code you're starting with. But sometimes it is hard to tell what goes with what, and what is easier solved together and what separately.... I do not, however, know of a reflog.sty or reflog.cls :( but you could try searching CTAN. – cfr Jul 5 '15 at 16:35
• I did not read the question because the question's title was too vague. I challenge you to find a title that is specific and shows what the question is about. When you've found the title I suggest you use it instead of the current title and see if you can use it as a guideline to improve the content of your question. – user10274 Jul 5 '15 at 20:38
• You cannot write to more than one PDF during a single compilation. Why not simply start a new file for each form, labelled by date, and then have various master files to input them when necessary? You can set this up so they can be compiled as standalone documents or, via a master, compile all forms of type A or all forms from date 1 or whatever. There are plenty of questions on this kind of approach already. – cfr Jul 5 '15 at 22:56