Как установить и использовать nlatexdb? (или latexdb, ratexdb)?

Как установить и использовать nlatexdb? (или latexdb, ratexdb)?

Этот вопрос связан сэтот вопросотносительно набора базы данных MySQL с использованием кодировки UTF-8 с помощью Xelatex.

Я спрашиваю это в отчаянии, так как это потребовало распечатать 552 строки для моей диссертации! Мне нужно передать эту информацию моему научному руководителю на этой неделе, а он немного старомоден (то есть он предпочел бы иметь все на бумаге, а не на компьютере и уж тем более не в компьютерном коде).

Подробности системы:

  • Mac OS X Лев 10.7.4
  • Tex Live 2012 установлен с Macports
  • MySQL 5.5 Server (устанавливается через DMG)

Как мне установить любую из трех систем latexdb? (соответствующий вопрос выше касался того, как заставить ее работать с xelatex).

Сервер работает нормально. Я могу войти и делать запросы.

У меня есть простой документ:

\documentclass[a4]{article}
\usepackage{fontspec}
\texdbconnection{MySQL,localhost,root,password,mydatabase}
\texdbdef{##query1}{select hd,md from mytable}{##hd,##md}

\begin{document}
This is a header for the page.

\begin{tabular}{|l|l|}
\hline
Hochdeutsch & Mantakisch \\
\texdbfor{##query1}{\hline \textit{##hd} & \textbf{##md}\\}
\hline
\end{tabular}\\

\end{document}

Я постоянно получаю такие ошибки:

latexdb database.tex Предварительная компиляция database.tex (цикл 1) Это XeTeX, версия 3.1415926-2.4-0.9998 (TeX Live 2012/MacPorts 2012_7) ограниченный \write18 включен. вход в расширенный режим (./database.tex LaTeX2e <2011/06/27> Babel и шаблоны переносов для английского языка, dumylang, без переносов, lo добавлено. (/opt/local/share/texmf-texlive-dist/tex/latex/base/article.cls Класс документа: статья 2007/10/19 v1.4h Стандартный класс документа LaTeX (/opt/local/share/texmf-texlive-dist/tex/latex/base/size10.clo)) (./database.aux)) *

Или просто висит вот так:

latexdb database.tex
Pre-Compiling database.tex (loop 1)
Traceback (most recent call last):
  File "/opt/local/bin/latexdb.py", line 274, in <module>
    _main_()
  File "/opt/local/bin/latexdb.py", line 262, in _main_
    texDBparseForLoop(l)
  File "/opt/local/bin/latexdb.py", line 151, in texDBparseForLoop
    for qR in texDBresult(queryString):
  File "/opt/local/bin/latexdb.py", line 68, in texDBresult
    cursor=db.cursor()
NameError: global name 'db' is not defined
This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012/MacPorts 2012_7)
 restricted \write18 enabled.
entering extended mode
(./database.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo
aded.
(/opt/local/share/texmf-texlive-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/opt/local/share/texmf-texlive-dist/tex/latex/base/size10.clo))
(/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec.sty
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/expl3.sty
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3names.sty
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3bootstrap.sty))
(/opt/local/share/texmf-texlive-dist/tex/latex/etex-pkg/etex.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/graphics/color.sty
(/opt/local/share/texmf-texlive-dist/tex/latex/latexconfig/color.cfg)
(/opt/local/share/texmf-texlive-dist/tex/xelatex/xetex-def/xetex.def))
(/opt/local/share/texmf-texlive-dist/tex/latex/graphics/graphics.sty
(/opt/local/share/texmf-texlive-dist/tex/latex/graphics/trig.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/latexconfig/graphics.cfg))
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3basics.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3expan.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3tl.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3seq.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3int.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3quark.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3prg.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3clist.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3token.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3prop.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3msg.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3file.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3skip.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3keys.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3fp.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3box.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3coffins.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3color.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/l3kernel/l3luatex.sty))
(/opt/local/share/texmf-texlive-dist/tex/latex/l3packages/xparse/xparse.sty)
(/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec-patches.sty
(/opt/local/share/texmf-texlive-dist/tex/latex/base/fixltx2e.sty)
*************************************************
* LaTeX warning: "xparse/redefine-command"
* 
* Redefining document command \oldstylenums with arg. spec. 'm' on line 107.
*************************************************
) (/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec-xetex.sty
(/opt/local/share/texmf-texlive-dist/tex/latex/base/fontenc.sty
(/opt/local/share/texmf-texlive-dist/tex/latex/euenc/eu1enc.def)
(/opt/local/share/texmf-texlive-dist/tex/latex/euenc/eu1lmr.fd))
(/opt/local/share/texmf-texlive-dist/tex/xelatex/xunicode/xunicode.sty
(/opt/local/share/texmf-texlive-dist/tex/latex/tipa/t3enc.def
(/opt/local/share/texmf-texlive-dist/tex/latex/euenc/eu1lmss.fd))
(/opt/local/share/texmf-texlive-dist/tex/latex/graphics/graphicx.sty
(/opt/local/share/texmf-texlive-dist/tex/latex/graphics/keyval.sty)))
(/opt/local/share/texmf-texlive-dist/tex/latex/fontspec/fontspec.cfg)))

LaTeX Warning: Unused global option(s):
    [a4].

(./database.aux) (/opt/local/share/texmf-texlive-dist/tex/latex/tipa/t3cmr.fd))

*

Кажется, я действительно близок к тому, чтобы это заработало.

решение1

Nlatexdb не нужно устанавливать. Вам просто нужен файл nlatexdb.exe. Вы можете скопировать его куда угодно, например, в ту же папку, что и xelatex.

Для MySql и Mono вам придется выполнить еще несколько шагов, как описано на этой странице: http://sourceforge.net/p/nlatexdb/wiki/MySQL%20and%20Mono/

Кроме того, если файлы tex имеют кодировку UTF-8, вам придется добавить параметр командной строки «-e utf-8».

Связанный контент