Re: URL question

2023-02-08 Thread Udicoudco
On Wed, Feb 8, 2023 at 5:55 PM Rich Shepard 
wrote:

> I thought that after inserting a URL (either from the Insert menu or as
> ERT)
> compiling with pdflatex would automatically break the string to fit the
> text
> area. This one doesn't fit the line.
>
> A MWE is attached.
>
> Rich--
>

I would suggest loading the xurl package (using \sloppy can change other
layouts in the documents...).
The xurl package  allows line breaks in URLs at alphanumeric characters and
= / . : * - ~ ' ".

> lyx-users mailing list
> lyx-users@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users
>
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: URL question [RESOLVED]

2023-02-08 Thread Rich Shepard

On Wed, 8 Feb 2023, Herbert Voss wrote:


_Never_ use it in the pramble! It gives a lousy typesetting.


Herbert,

I read that in my StackExchange thread.


For URLs you also can use
\usepackage{xurl}
in the preamble, then the URL can be broken at every charcter.


Thanks very much for the pointer. I'll remember to include it in all
documents with URLs.

Regards,

Rich
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: URL question

2023-02-08 Thread sovhist via lyx-users
Hi.

Just add to preamble
\sloppy

Best regards,
Valdemaras

On vas 8 2023, at 5:55 pm, Rich Shepard  wrote:

> I thought that after inserting a URL (either from the Insert menu or
> as ERT)
> compiling with pdflatex would automatically break the string to fit
> the text
> area. This one doesn't fit the line.
> 
> A MWE is attached.
> 
> Rich-- 
> lyx-users mailing list
> lyx-users@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users
> 
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: URL question [RESOLVED]

2023-02-08 Thread Herbert Voss




Am 08.02.23 um 17:29 schrieb Rich Shepard:

On Wed, 8 Feb 2023, sovhist wrote:


Just add to preamble
\sloppy


_Never_ use it in the pramble! It gives a lousy typesetting.





Thanks for the pointer. The solution I found (on a StackExchange 
thread) is

to enclose that one paragraph in between \begin{sloppypar} ...
\end{sloppypar}. Result attached.



For URLs you also can use

\usepackage{xurl}

in the preamble, then the URL can be broken at every charcter.

Herbert
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: URL question [RESOLVED]

2023-02-08 Thread Rich Shepard

On Wed, 8 Feb 2023, sovhist wrote:


Just add to preamble
\sloppy


Valdemaras,

Thanks for the pointer. The solution I found (on a StackExchange thread) is
to enclose that one paragraph in between \begin{sloppypar} ...
\end{sloppypar}. Result attached.

Regards,

Rich


mwe.pdf
Description: Adobe PDF document
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


URL question

2023-02-08 Thread Rich Shepard

I thought that after inserting a URL (either from the Insert menu or as ERT)
compiling with pdflatex would automatically break the string to fit the text
area. This one doesn't fit the line.

A MWE is attached.

Rich#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass scrartcl
\begin_preamble
%% Load an *.lco style file (see KOMA documentation)
%\LoadLetterOption{Rich}%

\date{}
\usepackage{scrlayer-scrpage,url}
\pagestyle{scrheadings}
\end_preamble
\use_default_options false
\maintain_unincluded_children false
\language american
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "palatino" "\font_sans"
\font_sans "default" "default"
\font_typewriter "default" "\font_math"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\use_microtype false
\use_dash_ligatures true
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize custom
\use_geometry true
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 0
\use_package mathdots 0
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\use_minted 0
\index Index
\shortcut idx
\color #008000
\end_index
\paperwidth 6in
\paperheight 9in
\leftmargin 2cm
\topmargin 4cm
\bottommargin 2cm
\headsep 1.5cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\is_math_indent 0
\math_numbering_side default
\quotes_style english
\dynamic_quotes 0
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Standard
The specifics of the antidegradation review protocol are in the Antidegradation
 Policy Implementation Internal Management Directive for NPDES Permits and
 Section 401 Water Quality Certifications 
\begin_inset Flex URL
status open

\begin_layout Plain Layout


\end_layout

\end_inset

 in March 2001.
 The antidegradation internal management directive provides step-by-step
 directions to guide staff through the antidegradation review process.
 The goal of the review is to determine if the proposed activity would likely
 result in any measurable change in water quality away from conditions unimpacte
d by anthropogenic sources (outside the mixing zone, if existing).
\end_layout

\begin_layout Standard

\end_layout

