Sorry for my English, I'm French and it's my first post on this forum, but I'm a frequent visitor of this forum, thanks for all ;)
My problem is this : I'm working with transcriptions of 35 interviews (1000 pages) and I'm trying to build a command (environment or package?) to mark my linear text with some (sub)commands (margin braces, highlighting) in a first part, and after, copy and redirect this marked text to a thematic classification in a second part.
My idea : I'd like to use my command in the text like this:
\marque{#1}{#2}{#3}{#4}{#5}
or
\begin{\marque}{#1}{#2}{#3}{#4}#5\end{\marque}
I need 3 functions for this command:
- to mark paragraphs (
#5) of the first part with 5 specific layouts, according to#1value - text (
#5) and titles (#2 #3 #4) extraction for driving to a tree structure (maybe in 5 files: his.tex phi.tex com.tex sem.tex est.tex) - integrate this new structure with titles and text to the 2nd part (without layouts from part 1)
Details of the command:
{#1}= title 1 (which doesn't appear in part 1) associated with a layout
- if#1=[his]
- layout=
\encadre - drive to his.tex
- layout=
- if#1=[phi]
- layout=
\accoladedroite - drive to phi.tex
- layout=
- if#1=[com]
- layout=
\parentgauche - drive to com.tex
- layout=
- if#1=[sem]
- layout=
\surlignage - drive to sem.tex
- layout=
- if#1=[est]
- layout=
\crochetdroit - drive to est.tex file
- layout=
{#2}= title 2 which appears in both parts
- appear in the layout (so included in the layout command:
\marque{#2}=\crochetdroit{#1}) - drive on the associated file (#1) in a made section, otherwise create a new section named #2 (the new text of #2)
- if #2 doesn't correspond with any section in #1 file, write at end
\section{titre 2}(for example in file his.tex) - if #2 corresponds with a section in #1 file, (ex: his.tex), do nothing
- if #2 doesn't correspond with any section in #1 file, write at end
{#3}= title 3 which appears in both parts
- appear in the layout
- drive
- if #3 doesn't correspond with any subsection in #1 file and
\section{#2}, write at end of this section\subsection{title 3} - if #3 corresponds with subsection in #2 section in #1 file, do nothing
- if #3 doesn't correspond with any subsection in #1 file and
{#4}= title 4 which appears in both parts
- appear in the layout
- drive (like #3) to make a
\subsubsection{title 4}
{#5}= text which appears in both parts
- appear in the layout
- drive
- appear under
\subsubsection{#4}of\subsection{#3}of\section{#2}of #1 file (ex: his.tex)
To include texts from files to part 2, after part 1 \part{Les interviews}, write part 2:
\part{L'analyse}
\chapter{Histoire}
\include{his.tex} %(or \input ?)
\chapter{Philosophie}
\include{phi.tex}
\chapter{Communication}
\include{com.tex}
\chapter{Sémantique}
\include{sem.tex}
\chapter{Esthétique}
\include{est.tex}
See example illustrated in document attached:
\part{Les interviews}
\chapter{Interview 1}
\marque{his}{Inspiration}{Expiration}{}{text 1
\marque{com}{thèse}{Action 136}{}{text 2
\marque{phi}{Steak}{Pastèque}{Aztèque}{text 3
\marque{est}{Uchronie}{Carotte}{}{text 4}
\marque{est}{Anachronie}{C}{V}{text 5}
\marque{est}{Reconstitution}{Carotte}{Carotte}{text 6}
\marque{est}{Achronie}{L'actrice}{La Lapistou 1567}{text 7}}}
text 8
\marque{est}{5678 The}{action}{veste}{text 9}
text 10}

And, in the second part:
Histoire
Inspiration
Expiration
texte 1-2-3-4-5-6-7-8-9-10
Philosophie
Steak
Pastèque
Aztèque
texte 3-4-5-6-7
Communication
Thèse
Action 136
texte 2-3-4-5-6-7
Sémantique
Esthétique
Uchronie
Carotte
texte 4
Anachronie
C
V
texte 5
Reconstitution
Carotte
Carotte
texte 6
Achronie
L'actrice
Le lapistou 1567
texte 7
5678 The
action
vest
texte 9
So! I know how to make layout (sub)command, for example, the \parentgauche command, or \temporal
\newcommand\parentgauche[4]
{\par
\smallskip
\makebox
[\textwidth][r]
{$\rotatebox[origin=c]{90}{#1}
\rotatebox[origin=c]{90}{\color{gray}#2-\textit{#3}}
\left(
\begin{minipage}{\textwidth}#4\end{minipage}
\right.
\nulldelimiterspace=0pt$}
\par
\smallskip}}
\newcommand{\choixcouleur}[1]
{\ifthenelse{\equal{#1}{uchronie}}{\sethlcolor{Apricot}}{}%
\ifthenelse{\equal{#1}{achronie}}{\sethlcolor{Tan}}{}%
\ifthenelse{\equal{#1}{anachronie}}{\sethlcolor{Salmon}}{}%
\ifthenelse{\equal{#1}{reconstitution}}{\sethlcolor{Peach}}{}}
\newcommand{\temporal}[4]
{\choixcouleur{#1}\hl{#4}\footnote{{\textbf{#1}#2\textit{#3}}}}
But, I don't know how to built commands to: - copy/paste (I know cut/paste, but I need the text in part 1) - extract, - write in another file, - drive in this file.
Maybe it's better to create files not only for chapter, but also for section subsection & subsubsection too?
That's my config:
\documentclass{scrbook}
\usepackage{fontspec}
\usepackage{xltxtra}
\usepackage{xunicode}
\usepackage[applemac]{inputenc}
\usepackage{lmodern, textcomp}
\usepackage[T1]{fontenc}
\usepackage[frenchb]{babel}
\frenchbsetup{FrenchFootnotes=false}
\usepackage{eco}
\usepackage[babel,french=guillemets*]{csquotes}
\usepackage[protrusion=true,expansion=true]{microtype}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{soul}
\usepackage{multicol}






!then we can add them for you until you get some rep points. – percusse Aug 13 '13 at 14:40inputenc,ecoorlmodern. Your input should be utf8 in that case and Latin Modern will be used by default. You probably don't wantfontencortextcompeither unless you know exactly why you are using them. If you are using (pdf)LaTeX, don't load packages specific to Xe/LuaLaTeX such asfontspec. Do you really want a mixture of Latin Modern and Computer Modern? You seem to be using LM for maths and CM for text. – cfr Mar 15 '14 at 02:17inputenc,ecoorlmodern. I have to update. But the substantive issue is your second comment. I have to search in this direction : link Tex (I love) to other systems (spreadsheet, database…) – Zouib Mar 20 '14 at 09:26