10
votes
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. ...
Community wiki
8
votes
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*}...
8
votes
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 ...
8
votes
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.:
\...
7
votes
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"/>
<...
6
votes
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 ...
6
votes
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{...
6
votes
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"...
6
votes
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' ...
6
votes
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=...
6
votes
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{...
5
votes
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
5
votes
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=...
5
votes
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 ...
5
votes
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}
\...
5
votes
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}{}
...
5
votes
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 \...
5
votes
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 ...
4
votes
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.
4
votes
Accepted
How to display the symbol dollar $ correctly?
Simply use $:
\documentclass{article}
\usepackage{minted}
\usepackage{listings}
\begin{document}
\begin{listing}[ht]
\begin{minted}{xml}
<plugin>
<groupId>maven....
4
votes
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}
\...
4
votes
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 ...
4
votes
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{...
4
votes
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 ...
4
votes
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 ...
4
votes
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 ...
4
votes
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"
...
3
votes
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}{*}{-...
Community wiki
3
votes
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{&...
3
votes
Compare ConTeXt with speedata publisher for database publishing and dynamic page layout
Having built a database publishing system based on ConTeXt I can confirm it's very well suited for the task, however IT IS NOT a database publishing system which means you have to build such system ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
xml × 123listings × 25
context × 22
conversion × 15
moodle × 7
highlighting × 6
macros × 5
pdftex × 5
minted × 5
bibtex × 4
line-breaking × 4
pdf × 4
html × 4
java × 4
color × 3
lyx × 3
tex4ht × 3
svg × 3
msword × 3
parsing × 3
metadata × 3
mathml × 3
tikz-pgf × 2
beamer × 2
graphics × 2