Code Monkey home page Code Monkey logo

latexml's People

Contributors

angerhang avatar bfirsh avatar brucemiller avatar dginev avatar dpantele avatar evoludolab avatar flyn-org avatar fred-wang avatar goska avatar hansolsson avatar hpreusse avatar hubgit avatar ianhbell avatar jazzpirate avatar kohlhase avatar kpj avatar lkohlhase avatar manwar avatar matteosecli avatar matthuszagh avatar mkardas avatar petrelharp avatar physikerwelt avatar rgieseke avatar stamer avatar szabgab avatar teepeemm avatar thanathan-k avatar tkw1536 avatar xworld21 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

latexml's Issues

label and other keyword args for lstlistings

[Originally Ticket 1397]

It would be good to do something with the keywords for listings. Since they are very varied and powerful, this is going to be difficult. But having a good way of at least getting the label for crossreferences would be quite good.

unit computation problem

[Originally Ticket 1371]

This construct works for me;
Perhaps the error is coming from someplace else,
or perhaps \textwidth got set to something odd?
Need a small example to reproduce.

mathvariant="script" not honored by firefox

[Originally Ticket 1399]

This is not strictly a latexml bug, but a case of being ahead of your time, I guess. Unfortunately it means that letters modified by \cal look the same as unmodified letters in firefox. If \cal were to produce entities in the 𝓐 range instead of regular letters modified by mathvariant="script", it would look great in the browser.

ps: warnings

[Originally Ticket 1374]

I’m not seeing this at all.
Also, the form of the message doesn’t seem to
suggest either perl or latexml generated it.
Can you submit a short case w/ commands that produce it?

Options for Packages and Classes

[Originally Ticket 1387]

LaTeXML does not care about package and class optionns at the moment, this should be implemented for compatibility.

For the base classes,this is not important, since the options are largely presentational, but for revtex, this mechanism provides more macros,… so it would be nice to have instead of hacking something individual.

angle brackets incorrectly italicized

[Originally Ticket 1400]

In the attached example, the angle brackets are incorrectly italicized in the first of the two equations. It looks like this may be indirectly because latexml is able to recognize the left hand side of the second equation as a function application, but not in the first equation, but I don't know why that would affect the angle brackets.

\verb behaves differently in TeX and latexml

[Originally Ticket 1414]

Much to my surprise

\begin{tabular}{|p{0.5\textwidth}|p{0.2\textwidth}|}
  \hline
  \verb mindist_raeder & $1mm$\\
  \verb mindist_bremsmessung & $1mm$\\
  \verb maxdiff_alpha__faktor2pi & $2.0$ \\
 \hline
\end{tabular}

works fine in LaTeX, but latexml gives an error:

Fatal:misdefined:End Unbalanced $ or } while ending group
In Constructor[End ] defined /opt/local/lib/perl5/site_perl/5.8.9/LaTeXML/Package/TeX.pool.ltxml line 1103
 <= Constructor[$ ] <= Primitive[\@text@alignment$ ] <= Constructor[Begin ] <= ...
at test.tex; line 5 col 33
    \verb mindist_raeder & $1mm$\\
                                  ^ 
  To be read again \vrule\@@close@inner@column\@close@column\@close@row\@alignment@newline@marker\@open@row\@open@column\@open@inner@column at /opt/local/lib/perl5/site_perl/5.8.9/LaTeXML/Global.pm line 207.

again, only tested this on the sTeX branch.

Should double-quote be treated like two single quotes?

[Originally Ticket 1405]

