Open main menu

Changes

add hint about Pandoc; moved macro from FAQ
< [[Main Page]] >
 
General hints for converting from LaTeX to Context can be found in
* [http://www.berenddeboer.net/tex/LaTeX2ConTeXt.pdf LaTeX in proper ConTeXt] by [http://www.berenddeboer.net/ Berend de Boer]
A Vietnamese version is available at [http://vnoss.org/docs/LaTeX2ConTeXt-vi.pdf VnOSS].
This page offers specific advice on a number of special things that you may be doing with LaTeX, but are not so obvious to do with ConTeXt.
=== Document and Page Layout ===
ConTeXt, however, distinguishes strictly between both types for
processing them internally relies on two different
mechanisms. Therefore, setups like <{{cmd>|itemize</cmd> }} usually
allow two sets of optional arguments
[http://article.gmane.org/gmane.comp.tex.context/75276], the
* [[LaTeX Math in ConTeXt]]
=== Automatical converting ===
 
[https://pandoc.org Pandoc] can read LaTeX and write ConTeXt (but not the other way round).
=== Copy-Paste text between LaTeX and ConTeXt ===
''<code>\section</code> works the same way as in LaTeX, for mathematics take a look into [[LaTeX Math in ConTeXt]], use <code>\bf</code> instead of <code>\textbf</code> for both LaTeX and ConTeXt (or <code><nowiki>\def\textbf#1{{\bf #1}}</nowiki></code>) and as a general rule: use as many plain TeX macros as possible instead of LaTeX-specific macros. <code>\begin ... \end</code> only works for math as far as I know. See also other documents listed above or ask on the mailing list.''
 
<!--
* [[LaTeX&ConTeXt/Introduction|Introduction]]
-->
A Vietnamese version == Functionality of <i>LaTeX Latex Packages in proper ConTeXt</i> is available at [http://vnoss.org/docs/LaTeX2ConTeXt-vi.pdf VnOSS].Context ==
== Functionality of Latex Packages in Context ==
* [[Latex Packages]]
 
=== How transcribe this LaTeX macro to ConTeXt? ===
 
(This was moved from the [[FAQ]] where it didn’t make sense.)
 
How to transcribe this macro controlling that no last line of a paragraph is shorter than the paragraph indenting?
 
<texcode>
\parfillskip=\hsize
\advance\parfillskip by -1.5\parindent
\advance\parfillskip by 0pt minus \parfillskip
\advance\parfillskip by 0pt minus -1em
</texcode>
 
Like this:
<texcode>
\installalign
{block}
{\parfillskip=\hsize
\advance\parfillskip by -1.5\parindent
\advance\parfillskip by 0pt minus \parfillskip
\advance\parfillskip by 0pt minus -1em}
 
% followed by
\setupalign[block]
</texcode>
 
 
[[Category:From LaTeX]]