mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 18:58:10 +00:00
tex2lyx: support for phantom insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39958 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8ed06703aa
commit
46e4463066
@ -50,7 +50,6 @@ Format LaTeX feature LyX feature
|
||||
336 ? \font_cjk
|
||||
343 ? \use_default_options
|
||||
347 tabular valign InsetTabular
|
||||
348 \phantom, \hphantom, \vphantom InsetPhantom
|
||||
350 ? \default_output_format
|
||||
353 \printsubindex InsetIndex
|
||||
354 \printindex*, \printsubindex* InsetIndex
|
||||
|
@ -110,6 +110,7 @@ in their names. It's OK to use them in the man\"{u}script, though.
|
||||
\bibitem[{{G\"{u}rkan et~al.}(2004)}]{gur+04} Gürkan, M.~A., Freitag,
|
||||
M., \& Rasio, F.~A. 2004, ApJ, 604, 632\end{thebibliography}
|
||||
|
||||
|
||||
\section{Input files\index{Input files}}
|
||||
|
||||
We can input files too, like this \input{DummyDocument}, or with the include
|
||||
@ -119,16 +120,37 @@ variant \include{DummyDocument} % unfortunately, including the doc twice
|
||||
If you prefer verbatim input, you can choose
|
||||
between~\verbatiminput{foo} or~\verbatiminput*{foo}.
|
||||
|
||||
|
||||
\section{URL\index{URL}\nomenclature[www]{URL}{uniform resource locator}}
|
||||
|
||||
An URL: \url{http://www.lyx.org}
|
||||
\nomenclature{URL2}{uniform resource locator}
|
||||
|
||||
|
||||
\section{Lists\index{Lists}}
|
||||
|
||||
\listoffigures
|
||||
\listoftables
|
||||
|
||||
|
||||
\section{Phantoms}
|
||||
|
||||
test\hphantom{Wow}test
|
||||
|
||||
test\phantom{\textcolor{green}{W}\textbf{ow}\textsuperscript{Wow}}test
|
||||
|
||||
test\vphantom{Wow\textbackslash{}\&\%}test
|
||||
|
||||
$test\hphantom{Wow}test$
|
||||
|
||||
\[
|
||||
test\phantom{\textcolor{green}{W}\mathbf{ow}\textsuperscript{Wow}}test
|
||||
\]
|
||||
|
||||
|
||||
$test\vphantom{Wow\&\%}test$
|
||||
|
||||
|
||||
\section{Graphics\index{Graphics}}
|
||||
|
||||
There is also some basic support for graphics, in the form
|
||||
|
@ -881,6 +881,8 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags,
|
||||
Context context(true, parent_context.textclass);
|
||||
context.font = parent_context.font;
|
||||
|
||||
// FIXME, the inset layout should be plain, not standard, see bug #7846
|
||||
|
||||
// If we have no inner box the contens will be read with the outer box
|
||||
if (!inner_type.empty())
|
||||
parse_text(p, os, inner_flags, outer, context);
|
||||
@ -2443,6 +2445,21 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
|
||||
os << "\n\\" << t.cs() << " default\n";
|
||||
}
|
||||
|
||||
// FIXME, the inset layout should be plain, not standard, see bug #7846
|
||||
else if (t.cs() == "phantom" || t.cs() == "hphantom" ||
|
||||
t.cs() == "vphantom") {
|
||||
context.check_layout(os);
|
||||
if (t.cs() == "phantom")
|
||||
begin_inset(os, "Phantom Phantom\n");
|
||||
if (t.cs() == "hphantom")
|
||||
begin_inset(os, "Phantom Hhantom\n");
|
||||
if (t.cs() == "vphantom")
|
||||
begin_inset(os, "Phantom Vhantom\n");
|
||||
os << "status open\n";
|
||||
parse_text_in_inset(p, os, FLAG_ITEM, outer, context);
|
||||
end_inset(os);
|
||||
}
|
||||
|
||||
else if (t.cs() == "lyxline") {
|
||||
// swallow size argument (it is not used anyway)
|
||||
p.getArg('{', '}');
|
||||
|
Loading…
Reference in New Issue
Block a user