Discussion:
[GSOC/Lyx<-->Word]
stefano franchi
2014-05-20 22:14:59 UTC
Permalink
Dear all,

Prannoy is delving into tex4ht to tweak it to our purposes (quite
successfully so far). In the process, he is also trying to understand
better tex4ht's rather complex LaTeX code and grasp the logic of the XML
constructions it carries out.
The problem is that several Latex macros used are quite obscure (and
undocumented, as far as I can tell). I append a code fragment below as an
example.

The general question I'd like to ask is the following though:

* How would you go about finding the definition of a (La)TeX command
(length, etc.) when you don't know where it may come from?

For instance, for "\BegEnd:D" in the code fragment below, I tried grepping
the whole tree (which includes tex4ht sources), looking in existing
documentation, and compulsing the usual references (TeX book, LTC, etc).
To no avail.

Do any of the LaTeX gurus around have any suggestions? Am I missing
something obvious?


Cheers,

Stefano

--------------Code fragment from tex4ht's definition of a list (first part
only) ----

\ConfigureList{description}%
{\EndP
\bgroup
\HCode{<text:list
text:style-name="description\***@rl-rtl\fi"
text:name="description"\Hnewline>}%
\PushMacro\end:itm
\global\let\end:itm=\empty
\HTML:PAR{dd|<cond rtl class|>}{dd|<cond rtl class|>}%
\gHAdvance\BegEnd:D by 1
}
--
__________________________________________________
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies Ph: +1 (979) 845-2125
Texas A&M University Fax: +1 (979) 845-6421
College Station, Texas, USA

***@tamu.edu
http://stefano.cleinias.org
Cyrille Artho
2014-05-20 22:48:31 UTC
Permalink
Dear Stefano,
Could it be that this defines nesting through custom macros? Then you can
maybe find "BegEnd" in the sources elsewhere, but not "\BegEnd:D" (assuming
the code to parse the backslash may also be shared among macros).
Post by stefano franchi
Dear all,
Prannoy is delving into tex4ht to tweak it to our purposes (quite
successfully so far). In the process, he is also trying to understand
better tex4ht's rather complex LaTeX code and grasp the logic of the XML
constructions it carries out.
The problem is that several Latex macros used are quite obscure (and
undocumented, as far as I can tell). I append a code fragment below as an
example.
* How would you go about finding the definition of a (La)TeX command
(length, etc.) when you don't know where it may come from?
For instance, for "\BegEnd:D" in the code fragment below, I tried grepping
the whole tree (which includes tex4ht sources), looking in existing
documentation, and compulsing the usual references (TeX book, LTC, etc).
To no avail.
Do any of the LaTeX gurus around have any suggestions? Am I missing
something obvious?
Cheers,
Stefano
--------------Code fragment from tex4ht's definition of a list (first part
only) ----
\ConfigureList{description}%
{\EndP
\bgroup
\HCode{<text:list
text:name="description"\Hnewline>}%
\PushMacro\end:itm
\global\let\end:itm=\empty
\HTML:PAR{dd|<cond rtl class|>}{dd|<cond rtl class|>}%
\gHAdvance\BegEnd:D by 1
}
--
__________________________________________________
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies Ph: +1 (979) 845-2125
Texas A&M University Fax: +1 (979) 845-6421
College Station, Texas, USA
http://stefano.cleinias.org
--
Regards,
Cyrille Artho - http://artho.com/
The way of the world is to praise dead saints and prosecute live ones.
-- Nathaniel Howe
stefano franchi
2014-05-21 13:13:22 UTC
Permalink
Post by Cyrille Artho
Dear Stefano,
Could it be that this defines nesting through custom macros? Then you can
maybe find "BegEnd" in the sources elsewhere, but not "\BegEnd:D" (assuming
the code to parse the backslash may also be shared among macros).
Hi Cyrille,

that's exactly what I tried actually: grep -rn BegEnd /usr/local/texlive/

I get many hits, all from the same file (which happens to be the tex4ht
file from which I lifted the snippet enclosed in my message). But no
definition.Very puzzling.