Some papers my users have written use the ascii double-quote character in place of two single quotes (like this" instead oflike this''). At least some versions of LaTeX accept this. It seems LaTeXML doesn't. Maybe it could?

spacing

[Originally Ticket 1408]

Naturally we don't expect LaTeXML to support all the fine control over kerning and spacing that LaTeX and TeX do. On the other hand it would be great to be able to use "\ " or "~" to force a space between two variables. See the attached case.

LaTeXML postprocessing

[Originally Ticket 1392, reported by sanca]

In the ContentMathML annotation for math formulas, all subscripts/superscripts are broken, i.e. instead of x/m:ci2/m:cn/m:power, the output is a broken tag as follows:
x/m:ci2/m:cn/m:apply

Primitives.pm

[Originally Ticket 1380]

LaTeXML.ltxml claims that \documentclass is defined in Primitives.pm, which does not seem to exist (I cannot find \documentclass by a grep either, funny.

No header for bibliography

[Originally Ticket 1411]

It seems \bibliography in LaTeXML doesn't insert a section header atop the bibliography as latex does (latex calls it "References" in the file I have at hand), it just goes straight into the list of references. It would be nice to have.

treatment of boxes and/or minipage problematic?

[Originally Ticket 1383]

I am using the following,

\def\r#1{\red{#1}}\def\m#1{\magenta{#1}}\def\b#1{\blue{#1}}

\setbox0=\hbox{\begin{minipage}{5.5cm}\scriptsize\begin{alltt} <{\r{OMBIND}}> <{\r{OMS}} cd=“quant1” name=“forall”/> <{\r{OMBVAR}}> <{\red{OMV}} name=“a”/> </{\r{OMBVAR}}> <{\b{OMA}}> <{\green{OMS cd=“relation1” name="geq"}}/> 0 </{\b{OMA}}> </{\r{OMBIND}}> \end{alltt}\end{minipage}} \setbox1=\hbox{\begin{minipage}{3.7cm}\scriptsize\begin{alltt} <{\r{apply}}> <{\r{forall}}/> <{\r{bvar}}> <{\r{ci}} {\m{type="nat"}}>{\r{a}}</{\r{ci}}> </{\r{bvar}}> <{\blue{apply}}> <{\green{geq}}/> a 0 </{\blue{apply}}> </{\r{apply}}> \end{alltt}\end{minipage}} \begin{omtext} \begin{center} \begin{tabular}{|c|c|}\hline {\large$\openmath$} & {\large$\mathml$}\\hline \box0 & \box1\\hline \end{tabular} \end{center} \end{omtext}

and I get the following: note the two empty ltx:text elements that seem to come from the boxes.

ltx:tabular
[…]
ltx:tbody
ltx:tr

ltx:text/
/ltx:td

ltx:text/
/ltx:td
/ltx:tr
/ltx:tbody
/ltx:tabular

MathML-content with mtext afer postprocessingPostprocessing

[Originally Ticket 1393]

sometimes postprocessing and goes quite wrong, I get the following thing in http://arxmliv.kwarc.info/files/quant-ph/papers/0506062/determinism.xhtml

It seems that all the formulae in this paper have the same weird form.

```

P f , G = ∏ i ∈ O c > M i α i ⁢ K G ⁢ ( f ⁢ ( i ) ) s i ⁢ Z i s i ⁢ E G ⁢ N I c 0 PfG=∏>∈iOc⁢MiαiK⁢G⁢fisiZisiEGNIc0

```

why not use BibTeXML

[Originally Ticket 1381]

I see that LaTeXML has created it’s own format for translating bibTeX. Why not use the DTD from http://bibtexml.sf.net/ It seems that they are quite active and have nice tools

content MathML for latexmlpost

[Originally Ticket 1140]

For the CNX converter, we will need a content MathML converter. It should be
very similar to the OpenMath converter (and maybe share a lot of code with ie),
only that where is generated from file baz.tex, it
generates
PRES, where PRES is the
presentation MathML that can be generated from the LaTeX information.

I guess that XMDual has it’s place here.

\leftmark and \rightmark

[Originally Ticket 1372]

Actually, they’re from latex;
I’ve added dummy definitions there (they don’t seem relevant for xml)
revision 165.

support for section numbers without section mark

[Originally Ticket 1406]

My understanding is that you can use --nonumbersections to omit both the section markings (§ and ¶) and the section numbering. But we want to mimic the behavior of LaTeX, i.e. include the numbers when the non-starred section commands are used, but not put these symbols in front of them. Either an option to omit them from latexmlpost, or just a class for the symbols so we can hide them in css, would do the trick.

\lstinputlisting for listings.sty.ltxml

[Originally Ticket 1396]

`\lstinputlisting` is not defined in `listings.sty.ltxml`. I guess this should be quite simple in one way, we can make it into a link as I did for OMDoc.

```
DefConstructor(‘\lstinputlisting [] Semiverbatim’,“#2”);
```

but of course that is partially cheating. But it should not be hard to put it into a `ltx:verbatim` as well.

Just thought this would need a reminder.

\setcounter problem

[Originally Ticket 1377]

This usage is so screwy; and pointless - Why
is the redefinition inside the counter value? -
that I’m going to mark it as Wontfix.

However, I don’t think I had a good reason
for being so strict to call it Fatal, so I’ve
changed the error handling to a regular Error.
It falls into that broad class of “the output is
likely to be wrong”, but could just possibly be OK.

need some way in LaTeX to load packages outside the preamble

[Originally Ticket 1385]

In the past, we could just say \input{xxx.sty}, but that is now no longer possible, since \input will directly load the sty file. But I need this to selectively (i.e. in sTeX modules) load required bindings that I do not want to clutter the general transformation mechanism.

This should be very easy to do, probably best in the latexml package.

latexml.sty:

\def\includepackage#1{\input{#1.sty}

and in

latexml.sty.ltxml:

DefConstructor(‘\includepackge{}’, [something with RequirePackage(‘#1’));

curly single quotes

[Originally Ticket 1409]

latexml doesn't seem to replace backquote and apostrophe with opening and closing single quotes the way latex does. Maybe it's another case of latex cheating by making apostrophe look like a closing single quote (as in bug report #81), but it'd be nice to have it look the same way in the web browser.

stacking using \mathop

[Originally Ticket 1401]

In attached file, subscripts appear lined up in succession after the \lim instead of being stacked below the \lim. I don't know whether this bug is in latexml or latexmlpost, because I don't know how the xml should look.

amstext-Package: \text mapping should be <ltx:XMText>

[Originally Ticket 1344, reported by amahnke]

Actually, mapping to ltx:text is correct;
Since it is created in text mode, the math mode
conversion automatically wraps it in ltx:XMText.
[Incidentally, there was an unrelated typo in amsmath, fixed]

ignoring \immediate

[Originally Ticket 1256, reported by sucan]

some of the papers in arXMLiv use \immediate; we need to add a definition to
TeX.ltxml so that \immediate is ignored. I don’t know how to properly write this
definition.

mark \include'd content?

[Originally Ticket 1410]

We are using latexml as part of a wiki system, to support editing latex documents in wiki pages and seeing the content in the web browser. So along with the document content is a link that opens the source file for editing. When the latex source is in multiple files, though, it'd be great to include edit links at the appropriate points in the markup to open the corresponding source file. It seems to me that would require latexml to mark which parts of the markup come from what source files.

I don't know if this fits into the general goals of LaTeXML, only that it would be useful to me... I could parse it out and do the edit links even if there are just comments marking the beginning and end of an inclusion, like there are for TeX comments.

(Ideally it would do \bibliography and what not as well as \input and \include...)

fence=true from role="OPEN" or role="CLOSE"

[Originally Ticket 1389]

latexmlpost should convert

}/ltx:XMTok

to }/m:mo

not just }/m:mo as it currently does.

alternatively mfenced would work sometimes, but if I recall, then we are deprecating that in the Math WG right?

amstex vs amslatex differences

[Originally Ticket 1345]

It just dawned on me that this was assigned to me; :>
Alas, I’m not familiar with AMSTeX (as opposed to the
ams packages for LaTeX), and don’t have much time to
get familiar.

FWIW (in case it’s not obvious), some thoughts on strategy:
I’d try to leverage the existing (for latex) ams*.ltxml
as much as possible; I’d assume the overall design is
relatively similar.

I don’t know if amstex uses “environments” in the same
way as latex (ie \begin{env}..\end{env}), but they must
have a construct with similar intent. Maybe it would
be possible to get amstex to use the same definitions
created by DefEnvironment?

Another area where amstex is likely to differ is in
having more/different frontmatter setup.
There is already some flexibility in the DTD and
some (undocumented) tools in TeX.ltxml, used by
LaTeX.ltxml, for working with frontmatter, so
maybe that can be used.

Hope that helps some…

lstinline (lstlisting.sty.ltxml) does not accept underscore

[Originally Ticket 1413]

\lstlinline{sams_para} leads to an error (at least in the sTeX branch). I get

rror:unexpected:_ Script _ can only appear in math mode
In Primitive[Subscript ] defined /opt/local/lib/perl5/site_perl/5.8.9/LaTeXML/Package/TeX.pool.ltxml line 2070
 <= Constructor[Begin ] <= Constructor[\begin{document} ] <= ...
at test.tex; line 4 col 17
  \lstinline{sams_p
                   ^ ara}
  To be read again p

the code looks as if it should be able to handle this.

bindings for \halign and friends

[Originally Ticket 1356]

I’ve just committed a fix to the previous big alignment rewrite.
I had too much being done during expansion that should have
been done during digestion. Result seems to look and work better.

So, although there may be some further minor patches, I think
this is basically correct and I’m marking this as fixed.

There are additional comments here about \align, \aligned, \alignedat.
I assume these are from AmsTeX. There are equivalent environments
in amsmath that may (or may not) work for amstex. If they don’t,
please open a separate bug for them.
As an aside, I’m not even using the alignment machinery for these
environments: The intent of the markup design seems to be that they
should be used more “logically”, so I am pretending to “understand”
the markup and generate something more semantic. Real usage may
vary, of course.

limits separated from integral sign

[Originally Ticket 1402]

In the attached, the integral limits are not attached to the endpoints of the integral sign. This might be related to bug #76, since it seems to be connected to the vertical bar between function arguments.

plus signs not supported in citation keys

[Originally Ticket 1404]

see attached example. The keys used with \bibitem and \cite are not allowed to contain '+'. I remember this being discussed on the email list, so I know this is a known issue and may have been settled, but I'm putting it here in the interest of bug tracking and to document that it is affecting people. I use + signs in a lot of keys and I'm sure others do as well. Having to make an alternate version of the big .bib file is inconvenient at best, and is likely to make it incompatible with preexisting papers, etc.

intro text in part/chapter/section ...

[Originally Ticket 1382]

The LaTeXML DTD basically has the content model

chapter ::== section*

but we often find

\chapter{foo}

some intro text here

\section{bar}

we should augment the model and the processing to that. Just allowing (para|p)\* will not be sufficient, since they are not numbered.

\root ... \of ...

[Originally Ticket 1357]

Actually it’s from TeX itself.
I’ve added it to TeX.ltxml
and will include it in the next check-in.

tabular problem

[Originally Ticket 1388]

When transforming the table

```
\begin{center}\small
\begin{tabular}{{|p{1.8cm}||p{1.2cm}|p{1.8cm}|}}\hline
& Clyde defects & Clyde cooperates\\\hline\hline
Bonnie \hbox{defects} & 5 years & walks \\\hline
Bonnie \hbox{cooperates} & 10 years & 2 years\\\hline
\end{tabular}
\end{center}
```

I get the following error:

Fatal: Can’t call method “newRow” on an undefined value at /var/kohlhase.store/mathweb.org/LaTeXML/trunk/blib/script/../lib/LaTeXML/Package/TeX.pool.ltxml line 1208.

In Constructor[\@open@row SkipSpaces Def… defined /var/kohlhase.store/mathweb.org/LaTeXML/trunk/blib/script/../lib/LaTeXML/Package/TeX.pool.ltxml line 1208
<= Constructor[\@open@alignment Deferred… <= Constructor[\@tabular []Undigested A... <= Constructor[\begin{itemize} ] <= ... at Anonmymous String; line 43 col 54 \begin{tabular}{{|p{1.8cm}||p{1.2cm}|p{1.8cm}|}} ^ \hline To be read again \open@column\@open@inner@column at /var/kohlhase.store/mathweb.org/LaTeXML/trunk/blib/script/../lib/LaTeXML/Global.pm line 163.
Empty String at /var/kohlhase.store/mathweb.org/LaTeXML/trunk/blib/script/../lib/LaTeXML/Post.pm line 145
make: \ [authors-dilemma.omdoc] Error 2

two footnote marks

[Originally Ticket 1407]

It's easy enough to use css to make footnote text appear somewhere on the page, instead of the hovering feature that latexmlpost does by default. But it would be great if the html had one footnote mark in the text, and another one within the footnote, because I don't see how to make the one that's provided appear in both places.

Ideally, the two should probably be links to each other...

Dates for RequirePackage and LoadClass

[Originally Ticket 1386]

LaTeX as a mechanism for ensuring that the packages and classes that are loaded are new enough, \RequirePackage and \LoadClass take an optional argument that is a date. This should be implemented in LaTeXML.

handle ambiguity in postprocessing

[Originally Ticket 1394]

Often we do not know how to generate OpenMath or cMathML from presentation LaTeX. For instance it is not clear whether `x^2` denotes an indexed variable from `x^1`,…,`x^n` or a variable `x` raised to the power two. Right now latexmlpost often generates nonsense like empty `` elements in this case. Deyan and I have some ideas how to solve this by allowing to represent ambiguity unambiguously in OpenMath which we put down [here](https://svn.kwarc.info/repos/arXMLiv/trunk/doc). This should be implemented in `latexmlpost`.

mathescape in lstlistings.sty

[Originally Ticket 1395]

It would be great, if lstlistings.sty.ltxml could deal with Mathescape. I am not totally shure what that even means, but it is very useful.

bug during parsing

[Originally Ticket 1376]

I think this wasn’t so much the parsing math, as a
stray problem with alignments (eqnarray).
I believe this should have been fixed with revision 164.

Frontmatter for subject classifications

[Originally Ticket 1378]

what do we do about the various classification systems?

I have just learnt that PACS is the Physics and Astronomy Classification Scheme.

We should probably enhance the frontmatter

ltx:classification scheme="PACS">bla,bla/ltx:classification

Michael

txfonts.sty.ltxml incomplete

[Originally Ticket 1391]

txfonts.tx.ltxml says “nothing to be done here”, but there are some macros that are defined here not just redefined, I stumbled over \upsionup and \varthetaup. Those should be defined.

odd image processing issue

[Originally Ticket 1412]

In the attached sample, when latexmlpost converts the eps file to png for display in browsers, two of the image's three arrows are left out. This doesn't happen when I try 'convert curve-arrows.eps x.png' by hand, and in fact it doesn't happen in latexmlpost when the scaling arguments to \includegraphics aren't used. It must be a quirk of whatever image conversion routing latexmlpost is using.

\usepackage behaves differently

[Originally Ticket 1384]

in LaTeX, \usepackage is only allowed in the preamble, but LaTeXML happily accepts it everywhere.

extending latexml packages/

[Originally Ticket 1373]

I hadn’t really thought of a formal process, but…

There’s the mechanical part: send them to me;
I svn add, commit, you svn remove from other branches.

For non-trivial packages, some test case(s) would also
be good to incude in the t/ directory, possibly even
a new subdirectory (like ams gets).

For trivial packages, this is probably not necessary.

Also, I suppose there’s the licensing issue; What I write
(as part of my job) I have to release as public domain
(and it’s not practical to separate what I’m doing into
job & hobby). I know you favor GPL. In principle, if I end
up editting things, there’s issue of mixing code under the
two licenses. I don’t know if there’s a clear solution or
if it is even really an issue.
an is

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.