\end_body
\end_document
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Spacing at the top and bottom of tabular

2023-02-08 Thread Daniel

On 2023-02-08 01:51, Dan wrote:
The code is working just fine, but I need to add something to give a 
little more space at the top and bottom of a table.


Here's the code:
\begin{tabular}{|c|c|}
\hline
\text{Example}  &  \text{Code} \\
\hline
x = \dfrac{-b\pm\sqrt{b^{2}-4ac}}{2a}  &  \textrm{ x = \backslash 
frac\{-b \backslash pm \backslash sqrt\{ b \hat{} 2 - 4ac\} \}\{2a\} } \\

\hline
\end{tabular}

The square root at the top of the box is crushed up into the \hline and 
the 2a at the bottom is similar.  I can find all sorts of things to do 
to change horizontal spacing, and I even found a method to add extra 
vertical space to the rows (\arraystretch), but it doesn't do anything 
with the very top and bottom.


A have attached a full file.

Thanks!
-Dan


Hi Dan,

Is there a specific reason why the table is *inside* a math equation?

I would suggest to use a formal table (attached):

1) Create a table (not inside of an equation)
2) Via the context menu of the table set the style to "Formal Style"
3) Set the border right
4) Add the equation
5) Add the code (and set the font Family via Edit > Text Properties > 
Constomize... to Typewriter)


Best,
Daniel#LyX 2.4 created this file. For more info see https://www.lyx.org/
\lyxformat 613
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass amsart
\begin_preamble

\end_preamble
\use_default_options true
\begin_removed_modules
theorems-ams
\end_removed_modules
\begin_modules
eqs-within-sections
figs-within-sections
theorems-ams-chap-bytype
\end_modules
\maintain_unincluded_children no
\language english
\language_package default
\inputencoding auto-legacy
\fontencoding auto
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_roman_osf false
\font_sans_osf false
\font_typewriter_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\use_microtype false
\use_dash_ligatures true
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\float_placement class
\float_alignment class
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 1
\use_minted 0
\use_lineno 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\is_math_indent 1
\math_indentation 0bp
\math_numbering_side left
\quotes_style english
\dynamic_quotes 0
\papercolumns 1
\papersides 2
\paperpagestyle default
\tablestyle default
\tracking_changes false
\output_changes false
\change_bars false
\postpone_fragile_content false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\docbook_table_output 0
\docbook_mathml_prefix 1
\end_header

\begin_body

\begin_layout Standard
\begin_inset Tabular






\begin_inset Text

\begin_layout Plain Layout

\family roman
\series medium
\shape up
\size normal
\emph off
\nospellcheck off
\bar no
\strikeout off
\xout off
\uuline off
\uwave off
\noun off
\color none
Example
\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout

\family roman
\series medium
\shape up
\size normal
\emph off
\nospellcheck off
\bar no
\strikeout off
\xout off
\uuline off
\uwave off
\noun off
\color none
Code
\end_layout

\end_inset




\begin_inset Text

\begin_layout Plain Layout
\begin_inset Formula $x=\dfrac{-b\pm\sqrt{b^{2}-4ac}}{2a}$
\end_inset


\end_layout

\end_inset


\begin_inset Text

\begin_layout Plain Layout

\family typewriter
x = 
\backslash
frac{-b 
\backslash
pm 
\backslash
sqrt{b^2 - 4ac}}{2a}
\family default
 
\end_layout

\end_inset




\end_inset


\end_layout

\end_body
\end_document
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Spacing at the top and bottom of tabular

2023-02-08 Thread Herbert Voss



Am 08.02.23 um 01:51 schrieb Dan:
The code is working just fine, but I need to add something to give a 
little more space at the top and bottom of a table.


Here's the code:
\begin{tabular}{|c|c|}
\hline
\text{Example}  &  \text{Code} \\
\hline
x = \dfrac{-b\pm\sqrt{b^{2}-4ac}}{2a}  &  \textrm{ x = \backslash 
frac\{-b \backslash pm \backslash sqrt\{ b \hat{} 2 - 4ac\} \}\{2a\} } \\

\hline
\end{tabular}

The square root at the top of the box is crushed up into the \hline 
and the 2a at the bottom is similar.  I can find all sorts of things 
to do to change horizontal spacing, and I even found a method to add 
extra vertical space to the rows (\arraystretch), but it doesn't do 
anything with the very top and bottom.




Write into the documents preamble

\usepackage{tabls}

b.t.w.: \usepackage{inputenc} is not needed

Herbert


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users