I have assigned to do the following task. Since I am not good at Latex I am wondered its possibilities.
I would like to assign parameter while developing document. EX:
file1.tex
\chapter chapter_name1 [arg1=true]or [arg1]
file2.tex
\chapter chapter_name2 [arg1][arg2]
\include<file3> (here it should go to file3.tex and again checks there relevant argument in order to include correct chapter/section)
file3.tex
\section chapter_name1 [arg2][arg3]
\subsection sunsection_name [arg4]
myfile.tex
it has some loops and parser to split input parameters in order to include relevant files.
At time of compiling at terminal I should decide(by passing arguments) which chapter will be inserted into myfile.pdf file.
EX:
pdflatex "\def \parameter {arg2 arg3} input{myfile.tex}"
Then myfile.pdf should have
chapter_name2
section_name1
I have heard about xargs and xkeyval packages but I hardly understand it. Still I am not sure how it will help me.
Is my task possible?
If so, please suggest me what I should do?
To avoid confusions i have modified the question.
I have large set of contends for the user. For different user I would like to show different contents. for this I would like to produce different output by showing and not showing some of the contents (say chapters sections subsection)of the document.
My Idea is: while writing chapter/section I declare it is show able to which kind of user by setting argument to true or false.
if user1==true then it should be there in user1.pdf
for example
Macro is (ex): \Modifiedchapter [bool arg1][bool arg2][bool arg3]
\Modifiedchapter <chapterName1> [user1==true][user2==false][user3==false]
\Modifiedchapter <chapterName2> [user1==true][user2==true][user3==false]
\Modifiedsection <sectionName1> [user1==true][user2==true][user3==true]
If I pass user1 and user3 as 'True', then my output should contain
command (ex) : "\def\arg1=true, arg2=false, arg1=true \input{myfile}"
chapterName1
sectionName1
How can I do this?
\includefeature is used, then packageaskincludeasks on the terminal during compilation which include files are to be used. – Heiko Oberdiek Apr 07 '13 at 21:23