-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
+#LyX 2.1 created this file. For more info see http://www.lyx.org/
+\lyxformat 418
\begin_document
\begin_header
\textclass scrbook
\use_esint 1
\use_mhchem 1
\use_mathdots 1
+\use_undertilde 1
\cite_engine basic
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
+\justification true
\use_refstyle 0
\notefontcolor #0000ff
\branch Question
\papercolumns 1
\papersides 2
\paperpagestyle default
-\tracking_changes false
+\tracking_changes true
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict true
+\author 1414654397 "Richard Heck"
\end_header
\begin_body
You can specify if paragraphs should be separated by indentations or vertical
skips.
The line spacing and the number of text columns can also be specified here.
+
+\change_inserted 1414654397 1323297066
+You can also determine whether text will be shown as justified in LyX itself.
+ Note that this does not affect whether the text is justified in the output.
+\change_unchanged
+
\end_layout
\begin_layout Standard
Note that LyX will not show two columns or the set up line spacing on screen.
That would be impractical, often unreadable and is not part of the WYSIWYM
concept.
- However, it will be as you specified it in the output.
+ However, in the output, it will be as you specified it.
\end_layout
\begin_layout Section
# Uncomment only what you need to import, please.
-from parser_tools import find_token, find_end_of_inset, get_value
+from parser_tools import find_token, find_end_of_inset, get_value, \
+ del_token
#from parser_tools import find_token, find_end_of, find_tokens, \
#find_token_exact, find_end_of_inset, find_end_of_layout, \
document.header[i] = "\\inputencoding %s" % jap_enc_dict[val]
+def revert_justification(document):
+ " Revert the \\justification buffer param"
+ if not del_token(document.header, '\\justification', 0):
+ document.warning("Malformed LyX document: Missing \\justification.")
+
+
+
##
# Conversion hub
#
[415, [convert_undertilde]],
[416, []],
[417, [convert_japanese_encodings]],
+ [418, []],
]
revert = [
+ [417, [revert_justification]],
[416, [revert_japanese_encodings]],
[415, [revert_negative_space,revert_math_spaces]],
[414, [revert_undertilde]],
listings_params = string();
pagestyle = "default";
suppress_date = false;
+ justification = true;
// no color is the default (white)
backgroundcolor = lyx::rgbFromHexName("#ffffff");
isbackgroundcolor = false;
master = lex.getString();
} else if (token == "\\suppress_date") {
lex >> suppress_date;
+ } else if (token == "\\justification") {
+ lex >> justification;
} else if (token == "\\language") {
readLanguage(lex);
} else if (token == "\\language_package") {
<< "\n\\use_indices " << convert<string>(use_indices)
<< "\n\\paperorientation " << string_orientation[orientation]
<< "\n\\suppress_date " << convert<string>(suppress_date)
+ << "\n\\justification " << convert<string>(justification)
<< "\n\\use_refstyle " << use_refstyle
<< '\n';
if (isbackgroundcolor == true)
std::string float_placement;
///
unsigned int columns;
+ ///
+ bool justification;
/// parameters for the listings package
std::string listings_params;
///
}
}
+ // Has the user requested we not justify stuff?
+ if (!bv_->buffer().params().justification
+ && align == LYX_ALIGN_BLOCK)
+ align = LYX_ALIGN_LEFT;
+
switch (align) {
case LYX_ALIGN_BLOCK: {
int const ns = numberOfSeparators(par, row);
this, SLOT(change_adaptor()));
connect(textLayoutModule->twoColumnCB, SIGNAL(clicked()),
this, SLOT(setColSep()));
+ connect(textLayoutModule->justCB, SIGNAL(clicked()),
+ this, SLOT(change_adaptor()));
textLayoutModule->lspacingLE->setValidator(new QDoubleValidator(
textLayoutModule->lspacingLE));
else
bp_.columns = 1;
+ bp_.justification = textLayoutModule->justCB->isChecked();
+
if (textLayoutModule->indentRB->isChecked()) {
// if paragraphs are separated by an indentation
bp_.paragraph_separation = BufferParams::ParagraphIndentSeparation;
textLayoutModule->twoColumnCB->setChecked(
bp_.columns == 2);
+ textLayoutModule->justCB->setChecked(bp_.justification);
if (!bp_.options.empty()) {
latexModule->optionsLE->setText(
+<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TextLayoutUi</class>
<widget class="QWidget" name="TextLayoutUi">
<x>0</x>
<y>0</y>
<width>421</width>
- <height>280</height>
+ <height>327</height>
</rect>
</property>
<property name="windowTitle">
</property>
</spacer>
</item>
- <item row="1" column="0" colspan="2">
- <widget class="QCheckBox" name="twoColumnCB">
- <property name="toolTip">
- <string>Format text into two columns</string>
- </property>
- <property name="text">
- <string>Two-&column document</string>
- </property>
- </widget>
- </item>
</layout>
</widget>
</item>
- <item row="2" column="0">
+ <item row="4" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</spacer>
</item>
+ <item row="2" column="0">
+ <widget class="QCheckBox" name="twoColumnCB">
+ <property name="toolTip">
+ <string>Format text into two columns</string>
+ </property>
+ <property name="text">
+ <string>Two-&column document</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QCheckBox" name="justCB">
+ <property name="text">
+ <string>Use &Justification</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<customwidgets>
<tabstop>skipLengthCO</tabstop>
<tabstop>lspacingCO</tabstop>
<tabstop>lspacingLE</tabstop>
- <tabstop>twoColumnCB</tabstop>
</tabstops>
<includes>
<include location="local">qt_i18n.h</include>
// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
-#define LYX_FORMAT_LYX 417 // jrioux : rename the japanese encodings
+#define LYX_FORMAT_LYX 418 // rgh: justification option
#define LYX_FORMAT_TEX2LYX 417
#if LYX_FORMAT_FOR_TEX2LYX != LYX_FORMAT_FOR_LYX