See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More

Template which can change

Course Queries Syllabus Queries
Max. 2000 characters

Priya Roy


( 6 months ago )

This question might be too general, but is something I thought about because I needed this in several different situations.

What I would like is to have a document of "problems" which I can solve. In general, this would be one page with a description of the problem, next the progress on the problem, some random thoughts and references.

Of course, I can just make a document with these sections and so on and so forth, but what if I decide say in a year that I actually want a different structure for my document? How I would do it is a save this as a file, say Super Cool Problem Bro.tex and then use in my main document \include{Super Cool Problem Bro.tex} in the page where I would like this.

So, maybe I have written all these files with my particular choices and I would like to do something simple like replace all the titles Literature with List of Relevant and Irrelevant Literature? This should be possible with some nice regex, but it does not feel like a good solution. What if I would like to add a section or switch the order?

So, I, naively, would make some kind of (flat file) database which has this data about my problems and then I would use a python script to generate my .texfiles from this according to my specifications. Right, but then I would be using python to generate the files and not LaTeX. Maybe there is some package or easy option which I am missing. It is also quite annoying to figure out after you are done there is a much easier option to go with. If you are doing research in mathematics this is quite common, but then the types of goals are different :-).

For the references at the bottom of each problem document I would be using chapterbib, which seems to be the right way to go (but of course, the stuff I describe above is what I am really wondering about).

Edit: Would "hacking" amsref be a good idea? They have bibliographies in the file itself which I could use as the "database". That could be remapped to an environment.

Ekta Singhania


( 6 months ago )

The following is a simplified MWE of my syllabi generation method. I have about 40 subfiles with up to 100+ alternate paragraphs I put together for any individual syllabus. I chose this approach 1) I want to only use LaTeX (albeit, some TeX commands). 2) I wanted to separate content from format. 3) I wanted to be able to make very large formatting changes each year with having to reenter the content. And 4) I did not want to have more that one copy of any text, but especially those paragraphs in a syllabus which must be the same in all courses I teach.

In the MWE I have provided two files. The first is where you would have a separate copy of this file for each of the different 'problems'. The second is the file where you define the format for the presenting of that specific data.

Now each data file is as follows:

\long\def\parta{Content of part a.  Content of part a.  Content of part a.  Content of part a.}
\long\def\partb{Content of part b.  Content of part b.  Content of part b.  Content of part b.}
\long\def\partc{Content of part c.  Content of part c.  Content of part c.  Content of part c.}
\long\def\partd{Content of part d.  Content of part d.  Content of part d.  Content of part d.}
\endinput % the is so that I can use the area below for comments without their being input or included.

Tailor these different parts to contain the different information in the problems.
Personally in my academic syllabi I have about 100+ of these canned paragraphs of which I then choose the ones needed for a specific syllabus.

It is important to note that this is only content without any section or paragraph titles and minimal format information. What is important is that each part is what I consider 'atomic' (indivisible) content.
Usually these are the independent paragraphs (tables, lists, etc) of the syllabus (for me).

e.g. For my syllabi, I have a file for: 1) each academic year, 2) each semester, 3) my personal professional details, 4) my department policy for that year, 5) that years academic calendar 6) each course. And some additional files.

I do not call the individual definitions parta, partb ... But, I use clear descriptive titles. However, I abide bye the strict rule of "atomic" pieces.

These are the data files and with careful use of usually \input (which just loads the definitions) or occasionally \include (which starts new page) I can build other documents. Note: I deliberately use \long\def rather than \newcommand because I am treating this as data and not a parametric commands. (If you plan to have parameters for these files then you should use the \newcommand and \renewcommand structure.

And here is an example 'master' file.

First version of the document using data
\input{bigdocdata} %Just change the file name used here to use data from a different problem
\item[Cool Title] \textbf{\parta}
\item[Cooler Title] \textit{\partd}
\item[Coolest Title] \texttt{\tiny\partb}
Another document using the same data


And the compiled output is:

what's your interest