# Tag Info

### Compare ConTeXt with speedata publisher for database publishing and dynamic page layout

As mentioned: the answer I give is based on my limited view of ConTeXT's XML processing capabilities. So please edit the answer as I might be wrong. Input: The input of ConTeXt is mixed TeX and XML. ...
Accepted

### Does a (Lua) approach exist, to read XML data into a .tex file?

Here is the general idea with the luaxml "package". \documentclass{article} \usepackage{luacode} \begin{luacode*} xml = require('luaxml-mod-xml') handler = require('luaxml-mod-handler') \end{luacode*}...
• 9,498
Accepted

### How to convert Latex entities to hex value?

Any existing tex-to-html or tex-to-xml convertor will be doing this already but if you are rolling your own code the easiest place to get the table of replacements that you need is in the file used by ...
• 668k

### Pretty printing DTDs (Document Type Declaration)

If it is Document type definitions that you want, Pygments has support for it and produces a very neat output imo. For LaTeX documents you can harness it easily with the minted-package, e.g.: \...
• 2,817
Accepted

### Macro overloading, catcode redefining… or how can I parse XML with TeX?

Suppose following input example: <?xml version="1.0" encoding="utf8"?> <cenik> <nazev>Počítačové komponenty</nazev> <platnost od="1.1.2000" do="31.3.2000"/> <...
• 53.6k

### ConTeXt: How to use xmlflush in lua?

First of all, context.quotation(lxml.flush(t)) cannot work because lxml.flush does not yield a return value. Why that is and what the consequences are is discussed below. You have encountered the ...
• 105k
Accepted

### Arabic font for Listing

One of solution is this. first define your listingstyle like this before \begin{document} If your main Language is persian then: \documentclass[11pt]{book} \usepackage{listings} \usepackage{...
• 427
Accepted

### ConTeXt XML: How do I typeset blank lines, leading spaces

Use \xmlflushspacewise to obey spaces and newline inside the nodes and use \dontleavehmode before so that successive \par can't be collapsed. \startbuffer[demo] <?xml version="1.0" encoding="UTF-8"...
• 105k
Accepted

### ConTeXt XML: Configureable Titleblock

If the document has only one title and one author, you can use xmlfilter to filter out that information before flushing the rest of the content. For example: \startbuffer[test] <?xml version='1.0' ...
• 61k
Accepted

### ConTeXt XML: Nested section elements

One option is to map the <section> tags to \startsectionlevel macros, which can be nested: \starttext \startstructurelevel[title=Section heading] Some text \startstructurelevel[title=...
• 61k
Accepted

### SVG as page layout in Latex

Here is a proof of concept using LuaXML for SVG parsing and Flowfram for flow frames. I've created a package svgflowfram.sty: \ProvidesPackage{svgflowfram} \RequirePackage{flowfram} \RequirePackage{...
• 45.1k

### Converting Jats XML to LaTeX

I have developed a small app written in Java for JATS to LaTeX conversion. It is open source: https://github.com/Vitaliy-1/JATS2LaTeX
• 151
Accepted

### ConTeXt: Optional XML in two columns

Depends a bit on what is the desired output when <source> is missing. You can use \xmlfilter{#1}{...} or \xmldoif... etc. Here is one example: \startbuffer[demo] <?xml version="1.0" encoding=...
• 61k
Accepted

### ConTeXt: Read an XML file into a buffer for processing

You don't have to read the file into a buffer first. There is \xmlprocessfile to directly process an XML file. For more info read the XML manual (PDF). If you want to read the file into a buffer ...
• 105k
Accepted

### How to add caption correctly in listing?

Load minted with the newfloat option \usepackage[newfloat]{minted} and write \caption before the actual listing code: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{inconsolata} \...
• 481k
Accepted

### ConTeXt XML: Footnote references and footnote content

You can set fn-group to empty but flush fn: \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{article|front|body|back|p}{xml:*} % Footnotes \xmlsetsetup{#1}{fn-group}{} ...
• 61k

### moodle.sty does not insert graphics in xml output file

Indeed moodle.sty does not use \graphicspath for the conversion to base64 internally. The conversion command is defined as follows: \openssl\otherspace enc -base64 -in #2.png -out #2.enc with \...
• 29.8k

### LaTeX in an XML production environment

I am developer of TeX4ht, one of systems used for the LaTeX to XML conversion. The development is in progress, as can be seen from the ChangeLog. It is driven by user requests. I can say that we don't ...
• 45.1k
Accepted

### What software packages have been used to produce the FCLA book and why that might be a more suitable choice than LaTeX?

The comments in the files show http://mathbook.pugetsound.edu/ is the convertor used from XML to the various formats.
• 668k
Accepted

• 481k
Accepted

### How to properly number between lstlisting and listing the same latex file?

Add to your preamble \makeatletter \AtBeginDocument{\let\c@listing\c@lstlisting} \makeatother which will use the same counter for both float types. Full example: \documentclass{article} \...
• 993k

### Why convert TeX to XML before compilation to PDF?

Well, maybe it is just for LaTeX. Maybe they also accept Microsoft Word-based submissions. In that case, it would make some sort of sense to convert everything to a common format. I am not an expert ...
• 548
Accepted

### Problems with XML Syntax Highlighting

I couldn't come up with a perfect solution right now, but juggling with the solution from what you linked and from my answer here I came up with the following, which isn't too bad: \documentclass{...
• 3,426
Accepted

### XML syntax highlighting: comments not recognized

I don't find it very sane to define everything not in a tag as a string. It would be better to set the tag color to red. The problem with this approach is that listings colors the delimiters in the ...
• 294k
Accepted

### cloze multichoice question in the latex using the package 'moodle'

Unfortunately, I suspect it is a bug/limitation of the Cloze type of questions. This MWE % \documentclass{article} \usepackage[T1]{fontenc} \usepackage{moodle} \begin{document} \begin{quiz}{Test ...
• 30.3k
Accepted

### phone sms xml to boxed conversation-like in latex

** Edit ** OP had lot of additional requests, here is the updated code. The additional functionality filters the XML DOM object before it is transformed to LaTeX code. In particular, it filters ...
• 45.1k

### moodle xml conversion to LaTeX

Here is a solution that uses LuaXML. The main library is named moodle-transform.lua: local transform = require "luaxml-transform" local domobject = require "luaxml-domobject" ...
• 45.1k
Accepted

### XML parsing and data retrieving in ConTeXt

For \xmlfirst to “work” (it does, you're just using it wrong), remove the line \xmlsetsetup{#1}{*}{-}. From the documentation (which you linked in your question): The line: \xmlsetsetup{demo}{*}{-...
Accepted

### Tex4ht, LaTeX to Docbook: Quote-Environment not transformed to <blockquote>

The configuration for quote environment is missing in tex4ht support for Docbook. You can try the following configuration file: \Preamble{xhtml} \ConfigureEnv{quote}{\ifvmode\IgnorePar\fi\EndP\HCode{&...
• 45.1k