I am employee in mid-sized company that is currently experimenting with implementation of Latex for writting technical documentation (see Implementing Latex in our company).
Most of our documents need to be translated in various languages, which is done by translation agencies. To perform this task, they normally use Trados Studio. However, this program does not support documents in .tex format.
It does, however, support .html format. As I am using TexStudio (together with Tex Live), I am able to convert .tex documents in .html format (using Tools -> Convert Source to Html). This creates a document that can show Html code when opened in Notepad, but if you open it in web browser, a .tex code is shown.
However, the created document was not compatible with Trados Studio.
My question is:
How can I solve this problem? Is the problem in the fact that the created .HTML document is not "correctly" converted (when checking the created Html document with Html validator, some errors pop up).
If this approach of converting to .html documents is not the best approach for translating with Trados Studio, what alternative approach do you suggest?
Note that our typical documents are roughly 100 pages long and there is large amount of them, so a solution that is not time-intensive would be preffered.
Edit: I used make4ht -l filename.tex, while the minimized example (probably I missed something) is:
% !TeX program = lualatex
% !TeX encoding = UTF-8 Unicode
% !TeX spellcheck = de_DE
\documentclass[10pt,a4paper,twoside]{report}
\usepackage{geometry}
\geometry{
a4paper,
total={170mm,251.5mm}, %default je 150mm,237mm
outer=15mm,
inner=20mm,
top=25mm}
\usepackage{fontspec}
\setmainfont{Arial}
\usepackage{titlesec}
\usepackage[most]{tcolorbox}
\newtcolorbox{warning}[1][width=171.375mm, center]{%
enhanced jigsaw, %engine za risanje zahtevnejsih okvirjev
enlarge top initially by=3mm, %presledek pred okvirjem
enlarge bottom finally by=3mm, %presledek za okvirjem
borderline={3.5pt}{-5pt}{black}, %to je dodaten okvir
sharp corners, %kaksni so vogali
fonttitle=\bfseries, %NASLOV v krepkem
title=WARNUNG!, %ime naslova
coltitle=black, %font naslova crne barve
colbacktitle={white!80!gray}, %ozadje naslova sivo
halign title=center, %naslov centriran--------------------
fontupper=\bfseries, %besedilo warninga je v krepkem
halign=flush center, %upper (sredinski) part centriran, ALTERNATIVA: UKAZ CENTER
halign lower=right, %lower (spodnji) part poravnan desno
colframe=black, %barva okvirja
colback={white!80!gray}, %barva ozadja upper in lower part----
lower separated=false, %crta ki locuje
fontlower=\tiny, %font rms in številke
middle=0mm, %minimalen razmik med upper in lower part
bottom=0mm, %minimalen razmik med lower part in okvirjem
%breakable, %ce bi hoteli da se prelomijo cez strani.
#1
}
\newtcolorbox{caution}[1][]{%
enhanced jigsaw, %engine za risanje zahtevnejsih okvirjev
enlarge top initially by=1.5mm, %presledek pred okvirjem
enlarge bottom finally by=1.5mm, %presledek za okvirjem
% borderline={0pt}{0pt}{black}, %to je dodaten okvir
sharp corners, %kaksni so vogali
fonttitle=\bfseries, %NASLOV v krepkem
title=ACHTUNG!, %ime naslova
coltitle=black, %font naslova crne barve
colbacktitle={white!80!gray}, %ozadje naslova sivo
halign title=center, %naslov centriran--------------------
fontupper=\bfseries, %besedilo warninga je v krepkem
halign=flush center, %upper (sredinski) part centriran
halign lower=right, %lower (spodnji) part poravnan desno
colframe=black, %barva okvirja
colback={white!80!gray}, %barva ozadja upper in lower part----
lower separated=false, %crta ki locuje
fontlower=\tiny, %font rms in številke
middle=0mm, %minimalen razmik med upper in lower part
bottom=0mm, %minimalen razmik med lower part in okvirjem
%fontupper={\setlength{\parindent}{20pt}},
#1
}
\newtcolorbox{note}[1][]{%
enhanced jigsaw, %engine za risanje zahtevnejsih okvirjev
enlarge top initially by=1.5mm, %presledek pred okvirjem
enlarge bottom finally by=1.5mm, %presledek za okvirjem
% borderline={0pt}{0pt}{black}, %to je dodaten okvir
sharp corners, %kaksni so vogali
% fonttitle=\bfseries, %NASLOV v krepkem
title=HINWEIS, %ime naslova
coltitle=black, %font naslova crne barve
colbacktitle=white, %ozadje naslova sivo
halign title=center, %naslov centriran--------------------
% fontupper=\bfseries, %besedilo warninga je v krepkem
halign=flush center, %upper (sredinski) part centriran
halign lower=right, %lower (spodnji) part poravnan desno
colframe=black, %barva okvirja
colback=white, %barva ozadja upper in lower part----
lower separated=false, %crta ki locuje
fontlower=\tiny, %font rms in ?tevilke
middle=0mm, %minimalen razmik med upper in lower part
bottom=0mm, %minimalen razmik med lower part in okvirjem
%fontupper={\setlength{\parindent}{20pt}},
#1
}
\usepackage[a-2b]{pdfx}
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
}
\newcommand{\fullref}[1]{\hyperref[#1]{\ref*{#1}\ \nameref*{#1}}}
\renewcommand{\figureautorefname}{Abbildung}
\usepackage{lastpage}
\usepackage{fancyhdr}
\def\cnvjobname{\expandafter\cnvjobnameA\jobname\relax}
\def\cnvjobnameA#1{\ifx\relax#1\else
\ifx?#1: \else \expandafter\ifx\string_#1 \else #1\fi\fi
\expandafter\cnvjobnameA\fi
}
\newcommand*{\setmyjobname}{%
\edef\myjobname{\cnvjobname}%
\expandafter\expandafter\expandafter\setmyjobnameaux
\expandafter\myjobname\expandafter"\myjobname"\relax
}
\newcommand*{\setmyjobnameaux}{}
\def\setmyjobnameaux#1"#2"#3\relax{\def\myjobname{#2}}
\setmyjobname
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\includegraphics*[height=0.6cm]{example-image-b}}
\renewcommand{\figurename}{Abbildung}
\renewcommand{\tablename}{Tabelle}
\newcommand{\cell}{\parbox[t]{20cm}\seqsplit}
\begin{document}
something
\end{document}
make4ht filename.tex
. If it is larger document with lot of custom commands and lot of used packages, you can experience some errors, but they are usually possible to fix..txt
) documents - so maybe just renaming your.tex
file to.txt
would work? When you are done you can rename it back.