Suppose you are writing with a \item inside an enumerate. You need to attach a graph to the center. What would you do: attach the file insideenumerate or outside of it? In other words, would you center the graph with respect to item margins or with paper margins?
@marmot oh! Sorry, I mean "center horizontally", but we can discuss if an image has to be centered wrt the page or an environment that contains the image too
@UlrikeFischer I've been thinking about l3str-convert. We need the escaping (URL/name/string), but do we really need the actual encoding conversion? I'm wondering if we should just extract the bits we require
@UlrikeFischer I'm also wondering why Bruno made lots of files: at the moment, I'm thinking we want just want one big file
@manooooh let latex do what it does, center within the list if it is part of a list or center within the page if it is a float that has floated in to the list
@DavidCarlisle good question. The reference mentions a need for pdfdocencoding only once for the Status field of FDF-dictionary (form field export) and says there "Because name objects in the appearance dictionary are limited to PDFDocEncoding, they cannot represent non-Latin text.". But probably the larger problem would be to disentangle all the pdfdoc encoding stuff from hyperref. (in pdf 2.0 you can use also utf8 beside utf16be)
@MarcelKrüger more or less everywhere, where the old reference says "pdfdoc or utf16BE", it says now "pdfdoc or utf16be or utf8". utf8 is identified by the BOM.
@r.k always use use \begin{minipage} not \minipage and use \centering within the minipage if you want that. but you may have specified caption formatting elsewhere, best to make a real example and ask a question on site. (unrelated but not allowing the figure on a float page makes it much more likely that it drifts to the end of the document)
@DavidCarlisle I changed it to \begin{figure}[!htb] \begin{minipage}{0.5\textwidth} %\minipage{0.5\textwidth} \centering \fbox{\includegraphics[scale=0.47]{abstraction2.pdf}} \caption{Abstraction after first refinement} \end{minipage} %\endminipage\hfill %\minipage{0.5\textwidth} \begin{minipage}{0.5\textwidth} \centering \fbox{\includegraphics[scale=0.47]{abstraction2solution.pdf}} \caption{Solution for refined abstraction} %\endminipage \end{minipage} \end{figure}
However it still does not provide centered captions
@r.k as I say, caption formatting may be determined elsewhere (in the class file, by the caption package, in random code in your preamble) make a test document and post as a question on site. By default captions are centred if one line or set as a justified full width paragraph if longer.
you will need a % after the middle \end{minipage} or you have a word space between the minipages, so can not fit two .5\textwidth ones on one line.
@manooooh if you have a figure earlier in the document then it may float to the top of a page that contains your enumerated list (since lists can span over page breaks.) or if you have a [ht] float that in this case does not move so stays within the list.
@FaheemMitha as ever you should have provided an example at the start, I'm just now seeing what you mean, I would guess that you are commenting out the whole line (as the inserted tokens are already tokenized)
@FaheemMitha any tex tokens generated are inserted at the end of the \directlua normally this isn't an issue but if they make make definitions then you inspect the tex state in the Lua, then this can show up
@DavidCarlisle, @UlrikeFischer On the PDF encoding business, don't we need PDFDocEncoding as UTF-16BE means that everything is encoded, including ASCII text?
@JosephWright well it does, although if utf8 becomes feasible that would be avoided to an extent, but i know from hyperref that it isn't great it sort of works Ok for western europe if you are covered by pdfdocencoding but hard to know up front if you are going to need unicode option and switch to utf16. encoding ascii as utf16 isn't very hard:-)
@JosephWright ah yes well I meant encoding ascii as utf16 isn't hard (just insert a null byte every other byte) I wasn't thinking about the hex encoding:-)
@JosephWright but I am confused actually why the #00 encoding? the text shouldn't be much bigger it should be twice as big which is same argument against using utf-8 for european accented letters but consistency wins over disk space in most arguments
@DavidCarlisle Perhaps it's worth doing, though, as it is a lot easier, and all we then need is a simply UTF-8/16 switch
@DavidCarlisle I picked the one suitable for PDF names ... the string one would have \000 (and that checks out versushyperref, other than it seems to currently miss the BOM ... one for Bruno)
@DavidCarlisle Yes, I see that: I think on balance we should just integrate at least enough of l3str-convert to handle this, then just use a fixed conversion
@JosephWright it's probably easiest not to add the BOM in the conversion functions, as that makes concatenating strings easier, you can just insert a boM at the point you add a string that needs one.
@DavidCarlisle Yeah, maybe: I'm not sure what Bruno's design is here
@DavidCarlisle Anyone, probably for the team list ...
@DavidCarlisle What I'm less sure of is whether just to strip Bruno's code down to the core idea: UTF-8 to UTF-16 (and perhaps UTF-32), plus the escape code, but perhaps not all the 8-bit stuff
@DavidCarlisle Also wonder why Bruno went for lots of files for the conversion stuff, rather than just loading it all in one big file
@JosephWright luatex encodes most things in utf16 anyway, so I don't think that it is a real problem. But there a some details that are a bit unclear. E.g. hyperref insists to write bookmarks in octal notation, and for xetex is converts to utf8 because xdvipdfmx converts (or did convert) then to utf16 again.
@DavidCarlisle I have a question regarding 'protocol' on TeX-SE: In your answer to my question regarding apparent recursion in an edef statement you pointed out several things in my code I should do differently (and I thank you for that), but should I incorporate those corrections into my original MWE or should I enter my own answer and include them there, or just leave it be?
@OneMug I think it's best to leave it be. Generally adding an answer of your own which simply repeats (with slight changes) an existing answer is discouraged, and editing your question to reflect the answer changes the question and removes the context of the answer(s).
@OneMug leave it be really, comments in comment are more or less personal tips but question/answer are best focussed on a single issue. That said if I'm posting an answer myself i usually try to fix unrelated things because I know people just copy paste code from answers and would pick up unrelated bad habits (so as a general rule code in questions is not intended to be good, but code in answers should be, as far as possible)
@DavidCarlisle and @AlanMunn: Thanks for the reply, leave as is (kinda thought so).
Need some help for the title of my next query though. The parsing routine that was the driver for the problem edef statement in my last question could be fed input containing paragraphs and/or groups (braces). My existing routine chokes on paragraphs (I have not defined them long which I've have never used before) and saves only the first character in an embedded group. Any advice on how I would break that down into actual questions?
@CarLaTeX Whilst playing with \standalone I found this worked native to windows and wanted to check it does not impact you \documentclass{standalone} \usepackage{tikzlings} % required for both the inputs \usepackage{tikzducks} % required for just the carlatex input \usepackage{standalone} \begin{document} \write18{curl -B https://raw.githubusercontent.com/samcarter/tikzlings/master/Examples/marmot.tex>marmot.tex} %\message{hello} \input{carlatex} \scalebox{2}{\input{marmot} Hats off to you M'am}