S.
--
__________________________________________________
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies Ph: +1 (979) 845-2125
Texas A&M University Fax: +1 (979) 845-6421
College Station, Texas, USA

***@tamu.edu
http://stefano.cleinias.org
aparsloe
2014-05-21 09:59:55 UTC
Permalink
Post by stefano franchi
Dear all,
Prannoy is delving into tex4ht to tweak it to our purposes (quite
successfully so far). In the process, he is also trying to understand
better tex4ht's rather complex LaTeX code and grasp the logic of the
XML constructions it carries out.
The problem is that several Latex macros used are quite obscure (and
undocumented, as far as I can tell). I append a code fragment below as
an example.
* How would you go about finding the definition of a (La)TeX command
(length, etc.) when you don't know where it may come from?
For instance, for "\BegEnd:D" in the code fragment below, I tried
grepping the whole tree (which includes tex4ht sources), looking in
existing documentation, and compulsing the usual references (TeX
book, LTC, etc). To no avail.
Do any of the LaTeX gurus around have any suggestions? Am I missing
something obvious?
Cheers,
Stefano
--------------Code fragment from tex4ht's definition of a list (first
part only) ----
\ConfigureList{description}%
{\EndP
\bgroup
\HCode{<text:list
text:name="description"\Hnewline>}%
\PushMacro\end:itm
\global\let\end:itm=\empty
\HTML:PAR{dd|<cond rtl class|>}{dd|<cond rtl class|>}%
\gHAdvance\BegEnd:D by 1
}
--
__________________________________________________
Stefano Franchi
This is almost certainly wrong, judging by the code around it that you
provide above, but the ":D" notation occurs in the expl3 language of
LaTeX3 (as do a host of other "argument specifiers" like ":N", ":n"
etc.). See the document "interface3.pdf", p.1 of the text, that is
available after installing the l3kernel bundle.

Andrew

Andrew
stefano franchi
2014-05-21 13:20:59 UTC
Permalink
Post by aparsloe
Post by stefano franchi
Dear all,
Prannoy is delving into tex4ht to tweak it to our purposes (quite
successfully so far). In the process, he is also trying to understand
better tex4ht's rather complex LaTeX code and grasp the logic of the XML
constructions it carries out.
The problem is that several Latex macros used are quite obscure (and
undocumented, as far as I can tell). I append a code fragment below as an
example.
* How would you go about finding the definition of a (La)TeX command
(length, etc.) when you don't know where it may come from?
For instance, for "\BegEnd:D" in the code fragment below, I tried
grepping the whole tree (which includes tex4ht sources), looking in
existing documentation, and compulsing the usual references (TeX book,
LTC, etc). To no avail.
Do any of the LaTeX gurus around have any suggestions? Am I missing
something obvious?
Cheers,
Stefano
--------------Code fragment from tex4ht's definition of a list (first
part only) ----
\ConfigureList{description}%
{\EndP
\bgroup
\HCode{<text:list
text:name="description"\Hnewline>}%
\PushMacro\end:itm
\global\let\end:itm=\empty
\HTML:PAR{dd|<cond rtl class|>}{dd|<cond rtl class|>}%
\gHAdvance\BegEnd:D by 1
}
--
__________________________________________________
Stefano Franchi
This is almost certainly wrong, judging by the code around it that you
provide above, but the ":D" notation occurs in the expl3 language of LaTeX3
(as do a host of other "argument specifiers" like ":N", ":n" etc.). See the
document "interface3.pdf", p.1 of the text, that is available after
installing the l3kernel bundle.
Hi Andrew,

thank you for the pointer to the expl3 language.Things are starting to get
clearer! I had assumed that that the use of ":D" were similar to the
ubiquitous "@" for LaTeX's internal commands. I now see I was completely
off.


Thanks,

S.
--
__________________________________________________
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies Ph: +1 (979) 845-2125
Texas A&M University Fax: +1 (979) 845-6421
College Station, Texas, USA

***@tamu.edu
http://stefano.cleinias.org
Loading...