From: Jeff P. <jh...@cs...> - 2020-03-21 03:40:51
|
I am trying to use latex2rtf to convert a relatively complex document. One thing I'd like to do is change the font size on some (or possibly all) verbatim sections. I've found that I can specify a font size directly before \begin{verbatim} and that will change the setting for the begin/end pair. I'd also like to be able to change the default definition so that I only have to add all of that in unusual cases rather than in every case. I changed the definition of verbatim in style.cfg, but that definition does not seem to get used as I would expect. The rtf output appears to overrides the specification. I see in the RTF file: \pard\plain\s38\ql\widctlpar\f3\fs8\sl240\slmult1 \fi0 \fs22 Where the fs8 is what I defined for verbatim, but actual size appears to be overridden by the \fs22. And that is what Word indicates as well in its style pane. It says: verbatim + 11pt Is there anyway to get it to simply use what is defined in the style without overriding it? Similar things happen for other items in the style guide. subsection is defined as heading 3, but its spacing before (sb) and its indentation fi are overridden on each use. \pard\plain\s3\ql\sb240\sa120\keepn\f0\b\fs32\sl240\slmult1 \sb480 \fi0 1.1 section test\par I'm guessing that something in my document is setting these items, but I don't seem to be able to find it. Seemingly the correct way is to make the appropriate latex changes to my .tex files so that latex2rtf creates the output I'm looking for, but being able to change the style settings as a way to accomplish this would be nice as well. Thanks for a very helpful tool! -jeff |
From: Wilfried H. <tex...@gm...> - 2020-03-21 07:39:52
|
Hi Jeff, thank you for the detailed and precise problem description. I will try to reproduce this and look for a solution. With regard to the font sizes: Does your document contain a global font size command in the preamble? Without having tested this, this may cause the effects you describe. Kind regards, Wilfried At 21.03.2020 04:07 Jeff Perkins wrote: > I am trying to use latex2rtf to convert a relatively complex document. > One thing I'd like to do is change the font size on some (or possibly > all) verbatim sections. > > I've found that I can specify a font size directly before > \begin{verbatim} and that will change the setting for the begin/end pair. > > I'd also like to be able to change the default definition so that I only > have to add all of that in unusual cases rather than in every case. I > changed the definition of verbatim in style.cfg, but that definition > does not seem to get used as I would expect. The rtf output appears to > overrides the specification. I see in the RTF file: > > \pard\plain\s38\ql\widctlpar\f3\fs8\sl240\slmult1 \fi0 \fs22 > > Where the fs8 is what I defined for verbatim, but actual size appears to > be overridden by the \fs22. And that is what Word indicates as well in > its style pane. It says: verbatim + 11pt > > Is there anyway to get it to simply use what is defined in the style > without overriding it? > > Similar things happen for other items in the style guide. subsection is > defined as heading 3, but its spacing before (sb) and its indentation > fi are overridden on each use. > > \pard\plain\s3\ql\sb240\sa120\keepn\f0\b\fs32\sl240\slmult1 \sb480 \fi0 > 1.1 section test\par > > I'm guessing that something in my document is setting these items, but I > don't seem to be able to find it. Seemingly the correct way is to make > the appropriate latex changes to my .tex files so that latex2rtf creates > the output I'm looking for, but being able to change the style settings > as a way to accomplish this would be nice as well. > > Thanks for a very helpful tool! > > -jeff > > > > _______________________________________________ > Latex2rtf-users mailing list > Lat...@li... > https://lists.sourceforge.net/lists/listinfo/latex2rtf-users > |
From: Wilfried H. <tex...@gm...> - 2020-03-21 08:49:22
|
At 21.03.2020 04:07 Jeff Perkins wrote: > I am trying to use latex2rtf to convert a relatively complex document. > One thing I'd like to do is change the font size on some (or possibly > all) verbatim sections. > > I've found that I can specify a font size directly before > \begin{verbatim} and that will change the setting for the begin/end pair. > > I'd also like to be able to change the default definition so that I only > have to add all of that in unusual cases rather than in every case. I > changed the definition of verbatim in style.cfg, but that definition > does not seem to get used as I would expect. The rtf output appears to > overrides the specification. I see in the RTF file: > > \pard\plain\s38\ql\widctlpar\f3\fs8\sl240\slmult1 \fi0 \fs22 > > Where the fs8 is what I defined for verbatim, but actual size appears to > be overridden by the \fs22. And that is what Word indicates as well in > its style pane. It says: verbatim + 11pt > > Is there anyway to get it to simply use what is defined in the style > without overriding it? I found that the setting in the \documentclass command does NOT override the font set in style.cfg. But a font size command in the text -- like \small -- DOES override the size set in style.cfg. I don't know whether there are other commands which also change the font size. > Similar things happen for other items in the style guide. subsection is > defined as heading 3, but its spacing before (sb) and its indentation > fi are overridden on each use. > > \pard\plain\s3\ql\sb240\sa120\keepn\f0\b\fs32\sl240\slmult1 \sb480 \fi0 > 1.1 section test\par Does your document use the titlesec package and the command \titlespacing*{\subsection} ? > _______________________________________________ > Latex2rtf-users mailing list > Lat...@li... > https://lists.sourceforge.net/lists/listinfo/latex2rtf-users > |
From: Jeff P. <jh...@cs...> - 2020-03-21 18:14:02
|
Thanks for the quick reply. Surprising, I found the problem with \verbatim sizing went away when I ensured that I had a full set of sections in the document I was testing. I was working on part of the document and it started with \subsection. When I added \chapter and section to it, then verbatim stopped overriding the size. Since this seems odd, perhaps I changed something else, but I don't know what. I still have the problem with spacing in the headers being overridden. I've looked for any commands specifying spacing and have not found any. I removed the package titlesec altogether and the problem persists. I'll try removing virtually every external package and see if I can find something that relates to this. In a similar vein, every figure seems to be proceeded by a figure paragraph (which is empty). This creates some unexpected spacing before the figure and as with the headings, the spacing is overridden on each figure. {\pard\plain\s31\qc\sb120\sa0\keep\widctlpar\f0\fs24\sl240\slmult1 \sb240 \fi0 \par Another minor problem is that underscores (such as in variable names) are interpreted oddly. This problem can be removed by escaping the underscore. In regular latex, you can define underscore to only have special meaning in match mode which is convenient. Is there a similar approach for latex2rtf? In Latex I use: \catcode`\_=12 \begingroup\lccode`~=`_\lowercase{\endgroup\let~\sb} \mathcode`_="8000 One last question. Does latex support a command that converts its argument to upper case? \textsc provide small caps, but I couldn't find anything that created normal caps. On 3/21/20 4:48 AM, Wilfried Hennings wrote: > At 21.03.2020 04:07 Jeff Perkins wrote: >> I am trying to use latex2rtf to convert a relatively complex document. >> One thing I'd like to do is change the font size on some (or possibly >> all) verbatim sections. >> >> I've found that I can specify a font size directly before >> \begin{verbatim} and that will change the setting for the begin/end >> pair. >> >> I'd also like to be able to change the default definition so that I only >> have to add all of that in unusual cases rather than in every case. I >> changed the definition of verbatim in style.cfg, but that definition >> does not seem to get used as I would expect. The rtf output appears to >> overrides the specification. I see in the RTF file: >> >> \pard\plain\s38\ql\widctlpar\f3\fs8\sl240\slmult1 \fi0 \fs22 >> >> Where the fs8 is what I defined for verbatim, but actual size appears to >> be overridden by the \fs22. And that is what Word indicates as well in >> its style pane. It says: verbatim + 11pt >> >> Is there anyway to get it to simply use what is defined in the style >> without overriding it? > > I found that the setting in the \documentclass command does NOT override > the font set in style.cfg. > But a font size command in the text -- like \small -- DOES override the > size set in style.cfg. > I don't know whether there are other commands which also change the font > size. > >> Similar things happen for other items in the style guide. subsection is >> defined as heading 3, but its spacing before (sb) and its indentation >> fi are overridden on each use. >> >> \pard\plain\s3\ql\sb240\sa120\keepn\f0\b\fs32\sl240\slmult1 \sb480 \fi0 >> 1.1 section test\par > > Does your document use the titlesec package > and the command \titlespacing*{\subsection} ? > > >> _______________________________________________ >> Latex2rtf-users mailing list >> Lat...@li... >> https://lists.sourceforge.net/lists/listinfo/latex2rtf-users >> > |