Commit Graph

62 Commits

Author SHA1 Message Date
Juergen Spitzmueller
315c2f132a Account for babel's bidi option (#12866)
bidi=bidi-{r,l} load the bidi package
2023-08-17 14:25:33 +02:00
Yuriy Skalko
c0a5987181 Better naming for enums 2020-12-01 00:46:21 +02:00
Yuriy Skalko
ecf62a8f21 Refactor OutputParams
Now all Inset hierarchy uses OutputParams.h included in Inset.h.
Forward declare some enums to reduce header dependencies.
2020-11-30 13:05:03 +02:00
Yuriy Skalko
8a25741ccd Use default member initialization in OutputParams 2020-11-02 20:30:01 +02:00
Thibaut Cuvelier
d1b9af3b1d DocBook: fix file inclusion.
Previously, nothing was output. Special care was needed for when new paragraphs should be open (this work is probably not finished yet).
2020-10-20 02:34:02 +02:00
Thibaut Cuvelier
875f7d42e2 DocBook: avoid generating empty paragraphs instead of new pages.
As this required to first generate the paragraph before outputting it if necessary, tests like XMLStream::isTagOpen no more worked properly. This also refactors table handling to get rid of that case (and make code easier to read).
2020-08-02 04:03:39 +02:00
Enrico Forestieri
da336cedf3 Fix compilation on platforms where sizeof(wchar_t) == 2.
Use "set" instead of "unordered_set" as some facets are missing when
using gcc on cygwin, mingw and, possibly, FreeBSD.
2020-07-11 16:19:21 +02:00
Pavel Sanda
77e0f69901 Fix another constructor order of parameters 2020-07-08 14:27:24 +02:00
Thibaut Cuvelier
3883b85f49 New DocBook support 2020-07-08 08:42:16 +02:00
Juergen Spitzmueller
e4ef8ddc0f Properly fix handling of title layouts within insets (#11787) 2020-07-03 16:20:38 +02:00
Richard Kimberly Heck
3b2bcef455 Fix some warnings. 2020-05-03 02:46:11 -04:00
Juergen Spitzmueller
f9999039ac Strip polyglossia options from pdf string
Fixes #11813
2020-04-05 15:23:22 +02:00
Richard Kimberly Heck
9d36f720a5 Revert "Fix bug reported by Kornel."
This reverts commit 438f15da21.

Revert "Track whether we have warned about mixing layouts across e.g. branches."

This reverts commit 861c6167ca.

Revert "Track whether title has been issued via OutputParams."

This reverts commit b536759c07.

There are massive complications here, and I don't have time to fix them all
right now.
2020-03-20 17:19:19 -04:00
Richard Kimberly Heck
861c6167ca Track whether we have warned about mixing layouts across e.g. branches. 2020-03-17 01:54:47 -04:00
Richard Kimberly Heck
b536759c07 Track whether title has been issued via OutputParams.
When branches are used in the title, we may need to track whether
we've issued the title across branch insets. So we put the relevant
variables into OutputParams.
2020-03-17 01:50:28 -04:00
Juergen Spitzmueller
89b5607e0a Centralize code to markup deleted complex objects (with tikz) in output
This fixes #9293
2019-12-28 13:43:17 +01:00
Juergen Spitzmueller
04bd57a86a Factor out test for bidi package (= XeTeX + polyglossia) 2019-07-11 10:31:10 +02:00
Enrico Forestieri
56a14c3fde Refined fix for #9633
A branch inset modifies the layout of the internal structures in
which the text is organized. When a branch is active, it is as if it
was not there, but its only presence makes a paragraph which would not
be the last one to actually be the last one, or the check for the
language of the previous paragraph to fail because there is no
previous paragraph before the first one in a branch inset.
Oney way I found to tackle it, is tracking whether the typesetted
paragraphs are actually part of an active branch inset and acting
accordingly.
2019-05-10 08:09:26 +02:00
Juergen Spitzmueller
262e436fc3 Move labels and insets out of moving arguments
Fixes: #2154
2019-03-14 14:24:43 +01:00
Günter Milde
4a481975b6 Use CJKutf8 package if input encoding is "utf8" and a used language requires CJK.
CJKutf8 now used also if a secondary language requires CJK.
2019-03-13 11:31:25 +01:00
Juergen Spitzmueller
bedebfc45a Support for multiple bibliographies setting "per child"
This adds support for the chapterbib package, but also adds ways to
produce this sort of multibib with biblatex and bibtopic (which are
both incompatible with chapterbib).

File format change.
2017-02-04 19:23:45 +01:00
Juergen Spitzmueller
7ca20b292c Support for multiple bibliographies
Using refsection=unit in biblatex, or bibtopic's btUnit environments
in BibTeX.

File format change.
2017-02-04 12:02:00 +01:00
Enrico Forestieri
dea5ba16de Correctly track ulem commands with change tracking
LyX assumes that everything in \lyxdeleted is struck out by ulem
and increases the corresponding counter. However, deleted display
math material is struck out using tikz. As we also take into
account the deletion of underlined display math (in order to
properly position such material vertically), we have to take
care that the count is correct.
2016-10-23 18:23:41 +02:00
Enrico Forestieri
129459a71b Take into account font changes when striking out display math formulas
Font changes are brought inside the \lyxdeleted macro, just before
outputting the latex code for the math inset. The inset writes a
signature before itself and this is checked by \lyxsout for recognizing
a display math. So, the font changes confuse \lyxsout, which also
swallows the first macro at the very start of \lyxdeleted. The result
is that the font changing command is not seen by latex and \sout is also
used to further strike out the formula already striked out by tikz.
This commit makes sure that the expected signature actually appears
just after the opening brace of \lyxdeleted. It also accounts for a
paragraph break occurring just before the math inset, in order to not
introduce too much vertical space, which is noticeable when using
larger font sizes.
2016-10-18 03:29:53 +02:00
Enrico Forestieri
4508a7f855 No need to clutter runparams... 2016-09-25 08:56:12 +02:00
Enrico Forestieri
8c14d9e041 Correctly track opened polyglossia languages
A language switch may also occur outside of output_latex.cpp, apparently.
2016-09-25 08:20:34 +02:00
Guillaume Munch
f1582a2acb Fix type of pos 2016-09-23 23:39:48 +02:00
Juergen Spitzmueller
5d41a22ee4 Fix preview of included files in child documents (bug #9583) 2015-06-02 17:23:52 +02:00
Richard Heck
065db68067 Fix a bunch of minor issues discovered by the cppcheck script. 2014-04-21 11:52:00 -04:00
Juergen Spitzmueller
9aa0fe91f6 ulem commands can be nested. 2014-04-21 11:51:58 -04:00
Georg Baum
be468136df Silence unwanted error popup on copying
The new HTML clipboard export could cause error message boxes on copying
data to the clipboard (bug #8866). These are now suppressed, like all other
errors which might occur for preparing the clipboard data.
2013-11-12 20:52:35 +01:00
Richard Heck
3f748c79c3 Add a for_search member to OutputParams, and use it to limit what
work we do when calling plaintext() for the purpose of generating
material for the advanced search function.

Here again, not only were we parsing BibTeX files, since Julien's
(sensible) introduction of plaintext output for that inset, but we
were in fact writing (to disk) complete plaintext output for
included files every time we did such a search.
2013-03-12 12:45:15 -04:00
Richard Heck
ecef54500d Introduce max_length parameter for plaintext() output routines,
so we can write a limited amount when using this for TOC and
tooltip output.

This should solve the problem with slowness that Kornel noticed,
which was caused by our trying to write an entire plaintext
bibliography every time we updated the TOC. We did that because
he had a bibliography inside a branch, and we use plaintext for
creating the tooltip that goes with the branch list.

Other related bugs were fixed along the way. E.g., it turns out
that, if someone had an InsetInclude inside a branch, then we would
have been writing a *plaintext file* for that inset every time we
updated the TOC. I wonder if some of the other reports of slowness
we have received might be due to this kind of issue?
2013-03-08 15:12:58 -05:00
Juergen Spitzmueller
02c73cd721 Do not let the parent interfere when I child document is exported/view standalone (#8100, #8101) 2012-10-03 10:41:07 +02:00
Jürgen Spitzmüller
84971fb27e * implement possibility to use IPA shortcut notation (the actual shortcuts will follow)
* do not terminate macros by {} if not necessary (prevent kerning violation)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40891 a592a061-630c-0410-9148-cb99ea01b6c8
2012-03-09 09:05:13 +00:00
Uwe Stöhr
cc5cc067a0 new export flavor "DVILUATEX", fixes bug #7713, patch from Jürgen
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39457 a592a061-630c-0410-9148-cb99ea01b6c8
2011-08-10 02:23:44 +00:00
Enrico Forestieri
6d425078a7 When an error occurs, don't highlight more than necessary.
Currently, if an inset outputs a newline, the new latex row is still
associated with a previous id/pos. Now, if a latex error occurs before
this newline, we would still highlight everything associated to that
id/pos, even if it is extraneous to the error.
This is avoided by associating the new latex row with the id/pos in
effect right before entering the inset. If an inset does not output
a newline, it is not excluded from the selection, consistent with the
fact that the text of the inset does appear in the error description.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37903 a592a061-630c-0410-9148-cb99ea01b6c8
2011-03-12 01:40:01 +00:00
Vincent van Ravesteijn
8c61911270 Revert r37092. The fix was wrong.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37127 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-06 13:41:50 +00:00
Vincent van Ravesteijn
dc6b4a332a Typo.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37093 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-03 21:38:19 +00:00
Vincent van Ravesteijn
a7c135b9e1 Fix bug #7096: Wrong LaTeX export for layouts with intitle=true in branches.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37092 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-03 21:23:38 +00:00
Jürgen Spitzmüller
2868ff7a52 add basic LuaTeX backend.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36448 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-23 16:07:42 +00:00
Jürgen Spitzmüller
fc9c1494ce further xetex disambiguation: use the flavor where the flavor is apt.
This introduces an isFullUnicode() function to OutputParams that currently only contains XETEX, but later can also contain other fully unicode-aware backends (LUATEX for instance).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36445 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-23 12:23:36 +00:00
Jürgen Spitzmüller
7cbeed2e40 * Introduce polyglossia support (bug 6576).
Please test this.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36433 a592a061-630c-0410-9148-cb99ea01b6c8
2010-11-22 12:10:16 +00:00
Jean-Marc Lasgouttes
1a18cdfb39 Clean-up the code with respect to PassThru insets and layouts.
The goal is first to remove explicit testing against ERT_CODE, 
and second to allow to define layouts with the same properties as ERT insets.

This commit does not change behaviour 
* rename OutputParams::verbatim to pass_thru
* disable encoding switch inside pass_thru layouts



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35091 a592a061-630c-0410-9148-cb99ea01b6c8
2010-08-07 22:07:49 +00:00
Richard Heck
b5d2302180 Initialize math_flavor, and introduce an isLaTeX() flavor check.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33968 a592a061-630c-0410-9148-cb99ea01b6c8
2010-03-31 18:57:20 +00:00
Richard Heck
59c04f7096 The fortoc argument I introduced earlier should all along have gone into
OutputParams. So now it is there.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33044 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-14 22:24:43 +00:00
Jürgen Spitzmüller
7a7ab8f14b Add an option to assure that all aux files are maintained when using the includeonly feature, so that the
page numbering and the references of the master file are maintained in the included children (bug 1005).

I made this optional since some people use \includeonly to save compilation time, but a proper aux file update
needs a full compilation of the complete master prior to the compilation of the \includeonly master.

Hence, a new buffer param is introduced (file format change). 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32936 a592a061-630c-0410-9148-cb99ea01b6c8
2010-01-10 13:25:41 +00:00
Richard Heck
fa2f219d92 In non-MultiPar insets, we do not want to output paragraphs at all.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32103 a592a061-630c-0410-9148-cb99ea01b6c8
2009-11-19 22:31:52 +00:00
Richard Heck
9a19a312ba Rename one output param and add a new one.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31752 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-26 20:47:12 +00:00
Enrico Forestieri
128e349191 Restore the master language at the end of an included child document
instead of the child document language.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31665 a592a061-630c-0410-9148-cb99ea01b6c8
2009-10-18 21:48:13 +00:00